You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
fix some NullPointerExceptions with Flower Finder test apk
This commit is contained in:
@@ -42,7 +42,8 @@ public class Paint {
|
||||
if(skia_font == 0)
|
||||
skia_font = native_create_font();
|
||||
|
||||
native_set_typeface(skia_font, typeface.skia_typeface);
|
||||
if (typeface != null)
|
||||
native_set_typeface(skia_font, typeface.skia_typeface);
|
||||
return this.typeface;
|
||||
}
|
||||
public void getTextBounds(String text, int start, int end, Rect bounds) {}
|
||||
|
||||
@@ -81,7 +81,8 @@ public class TextView extends View {
|
||||
native_setTextColor(color);
|
||||
}
|
||||
public void setTextColor(ColorStateList colors) {
|
||||
setTextColor(colors.getDefaultColor()); // TODO: do this properly
|
||||
if (colors != null)
|
||||
setTextColor(colors.getDefaultColor()); // TODO: do this properly
|
||||
}
|
||||
public void setTextSize(int unit, float size) {}
|
||||
public void setTypeface(Typeface tf, int style) {}
|
||||
|
||||
Reference in New Issue
Block a user