Skip to content

Commit 64270c1

Browse files
committed
Remove launch mode, add method clearTaskOnLaunch
1 parent b2ca5dc commit 64270c1

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

omegalauncherslib/src/main/java/com/omegar/libs/omegalaunchers/ActivityLauncher.kt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ class ActivityLauncher(
5151
flags = flags and (flag.inv())
5252
}
5353

54-
fun setLaunchMode(mode: LaunchMode) = apply {
55-
flags = mode.flags
54+
fun clearTaskOnLaunch() = apply {
55+
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
5656
}
5757

5858
fun isOurActivity(activity: Activity): Boolean {
@@ -91,12 +91,6 @@ class ActivityLauncher(
9191

9292
}
9393

94-
enum class LaunchMode(val flags: Int) {
95-
SINGLE_TASK(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK),
96-
SINGLE_TOP(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_SINGLE_TOP),
97-
STANDART(0)
98-
}
99-
10094
}
10195

10296
@Suppress("UNCHECKED_CAST")

0 commit comments

Comments
 (0)