Fix crash

This commit is contained in:
MM20 2022-05-03 19:45:26 +02:00
parent 2bd55a00ad
commit 112a8cfc8f
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -107,7 +107,7 @@ class AppItemVM(
context.startActivity(Intent.createChooser(shareIntent, null))
}
val canUninstall = app.flags and ApplicationInfo.FLAG_SYSTEM == 0 && (app as LauncherApp).getUser() == Process.myUserHandle()
val canUninstall = app.flags and ApplicationInfo.FLAG_SYSTEM == 0 && (app as? LauncherApp)?.getUser() == Process.myUserHandle()
fun uninstall(context: Context) {
val intent = Intent(Intent.ACTION_DELETE)