Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f8da1c8 authored by wangmingming1's avatar wangmingming1 Committed by Philip P. Moltmann
Browse files

don't block adb while running uninstall



Test: Manual
      1. setup a work profile
      2. set a uninstall restriction on foo app for the work profile
         by calling set DevicePolicyManager.setUninstallBlocked()
      3. observe adb uninstallation can return with 'DELETE_FAILED_OWNER_BLOCKED'
         message without blocking forever by using the following command line:
         `adb uninstall --user user-id-of-work-profile com.foo`
Test: Manual
      1. install lots of apks via adb
      2. uninstall apks via adb

Change-Id: I68706782ae547250433e3dd8ff285d4932473033
Merged-In: If89978c5a79ef998bde55c254ced4b6a3ff6e645
Signed-off-by: default avatarwangmingming1 <wangmingming1@xiaomi.com>
parent 03cdc95f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.WeakHashMap;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;

class PackageManagerShellCommand extends ShellCommand {
@@ -1750,7 +1750,7 @@ class PackageManagerShellCommand extends ShellCommand {
    }

    private static class LocalIntentReceiver {
        private final SynchronousQueue<Intent> mResult = new SynchronousQueue<>();
        private final LinkedBlockingQueue<Intent> mResult = new LinkedBlockingQueue<>();

        private IIntentSender.Stub mLocalSender = new IIntentSender.Stub() {
            @Override