mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-10-16 12:49:48 +00:00
Use Intent rather than global variable
This commit is contained in:
@@ -50,7 +50,7 @@ public class MainActivity extends BaseActivity
|
||||
|
||||
@Override
|
||||
protected void onCreate(final Bundle savedInstanceState) {
|
||||
if (!app.init) {
|
||||
if (!getIntent().getBooleanExtra(Const.Key.FROM_SPLASH, false)) {
|
||||
startActivity(new Intent(this, ClassMap.get(SplashActivity.class)));
|
||||
finish();
|
||||
}
|
||||
|
@@ -58,10 +58,9 @@ public class SplashActivity extends BaseActivity {
|
||||
new UpdateRepos().exec();
|
||||
}
|
||||
|
||||
app.init = true;
|
||||
|
||||
Intent intent = new Intent(this, ClassMap.get(MainActivity.class));
|
||||
intent.putExtra(Const.Key.OPEN_SECTION, getIntent().getStringExtra(Const.Key.OPEN_SECTION));
|
||||
intent.putExtra(Const.Key.FROM_SPLASH, true);
|
||||
intent.putExtra(BaseActivity.INTENT_PERM, getIntent().getStringExtra(BaseActivity.INTENT_PERM));
|
||||
startActivity(intent);
|
||||
finish();
|
||||
|
Reference in New Issue
Block a user