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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user