diff options
| -rw-r--r-- | api/current.txt | 7 | ||||
| -rw-r--r-- | core/java/android/os/UserManager.java | 11 |
2 files changed, 8 insertions, 10 deletions
diff --git a/api/current.txt b/api/current.txt index 3f04078d471e..7989b69a123f 100644 --- a/api/current.txt +++ b/api/current.txt @@ -17075,23 +17075,22 @@ package android.os { method public android.os.Bundle getUserRestrictions(); method public android.os.Bundle getUserRestrictions(android.os.UserHandle); method public boolean isUserAGoat(); - method public boolean isUserRestricted(); + method public boolean isUserLimited(); method public boolean isUserRunning(android.os.UserHandle); method public boolean isUserRunningOrStopping(android.os.UserHandle); method public void setUserRestriction(java.lang.String, boolean); method public void setUserRestrictions(android.os.Bundle); method public void setUserRestrictions(android.os.Bundle, android.os.UserHandle); field public static final java.lang.String DISALLOW_CONFIG_BLUETOOTH = "no_config_bluetooth"; + field public static final java.lang.String DISALLOW_CONFIG_CREDENTIALS = "no_config_credentials"; field public static final java.lang.String DISALLOW_CONFIG_WIFI = "no_config_wifi"; field public static final java.lang.String DISALLOW_INSTALL_APPS = "no_install_apps"; field public static final java.lang.String DISALLOW_INSTALL_UNKNOWN_SOURCES = "no_install_unknown_sources"; field public static final java.lang.String DISALLOW_MODIFY_ACCOUNTS = "no_modify_accounts"; + field public static final java.lang.String DISALLOW_REMOVE_USER = "no_remove_user"; field public static final java.lang.String DISALLOW_SHARE_LOCATION = "no_share_location"; field public static final java.lang.String DISALLOW_UNINSTALL_APPS = "no_uninstall_apps"; field public static final java.lang.String DISALLOW_USB_FILE_TRANSFER = "no_usb_file_transfer"; - field public static final java.lang.String DISALLOW_CONFIG_CREDENTIALS = "no_config_credentials"; - field public static final java.lang.String DISALLOW_REMOVE_USER = "no_remove_user"; - } public abstract class Vibrator { diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java index e08c6ea7b403..c61bf840af61 100644 --- a/core/java/android/os/UserManager.java +++ b/core/java/android/os/UserManager.java @@ -198,16 +198,15 @@ public class UserManager { } /** - * Used to check if the user making this call is a restricted user. Restricted users may have - * application restrictions imposed on them. All apps should default to the most restrictive - * version, unless they have specific restrictions available through a call to - * {@link Context#getApplicationRestrictions()}. + * Used to check if the user making this call is a limited user. Limited users may have + * a reduced number of available apps, app restrictions and account restrictions. + * @return whether the user making this call is a limited user */ - public boolean isUserRestricted() { + public boolean isUserLimited() { try { return mService.isRestricted(); } catch (RemoteException re) { - Log.w(TAG, "Could not check if user restricted ", re); + Log.w(TAG, "Could not check if user is limited ", re); return false; } } |