Merge "Fix a security exception when checking cross-profile caller-id cap." into lmp-dev

This commit is contained in:
Amith Yamasani
2014-07-22 00:09:25 +00:00
committed by Android (Google) Code Review

View File

@@ -4030,7 +4030,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
@Override
public boolean getCrossProfileCallerIdDisabledForUser(int userId) {
enforceSystemProcess("getCrossProfileCallerIdDisabled can only be called by system");
// TODO: Should there be a check to make sure this relationship is within a profile group?
//enforceSystemProcess("getCrossProfileCallerIdDisabled can only be called by system");
synchronized (this) {
ActiveAdmin admin = getProfileOwnerAdmin(userId);
return (admin != null) ? admin.disableCallerId : false;