Merge "Acquire lock before calling getDeviceOwnerAdminLocked" into pi-dev am: b9ab72bf96
am: fc9dd7c67b
Change-Id: I08f626298bd0d58cfa55b3e731e08eb22242e181
This commit is contained in:
@@ -5526,9 +5526,11 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
|
||||
// If there is a profile owner, redirect to that; otherwise query the device owner.
|
||||
ComponentName aliasChooser = getProfileOwner(caller.getIdentifier());
|
||||
if (aliasChooser == null && caller.isSystem()) {
|
||||
ActiveAdmin deviceOwnerAdmin = getDeviceOwnerAdminLocked();
|
||||
if (deviceOwnerAdmin != null) {
|
||||
aliasChooser = deviceOwnerAdmin.info.getComponent();
|
||||
synchronized (getLockObject()) {
|
||||
final ActiveAdmin deviceOwnerAdmin = getDeviceOwnerAdminLocked();
|
||||
if (deviceOwnerAdmin != null) {
|
||||
aliasChooser = deviceOwnerAdmin.info.getComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (aliasChooser == null) {
|
||||
|
||||
Reference in New Issue
Block a user