Skip to content

Commit a9e55e2

Browse files
Refactor: Code Cleanup
Signed-off-by: HeCodes2Much <wayne6324@gmail.com>
1 parent acc34b2 commit a9e55e2

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
android:supportsRtl="true"
4040
android:theme="@style/Theme.Launcher"
4141
android:enableOnBackInvokedCallback="true"
42+
android:launchMode="singleTop"
43+
android:clearTaskOnLaunch="true"
4244
tools:targetApi="tiramisu">
4345
<activity
4446
android:name=".ui.activities.LauncherActivity"

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.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)
1415

1516
// Delay the restart slightly to ensure all current activities are finished
1617
Handler(Looper.getMainLooper()).post {

0 commit comments

Comments
 (0)