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/minuitwrp/events.cpp b/minuitwrp/events.cpp
index 04545b6..94b800e 100644
--- a/minuitwrp/events.cpp
+++ b/minuitwrp/events.cpp
@@ -101,7 +101,7 @@
 static struct ev evs[MAX_DEVICES];
 static unsigned ev_count = 0;
 static struct timeval lastInputStat;
-static unsigned long lastInputMTime;
+static time_t lastInputMTime;
 static int has_mouse = 0;
 
 static inline int ABS(int x) {
@@ -360,7 +360,7 @@
 	ev_count = 0;
 }
 
-static int vk_inside_display(__s32 value, struct input_absinfo *info, int screen_size)
+/*static int vk_inside_display(__s32 value, struct input_absinfo *info, int screen_size)
 {
     int screen_pos;
 
@@ -369,7 +369,7 @@
 
     screen_pos = (value - info->minimum) * (screen_size - 1) / (info->maximum - info->minimum);
     return (screen_pos >= 0 && screen_pos < screen_size);
-}
+}*/
 
 static int vk_tp_to_screen(struct position *p, int *x, int *y)
 {
@@ -782,7 +782,7 @@
     return -2;
 }
 
-int ev_wait(int timeout)
+int ev_wait(int timeout __unused)
 {
     return -1;
 }
@@ -792,7 +792,7 @@
     return;
 }
 
-int ev_get_input(int fd, short revents, struct input_event *ev)
+int ev_get_input(int fd __unused, short revents __unused, struct input_event *ev __unused)
 {
     return -1;
 }