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

Commit f12f4454 authored by Stephanie Bak's avatar Stephanie Bak Committed by Android (Google) Code Review
Browse files

Merge "Adding a new user restriction DISALLOW_SHARING_ADMIN_CONFIGURED_WIFI"

parents ff92c7eb b75ad62d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -32393,6 +32393,7 @@ package android.os {
    field public static final String DISALLOW_SET_WALLPAPER = "no_set_wallpaper";
    field public static final String DISALLOW_SHARE_INTO_MANAGED_PROFILE = "no_sharing_into_profile";
    field public static final String DISALLOW_SHARE_LOCATION = "no_share_location";
    field public static final String DISALLOW_SHARING_ADMIN_CONFIGURED_WIFI = "no_sharing_admin_configured_wifi";
    field public static final String DISALLOW_SMS = "no_sms";
    field public static final String DISALLOW_SYSTEM_ERROR_DIALOGS = "no_system_error_dialogs";
    field public static final String DISALLOW_UNIFIED_PASSWORD = "no_unified_password";
+22 −0
Original line number Diff line number Diff line
@@ -307,6 +307,25 @@ public class UserManager {
     */
    public static final String DISALLOW_WIFI_TETHERING = "no_wifi_tethering";

    /**
     * Specifies if users are disallowed from sharing Wi-Fi for admin configured networks.
     *
     * <p>Device owner and profile owner can set this restriction.
     * When it is set by any of these owners, it prevents all users from
     * sharing Wi-Fi for networks configured by these owners.
     * Other networks not configured by these owners are not affected.
     *
     * <p>The default value is <code>false</code>.
     *
     * <p>Key for user restrictions.
     * <p>Type: Boolean
     * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
     * @see DevicePolicyManager#clearUserRestriction(ComponentName, String)
     * @see #getUserRestrictions()
     */
    public static final String DISALLOW_SHARING_ADMIN_CONFIGURED_WIFI =
            "no_sharing_admin_configured_wifi";

    /**
     * Specifies if a user is disallowed from changing the device
     * language. The default value is <code>false</code>.
@@ -1478,6 +1497,9 @@ public class UserManager {
            DISALLOW_CAMERA_TOGGLE,
            KEY_RESTRICTIONS_PENDING,
            DISALLOW_BIOMETRIC,
            DISALLOW_CHANGE_WIFI_STATE,
            DISALLOW_WIFI_TETHERING,
            DISALLOW_SHARING_ADMIN_CONFIGURED_WIFI,
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface UserRestrictionKey {}
+3 −1
Original line number Diff line number Diff line
@@ -142,7 +142,9 @@ public class UserRestrictionsUtils {
            UserManager.DISALLOW_MICROPHONE_TOGGLE,
            UserManager.DISALLOW_CAMERA_TOGGLE,
            UserManager.DISALLOW_CHANGE_WIFI_STATE,
            UserManager.DISALLOW_WIFI_TETHERING
            UserManager.DISALLOW_WIFI_TETHERING,
            UserManager.DISALLOW_SHARING_ADMIN_CONFIGURED_WIFI

    });

    public static final Set<String> DEPRECATED_USER_RESTRICTIONS = Sets.newArraySet(