Skip to content

Commit ba5f5ef

Browse files
Fix: Fixed reload app bug.
Signed-off-by: HeCodes2Much <wayne6324@gmail.com>
1 parent ece8ebf commit ba5f5ef

File tree

1 file changed

+1
-0
lines changed
  • app/src/main/java/com/github/droidworksstudio/launcher/helper

1 file changed

+1
-0
lines changed

app/src/main/java/com/github/droidworksstudio/launcher/helper/AppReloader.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ object AppReloader {
1111
val intent = packageManager.getLaunchIntentForPackage(context.packageName)
1212
val componentName = intent?.component
1313
val mainIntent = Intent.makeRestartActivityTask(componentName)
14+
mainIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
1415
mainIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)
1516

1617
// Delay the restart slightly to ensure all current activities are finished

0 commit comments

Comments
 (0)