OSDN Git Service

Allow PO to check if it is in a managed profile.
authorKenny Guy <kennyguy@google.com>
Thu, 31 Mar 2016 15:40:57 +0000 (16:40 +0100)
committerKenny Guy <kennyguy@google.com>
Thu, 31 Mar 2016 15:40:57 +0000 (16:40 +0100)
Method was @hide because we only intended to add
managed users in a later release, however we added
createAndManageUser which allows it.

Bug: 27261765
Change-Id: I029f8ef35a3065f7fc598b5f854c8d8cdc9c555d

api/current.txt
api/system-current.txt
api/test-current.txt
core/java/android/app/admin/DevicePolicyManager.java

index c81284b..c97573d 100644 (file)
@@ -5900,6 +5900,7 @@ package android.app.admin {
     method public boolean isCallerApplicationRestrictionsManagingPackage();
     method public boolean isDeviceOwnerApp(java.lang.String);
     method public boolean isLockTaskPermitted(java.lang.String);
+    method public boolean isManagedProfile(android.content.ComponentName);
     method public boolean isMasterVolumeMuted(android.content.ComponentName);
     method public boolean isProfileOwnerApp(java.lang.String);
     method public boolean isProvisioningAllowed(java.lang.String);
index 071d1f1..dec80c8 100644 (file)
@@ -6046,6 +6046,7 @@ package android.app.admin {
     method public boolean isCallerApplicationRestrictionsManagingPackage();
     method public boolean isDeviceOwnerApp(java.lang.String);
     method public boolean isLockTaskPermitted(java.lang.String);
+    method public boolean isManagedProfile(android.content.ComponentName);
     method public boolean isMasterVolumeMuted(android.content.ComponentName);
     method public boolean isProfileOwnerApp(java.lang.String);
     method public boolean isProvisioningAllowed(java.lang.String);
index 8216146..8fa75e0 100644 (file)
@@ -5904,6 +5904,7 @@ package android.app.admin {
     method public boolean isCallerApplicationRestrictionsManagingPackage();
     method public boolean isDeviceOwnerApp(java.lang.String);
     method public boolean isLockTaskPermitted(java.lang.String);
+    method public boolean isManagedProfile(android.content.ComponentName);
     method public boolean isMasterVolumeMuted(android.content.ComponentName);
     method public boolean isProfileOwnerApp(java.lang.String);
     method public boolean isProvisioningAllowed(java.lang.String);
index e1afb17..9cf431e 100644 (file)
@@ -5588,10 +5588,9 @@ public class DevicePolicyManager {
     }
 
     /**
-     * @hide
      * Return if this user is a managed profile of another user. An admin can become the profile
      * owner of a managed profile with {@link #ACTION_PROVISION_MANAGED_PROFILE} and of a managed
-     * user with {@link #ACTION_PROVISION_MANAGED_USER}.
+     * user with {@link #createAndManageUser}
      * @param admin Which profile owner this request is associated with.
      * @return if this user is a managed profile of another user.
      */