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/text.cpp b/gui/text.cpp
index 61940ff..123b249 100644
--- a/gui/text.cpp
+++ b/gui/text.cpp
@@ -64,7 +64,7 @@
 
 	// Load the font, and possibly override the color
 	mFont = LoadAttrFont(FindNode(node, "font"), "resource");
-	if (!mFont)
+	if (!mFont || !mFont->GetResource())
 		return;
 	mColor = LoadAttrColor(FindNode(node, "font"), "color", mColor);
 	mHighlightColor = LoadAttrColor(FindNode(node, "font"), "highlightcolor", mColor);