Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46bc4ebb authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Rename isUserRestricted to isUserLimited

Avoid confusion with user restrictions which can be applied to
non-limited users as well.

Updated the java docs.

Change-Id: I4097c50b528b01a49cebcb0832d09f2b06998faa
parent ce70311b
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -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 {
+5 −6
Original line number Diff line number Diff line
@@ -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;
        }
    }