[core] Fix uninstall (#1176)

This commit is contained in:
LoveSy 2021-09-26 00:32:22 +08:00 committed by GitHub
parent d08191a005
commit 03deb22202
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -237,7 +237,7 @@ public class PackageService {
CountDownLatch latch = new CountDownLatch(1);
final boolean[] result = {false};
var flag = userId == -1 ? 0x00000002 : 0; //PackageManager.DELETE_ALL_USERS = 0x00000002; UserHandle ALL = new UserHandle(-1);
pm.getPackageInstaller().uninstall(versionedPackage, null, flag, new IntentSenderAdaptor() {
pm.getPackageInstaller().uninstall(versionedPackage, "android", flag, new IntentSenderAdaptor() {
@Override
public void send(Intent intent) {
int status = intent.getIntExtra(PackageInstaller.EXTRA_STATUS, PackageInstaller.STATUS_FAILURE);