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/gui/textbox.cpp b/gui/textbox.cpp
index 2c7d09f..824daf3 100644
--- a/gui/textbox.cpp
+++ b/gui/textbox.cpp
@@ -81,6 +81,9 @@
 
 void GUITextBox::RenderItem(size_t itemindex, int yPos, bool selected __unused)
 {
+	if (!mFont || !mFont->GetResource())
+		return;
+
 	// Set the color for the font
 	gr_color(mFontColor.red, mFontColor.green, mFontColor.blue, mFontColor.alpha);