OSDN Git Service

Unhide UserManager.hasUserRestriction().
authorJulia Reynolds <juliacr@google.com>
Fri, 6 Jun 2014 15:41:04 +0000 (11:41 -0400)
committerJulia Reynolds <juliacr@google.com>
Fri, 6 Jun 2014 20:41:11 +0000 (16:41 -0400)
Bug: 15466331
Change-Id: I83a0a77ffcb9781ec0517aed219ee9012137676f

api/current.txt
core/java/android/os/UserManager.java

index 8a5f1df..86d2256 100644 (file)
@@ -21717,6 +21717,7 @@ package android.os {
     method public java.util.List<android.os.UserHandle> getUserProfiles();
     method public android.os.Bundle getUserRestrictions();
     method public android.os.Bundle getUserRestrictions(android.os.UserHandle);
+    method public boolean hasUserRestriction(java.lang.String);
     method public boolean isUserAGoat();
     method public boolean isUserRunning(android.os.UserHandle);
     method public boolean isUserRunningOrStopping(android.os.UserHandle);
index ee219e3..ad30a58 100644 (file)
@@ -481,10 +481,11 @@ public class UserManager {
     }
 
     /**
-     * @hide
      * Returns whether the current user has been disallowed from performing certain actions
      * or setting certain settings.
-     * @param restrictionKey the string key representing the restriction
+     *
+     * @param restrictionKey The string key representing the restriction.
+     * @return {@code true} if the current user has the given restriction, {@code false} otherwise.
      */
     public boolean hasUserRestriction(String restrictionKey) {
         return hasUserRestriction(restrictionKey, Process.myUserHandle());