mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Revert to a Jellybean compatible variant of getDrawable (flutter/engine#3997)
This commit is contained in:
parent
68448fcd3c
commit
1e5a61b584
@ -316,6 +316,7 @@ public final class FlutterActivityDelegate
|
||||
*
|
||||
* Returns null if no {@code windowBackground} is set for the activity.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private Drawable getLaunchScreenDrawableFromActivityTheme() {
|
||||
TypedValue typedValue = new TypedValue();
|
||||
if (!activity.getTheme().resolveAttribute(
|
||||
@ -328,7 +329,7 @@ public final class FlutterActivityDelegate
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return activity.getDrawable(typedValue.resourceId);
|
||||
return activity.getResources().getDrawable(typedValue.resourceId);
|
||||
} catch (NotFoundException e) {
|
||||
Log.e(TAG, "Referenced launch screen windowBackground resource does not exist");
|
||||
return null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user