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
Activity: catch exceptions while setting window background
This commit is contained in:
@@ -179,9 +179,13 @@ public class Activity extends ContextThemeWrapper implements Window.Callback, La
|
||||
}
|
||||
|
||||
TypedArray ta = obtainStyledAttributes(new int[] {R.attr.windowBackground});
|
||||
try {
|
||||
Drawable background = ta.getDrawable(0);
|
||||
if (background != null)
|
||||
window.setBackgroundDrawable(background);
|
||||
} catch (Exception e) {
|
||||
Slog.e(TAG, "Error setting window background", e);
|
||||
}
|
||||
ta.recycle();
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user