Prevent crash

This commit is contained in:
M66B 2019-09-27 10:43:01 +02:00
parent 9e04411d32
commit 9e0bdc0799
1 changed files with 14 additions and 4 deletions

View File

@ -84,12 +84,22 @@ public class ActivityMain extends ActivityBase implements FragmentManager.OnBack
protected void onExecuted(Bundle args, Boolean hasAccounts) {
if (hasAccounts) {
Log.logBundle(args);
Intent view = args.containsKey("intent")
? args.getParcelable("intent")
: new Intent(ActivityMain.this, ActivityView.class);
Intent view = new Intent(ActivityMain.this, ActivityView.class);
if (ACTION_REFRESH.equals(getIntent().getAction()))
view.putExtra("refresh", true);
startActivity(view);
Intent saved = args.getParcelable("intent");
if (saved == null)
startActivity(view);
else
try {
startActivity(saved);
} catch (SecurityException ex) {
Log.w(ex);
startActivity(view);
}
ServiceSynchronize.watchdog(ActivityMain.this);
ServiceSend.watchdog(ActivityMain.this);
} else