mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 05:44:51 +02:00
Added restart reasons
This commit is contained in:
@@ -298,7 +298,7 @@ public class ApplicationEx extends Application
|
||||
case "language": // misc
|
||||
case "wal": // misc
|
||||
// Should be excluded for import
|
||||
restart(this);
|
||||
restart(this, key);
|
||||
break;
|
||||
case "debug":
|
||||
case "log_level":
|
||||
@@ -310,7 +310,8 @@ public class ApplicationEx extends Application
|
||||
}
|
||||
}
|
||||
|
||||
static void restart(Context context) {
|
||||
static void restart(Context context, String reason) {
|
||||
Log.i("Restart because " + reason);
|
||||
Intent intent = new Intent(context, ActivityMain.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
context.startActivity(intent);
|
||||
|
||||
Reference in New Issue
Block a user