AppInstaller: Always use intent based uninstallation of apps

This requests user's confirmation before uninstallation every time which
is what we want to happen as well.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2024-01-20 15:12:57 +05:30
parent b46d232956
commit 859d32d878
8 changed files with 21 additions and 156 deletions

View File

@@ -40,13 +40,3 @@ inline fun <reified T : Context> Context.newIntent(flags: Int, extras: Bundle):
intent.putExtras(extras)
return intent
}
fun Intent.applyUninstallActionCompat() {
if (isPAndAbove()) {
action = Intent.ACTION_DELETE
} else {
@Suppress("DEPRECATION")
action = Intent.ACTION_UNINSTALL_PACKAGE
putExtra(Intent.EXTRA_RETURN_RESULT, true)
}
}