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: wangmingming1 <wangmingming1@xiaomi.com>
This commit is contained in:
committed by
Philip P. Moltmann
parent
03cdc95f1c
commit
0f8da1c877
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user