Use activity options in debug mode only

pull/204/head
M66B 3 years ago
parent b5394a77ab
commit fc8a553762

@ -152,13 +152,13 @@ public class ActivityMain extends ActivityBase implements FragmentManager.OnBack
@Override
protected void onExecuted(Bundle args, Boolean hasAccounts) {
Bundle options;
Bundle options = null;
try {
if (BuildConfig.DEBUG)
options = ActivityOptions.makeCustomAnimation(ActivityMain.this,
R.anim.activity_open_enter, 0).toBundle();
} catch (Throwable ex) {
Log.e(ex);
options = new Bundle();
}
if (hasAccounts) {
@ -167,12 +167,7 @@ public class ActivityMain extends ActivityBase implements FragmentManager.OnBack
Intent saved = args.getParcelable("intent");
if (saved == null) {
try {
startActivity(view, options);
} catch (Throwable ex) {
Log.e(ex);
startActivity(view);
}
if (sync_on_launch)
ServiceUI.sync(ActivityMain.this, null);
} else
@ -193,12 +188,7 @@ public class ActivityMain extends ActivityBase implements FragmentManager.OnBack
} else {
Intent setup = new Intent(ActivityMain.this, ActivitySetup.class)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
try {
startActivity(setup, options);
} catch (Throwable ex) {
Log.e(ex);
startActivity(setup);
}
}
long end = new Date().getTime();

Loading…
Cancel
Save