提交 e260e35d 编写于 作者: J Jason Simmons 提交者: GitHub

Revert to a Jellybean compatible variant of getDrawable (#3997)

上级 af147ba1
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册