File tree 2 files changed +4
-5
lines changed
app/src/main/java/com/github/droidworksstudio/launcher
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,12 @@ object AppReloader {
12
12
val componentName = intent?.component
13
13
val mainIntent = Intent .makeRestartActivityTask(componentName)
14
14
mainIntent.flags = Intent .FLAG_ACTIVITY_CLEAR_TOP or Intent .FLAG_ACTIVITY_SINGLE_TOP
15
+ mainIntent.flags = Intent .FLAG_ACTIVITY_NEW_TASK
15
16
16
17
// Delay the restart slightly to ensure all current activities are finished
17
- Handler (Looper .getMainLooper()).post {
18
+ Handler (Looper .getMainLooper()).postDelayed( {
18
19
context.startActivity(mainIntent)
19
20
Runtime .getRuntime().exit(0 )
20
- }
21
+ }, 250 )
21
22
}
22
23
}
Original file line number Diff line number Diff line change @@ -391,9 +391,7 @@ class MainActivity : AppCompatActivity() {
391
391
}
392
392
}
393
393
applicationContext.showShortToast(getString(R .string.settings_reload_app_restore))
394
- Handler (Looper .getMainLooper()).postDelayed({
395
- AppReloader .restartApp(applicationContext)
396
- }, 500 )
394
+ AppReloader .restartApp(applicationContext)
397
395
}
398
396
399
397
Constants .BACKUP_WRITE -> {
You can’t perform that action at this time.
0 commit comments