Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -23086,6 +23086,7 @@ package android.os { field public static final java.lang.String DISALLOW_OUTGOING_BEAM = "no_outgoing_beam"; field public static final java.lang.String DISALLOW_OUTGOING_CALLS = "no_outgoing_calls"; field public static final java.lang.String DISALLOW_REMOVE_USER = "no_remove_user"; field public static final java.lang.String DISALLOW_SAFE_BOOT = "no_safe_boot"; field public static final java.lang.String DISALLOW_SHARE_LOCATION = "no_share_location"; field public static final java.lang.String DISALLOW_SMS = "no_sms"; field public static final java.lang.String DISALLOW_UNINSTALL_APPS = "no_uninstall_apps"; api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -24881,6 +24881,7 @@ package android.os { field public static final java.lang.String DISALLOW_OUTGOING_BEAM = "no_outgoing_beam"; field public static final java.lang.String DISALLOW_OUTGOING_CALLS = "no_outgoing_calls"; field public static final java.lang.String DISALLOW_REMOVE_USER = "no_remove_user"; field public static final java.lang.String DISALLOW_SAFE_BOOT = "no_safe_boot"; field public static final java.lang.String DISALLOW_SHARE_LOCATION = "no_share_location"; field public static final java.lang.String DISALLOW_SMS = "no_sms"; field public static final java.lang.String DISALLOW_UNINSTALL_APPS = "no_uninstall_apps"; core/java/android/os/UserManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -399,6 +399,18 @@ public class UserManager { */ public static final String DISALLOW_WALLPAPER = "no_wallpaper"; /** * Specifies if the user is not allowed to reboot the device into safe boot mode. * This can only be set by device owners and profile owners on the primary user. * The default value is <code>false</code>. * * <p/>Key for user restrictions. * <p/>Type: Boolean * @see #setUserRestrictions(Bundle) * @see #getUserRestrictions() */ public static final String DISALLOW_SAFE_BOOT = "no_safe_boot"; /** * Application restriction key that is used to indicate the pending arrival * of real restrictions for the app. Loading services/core/java/com/android/server/pm/UserManagerService.java +2 −0 Original line number Diff line number Diff line Loading @@ -918,6 +918,7 @@ public class UserManagerService extends IUserManager.Stub { writeBoolean(serializer, restrictions, UserManager.DISALLOW_CROSS_PROFILE_COPY_PASTE); writeBoolean(serializer, restrictions, UserManager.DISALLOW_OUTGOING_BEAM); writeBoolean(serializer, restrictions, UserManager.DISALLOW_WALLPAPER); writeBoolean(serializer, restrictions, UserManager.DISALLOW_SAFE_BOOT); serializer.endTag(null, TAG_RESTRICTIONS); } Loading Loading @@ -1065,6 +1066,7 @@ public class UserManagerService extends IUserManager.Stub { readBoolean(parser, restrictions, UserManager.DISALLOW_CROSS_PROFILE_COPY_PASTE); readBoolean(parser, restrictions, UserManager.DISALLOW_OUTGOING_BEAM); readBoolean(parser, restrictions, UserManager.DISALLOW_WALLPAPER); readBoolean(parser, restrictions, UserManager.DISALLOW_SAFE_BOOT); } private void readBoolean(XmlPullParser parser, Bundle restrictions, Loading services/core/java/com/android/server/policy/GlobalActions.java +6 −2 Original line number Diff line number Diff line Loading @@ -342,9 +342,13 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac @Override public boolean onLongPress() { UserManager um = (UserManager) mContext.getSystemService(Context.USER_SERVICE); if (!um.hasUserRestriction(UserManager.DISALLOW_SAFE_BOOT)) { mWindowManagerFuncs.rebootSafeMode(true); return true; } return false; } @Override public boolean showDuringKeyguard() { Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -23086,6 +23086,7 @@ package android.os { field public static final java.lang.String DISALLOW_OUTGOING_BEAM = "no_outgoing_beam"; field public static final java.lang.String DISALLOW_OUTGOING_CALLS = "no_outgoing_calls"; field public static final java.lang.String DISALLOW_REMOVE_USER = "no_remove_user"; field public static final java.lang.String DISALLOW_SAFE_BOOT = "no_safe_boot"; field public static final java.lang.String DISALLOW_SHARE_LOCATION = "no_share_location"; field public static final java.lang.String DISALLOW_SMS = "no_sms"; field public static final java.lang.String DISALLOW_UNINSTALL_APPS = "no_uninstall_apps";
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -24881,6 +24881,7 @@ package android.os { field public static final java.lang.String DISALLOW_OUTGOING_BEAM = "no_outgoing_beam"; field public static final java.lang.String DISALLOW_OUTGOING_CALLS = "no_outgoing_calls"; field public static final java.lang.String DISALLOW_REMOVE_USER = "no_remove_user"; field public static final java.lang.String DISALLOW_SAFE_BOOT = "no_safe_boot"; field public static final java.lang.String DISALLOW_SHARE_LOCATION = "no_share_location"; field public static final java.lang.String DISALLOW_SMS = "no_sms"; field public static final java.lang.String DISALLOW_UNINSTALL_APPS = "no_uninstall_apps";
core/java/android/os/UserManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -399,6 +399,18 @@ public class UserManager { */ public static final String DISALLOW_WALLPAPER = "no_wallpaper"; /** * Specifies if the user is not allowed to reboot the device into safe boot mode. * This can only be set by device owners and profile owners on the primary user. * The default value is <code>false</code>. * * <p/>Key for user restrictions. * <p/>Type: Boolean * @see #setUserRestrictions(Bundle) * @see #getUserRestrictions() */ public static final String DISALLOW_SAFE_BOOT = "no_safe_boot"; /** * Application restriction key that is used to indicate the pending arrival * of real restrictions for the app. Loading
services/core/java/com/android/server/pm/UserManagerService.java +2 −0 Original line number Diff line number Diff line Loading @@ -918,6 +918,7 @@ public class UserManagerService extends IUserManager.Stub { writeBoolean(serializer, restrictions, UserManager.DISALLOW_CROSS_PROFILE_COPY_PASTE); writeBoolean(serializer, restrictions, UserManager.DISALLOW_OUTGOING_BEAM); writeBoolean(serializer, restrictions, UserManager.DISALLOW_WALLPAPER); writeBoolean(serializer, restrictions, UserManager.DISALLOW_SAFE_BOOT); serializer.endTag(null, TAG_RESTRICTIONS); } Loading Loading @@ -1065,6 +1066,7 @@ public class UserManagerService extends IUserManager.Stub { readBoolean(parser, restrictions, UserManager.DISALLOW_CROSS_PROFILE_COPY_PASTE); readBoolean(parser, restrictions, UserManager.DISALLOW_OUTGOING_BEAM); readBoolean(parser, restrictions, UserManager.DISALLOW_WALLPAPER); readBoolean(parser, restrictions, UserManager.DISALLOW_SAFE_BOOT); } private void readBoolean(XmlPullParser parser, Bundle restrictions, Loading
services/core/java/com/android/server/policy/GlobalActions.java +6 −2 Original line number Diff line number Diff line Loading @@ -342,9 +342,13 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac @Override public boolean onLongPress() { UserManager um = (UserManager) mContext.getSystemService(Context.USER_SERVICE); if (!um.hasUserRestriction(UserManager.DISALLOW_SAFE_BOOT)) { mWindowManagerFuncs.rebootSafeMode(true); return true; } return false; } @Override public boolean showDuringKeyguard() { Loading