Merge AOSP android-9.0.0_r3

Fix conflicts and make it build in 5.1, 6.0, 7.1, 8.1, and 9.0

Change-Id: Ida0a64c29ff27d339b7f42a18d820930964ac6e4
diff --git a/minui/graphics_overlay.cpp b/minui/graphics_overlay.cpp
index 082d385..b7e62d9 100644
--- a/minui/graphics_overlay.cpp
+++ b/minui/graphics_overlay.cpp
@@ -47,7 +47,6 @@
 #define ALIGN(x, align) (((x) + ((align)-1)) & ~((align)-1))
 
 MinuiBackendOverlay::MinuiBackendOverlay() :
-  gr_draw(nullptr),
   fb_fd(-1),
   isMDP5(false),
   leftSplit(0),
@@ -76,7 +75,6 @@
 
 bool MinuiBackendOverlay::target_has_overlay()
 {
-    int ret;
     int mdp_version;
     bool overlay_supported = false;
     fb_fix_screeninfo fi;
@@ -524,6 +522,7 @@
 }
 
 GRSurface* MinuiBackendOverlay::Init() {
+	gr_draw = NULL; // this should be in the constructor but 9.0 was throwing a compile error
 	if (!target_has_overlay())
 	    return NULL;