Implement DISALLOW_ULTRA_WIDEBAND_RADIO AE user restriction

Ultra-wideband (UWB) is a radio technology that can use a very low
energy level for short-range, high-bandwidth communications over a
large portion of the radio spectrum. This CL adds a user restriction
for disallowing UWB on a device. A user restriction is needed for
NIAP (Common Criteria) certification (see b/239714441). One of the
requirements for the certification is to be able to enable/disable
all the radios.

Bug: 239714441
Test: m; manual testing with testDPC;
Change-Id: Icfa16258cc789c337417c2e96a4e0c37d0030d55
This commit is contained in:
Ante
2022-10-18 16:25:21 +00:00
committed by Roshan Pius
parent 1b7a1f0967
commit 6ee8817cf7
3 changed files with 32 additions and 3 deletions

View File

@@ -32615,6 +32615,7 @@ package android.os {
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_ULTRA_WIDEBAND_RADIO = "no_ultra_wideband_radio";
field public static final String DISALLOW_UNIFIED_PASSWORD = "no_unified_password";
field public static final String DISALLOW_UNINSTALL_APPS = "no_uninstall_apps";
field public static final String DISALLOW_UNMUTE_MICROPHONE = "no_unmute_microphone";

View File

@@ -1505,6 +1505,30 @@ public class UserManager {
*/
public static final String DISALLOW_CELLULAR_2G = "no_cellular_2g";
/**
* This user restriction specifies if Ultra-wideband is disallowed on the device. If
* Ultra-wideband is disallowed it cannot be turned on via Settings.
*
* <p>This restriction can only be set by a device owner or a profile owner of an
* organization-owned managed profile on the parent profile.
* In both cases, the restriction applies globally on the device and will turn off the
* ultra-wideband radio if it's currently on and prevent the radio from being turned on in
* the future.
*
* <p>
* Ultra-wideband (UWB) is a radio technology that can use a very low energy level
* for short-range, high-bandwidth communications over a large portion of the radio spectrum.
*
* <p>Default 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_ULTRA_WIDEBAND_RADIO = "no_ultra_wideband_radio";
/**
* List of key values that can be passed into the various user restriction related methods
* in {@link UserManager} & {@link DevicePolicyManager}.
@@ -1587,6 +1611,7 @@ public class UserManager {
DISALLOW_WIFI_DIRECT,
DISALLOW_ADD_WIFI_CONFIG,
DISALLOW_CELLULAR_2G,
DISALLOW_ULTRA_WIDEBAND_RADIO,
})
@Retention(RetentionPolicy.SOURCE)
public @interface UserRestrictionKey {}

View File

@@ -148,7 +148,8 @@ public class UserRestrictionsUtils {
UserManager.DISALLOW_SHARING_ADMIN_CONFIGURED_WIFI,
UserManager.DISALLOW_WIFI_DIRECT,
UserManager.DISALLOW_ADD_WIFI_CONFIG,
UserManager.DISALLOW_CELLULAR_2G
UserManager.DISALLOW_CELLULAR_2G,
UserManager.DISALLOW_ULTRA_WIDEBAND_RADIO
});
public static final Set<String> DEPRECATED_USER_RESTRICTIONS = Sets.newArraySet(
@@ -197,7 +198,8 @@ public class UserRestrictionsUtils {
UserManager.DISALLOW_WIFI_TETHERING,
UserManager.DISALLOW_WIFI_DIRECT,
UserManager.DISALLOW_ADD_WIFI_CONFIG,
UserManager.DISALLOW_CELLULAR_2G
UserManager.DISALLOW_CELLULAR_2G,
UserManager.DISALLOW_ULTRA_WIDEBAND_RADIO
);
/**
@@ -237,7 +239,8 @@ public class UserRestrictionsUtils {
UserManager.DISALLOW_WIFI_TETHERING,
UserManager.DISALLOW_WIFI_DIRECT,
UserManager.DISALLOW_ADD_WIFI_CONFIG,
UserManager.DISALLOW_CELLULAR_2G
UserManager.DISALLOW_CELLULAR_2G,
UserManager.DISALLOW_ULTRA_WIDEBAND_RADIO
);
/**