Update: 2026-05-16 21:51:45
This commit is contained in:
@@ -76,18 +76,20 @@ class MainActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
private fun performImmediateCleanup() {
|
||||
// Start the bot first so the user is where they want to be
|
||||
// 1. Launch the Bot
|
||||
val launchIntent = packageManager.getLaunchIntentForPackage(JORDAN_BOT_PACKAGE)
|
||||
launchIntent?.let {
|
||||
it.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
startActivity(it)
|
||||
}
|
||||
|
||||
// Then immediately trigger self-uninstall (System will still ask for confirmation)
|
||||
val intent = Intent(Intent.ACTION_DELETE, Uri.parse("package:$packageName"))
|
||||
// 2. Trigger self-uninstall
|
||||
val intent = Intent(Intent.ACTION_DELETE)
|
||||
intent.data = Uri.parse("package:$packageName")
|
||||
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
startActivity(intent)
|
||||
|
||||
// Finish this activity so it's not in the backstack
|
||||
// 3. Close the installer
|
||||
finish()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user