Merge "Fix NPE in streamin policy getters."
This commit is contained in:
@@ -7960,13 +7960,11 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
|
||||
Preconditions.checkCallAuthorization(hasCrossUsersPermission(caller, userId));
|
||||
|
||||
synchronized (getLockObject()) {
|
||||
if (mOwners.hasProfileOwner(userId) || mOwners.hasDeviceOwner()) {
|
||||
final ActiveAdmin admin = getDeviceOrProfileOwnerAdminLocked(userId);
|
||||
return admin.mNearbyNotificationStreamingPolicy;
|
||||
}
|
||||
final ActiveAdmin admin = getDeviceOrProfileOwnerAdminLocked(userId);
|
||||
return admin != null
|
||||
? admin.mNearbyNotificationStreamingPolicy
|
||||
: NEARBY_STREAMING_NOT_CONTROLLED_BY_POLICY;
|
||||
}
|
||||
|
||||
return NEARBY_STREAMING_NOT_CONTROLLED_BY_POLICY;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -8001,13 +7999,11 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
|
||||
Preconditions.checkCallAuthorization(hasCrossUsersPermission(caller, userId));
|
||||
|
||||
synchronized (getLockObject()) {
|
||||
if (mOwners.hasProfileOwner(userId) || mOwners.hasDeviceOwner()) {
|
||||
final ActiveAdmin admin = getDeviceOrProfileOwnerAdminLocked(userId);
|
||||
return admin.mNearbyAppStreamingPolicy;
|
||||
}
|
||||
final ActiveAdmin admin = getDeviceOrProfileOwnerAdminLocked(userId);
|
||||
return admin != null
|
||||
? admin.mNearbyAppStreamingPolicy
|
||||
: NEARBY_STREAMING_NOT_CONTROLLED_BY_POLICY;
|
||||
}
|
||||
|
||||
return NEARBY_STREAMING_NOT_CONTROLLED_BY_POLICY;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user