am 23439bb9: am bab7ceaf: am d50ec637: Merge "Create DPM APIs for cross profile callerId" into lmp-dev

* commit '23439bb9f3edcd2191aff79d57018ddaf2d74847':
  Create DPM APIs for cross profile callerId
This commit is contained in:
Adam Connors
2014-07-17 21:05:08 +00:00
committed by Android Git Automerger
4 changed files with 126 additions and 0 deletions

View File

@@ -2269,6 +2269,45 @@ public class DevicePolicyManager {
}
}
/**
* Called by a profile owner to set whether caller-Id information from the managed
* profile will be shown for incoming calls.
*
* <p>The calling device admin must be a profile owner. If it is not, a
* security exception will be thrown.
*
* @param who Which {@link DeviceAdminReceiver} this request is associated with.
* @param disabled If true caller-Id information in the managed profile is not displayed.
*/
public void setCrossProfileCallerIdDisabled(ComponentName who, boolean disabled) {
if (mService != null) {
try {
mService.setCrossProfileCallerIdDisabled(who, disabled);
} catch (RemoteException e) {
Log.w(TAG, "Failed talking with device policy service", e);
}
}
}
/**
* Determine whether or not caller-Id information has been disabled.
*
* <p>The calling device admin must be a profile owner. If it is not, a
* security exception will be thrown.
*
* @param who Which {@link DeviceAdminReceiver} this request is associated with.
*/
public boolean getCrossProfileCallerIdDisabled(ComponentName who) {
if (mService != null) {
try {
return mService.getCrossProfileCallerIdDisabled(who);
} catch (RemoteException e) {
Log.w(TAG, "Failed talking with device policy service", e);
}
}
return false;
}
/**
* Called by the profile owner so that some intents sent in the managed profile can also be
* resolved in the parent, or vice versa.

View File

@@ -162,4 +162,8 @@ interface IDevicePolicyManager {
void setBlockUninstall(in ComponentName admin, in String packageName, boolean blockUninstall);
boolean getBlockUninstall(in ComponentName admin, in String packageName);
void setCrossProfileCallerIdDisabled(in ComponentName who, boolean disabled);
boolean getCrossProfileCallerIdDisabled(in ComponentName who);
boolean getCrossProfileCallerIdDisabledForUser(int userId);
}