Commit 7a28edc0 authored by nightfallsad's avatar nightfallsad

FIX get splashScreenId issue

parent db9b1ea2
......@@ -195,7 +195,7 @@ public class BoostFlutterActivity extends Activity
);
Bundle metadata = activityInfo.metaData;
Integer splashScreenId = metadata != null ? metadata.getInt(SPLASH_SCREEN_META_DATA_KEY) : null;
return splashScreenId != null
return (splashScreenId != null && splashScreenId > 0)
? Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP
? getResources().getDrawable(splashScreenId, getTheme())
: getResources().getDrawable(splashScreenId)
......
......@@ -114,7 +114,7 @@ public class FlutterFragmentPageActivity extends AppCompatActivity implements Vi
);
Bundle metadata = activityInfo.metaData;
Integer splashScreenId = metadata != null ? metadata.getInt(SPLASH_SCREEN_META_DATA_KEY) : null;
return splashScreenId != null
return (splashScreenId != null && splashScreenId > 0)
? Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP
? getResources().getDrawable(splashScreenId, getTheme())
: getResources().getDrawable(splashScreenId)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment