Fix NPE in splash screen lookup (flutter/engine#13719)

This commit is contained in:
Jason Simmons
2019-11-06 10:31:41 -08:00
committed by GitHub
parent 9e4ef9a7f5
commit 70d674fd14

View File

@@ -494,7 +494,7 @@ public class FlutterActivity extends Activity
PackageManager.GET_META_DATA|PackageManager.GET_ACTIVITIES
);
Bundle metadata = activityInfo.metaData;
int splashScreenId = metadata != null ? metadata.getInt(SPLASH_SCREEN_META_DATA_KEY) : null;
int splashScreenId = metadata != null ? metadata.getInt(SPLASH_SCREEN_META_DATA_KEY) : 0;
return splashScreenId != 0
? Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP
? getResources().getDrawable(splashScreenId, getTheme())