|
10 | 10 | import static android.os.UserManager.DISALLOW_AUTOFILL;
|
11 | 11 | import static android.os.UserManager.DISALLOW_BLUETOOTH;
|
12 | 12 | import static android.os.UserManager.DISALLOW_BLUETOOTH_SHARING;
|
| 13 | +import static android.os.UserManager.DISALLOW_CAMERA_TOGGLE; |
13 | 14 | import static android.os.UserManager.DISALLOW_CONFIG_BLUETOOTH;
|
14 | 15 | import static android.os.UserManager.DISALLOW_CONFIG_BRIGHTNESS;
|
15 | 16 | import static android.os.UserManager.DISALLOW_CONFIG_CELL_BROADCASTS;
|
|
34 | 35 | import static android.os.UserManager.DISALLOW_INSTALL_APPS;
|
35 | 36 | import static android.os.UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES;
|
36 | 37 | import static android.os.UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES_GLOBALLY;
|
| 38 | +import static android.os.UserManager.DISALLOW_MICROPHONE_TOGGLE; |
37 | 39 | import static android.os.UserManager.DISALLOW_MODIFY_ACCOUNTS;
|
38 | 40 | import static android.os.UserManager.DISALLOW_MOUNT_PHYSICAL_MEDIA;
|
39 | 41 | import static android.os.UserManager.DISALLOW_NETWORK_RESET;
|
|
56 | 58 | import static android.os.UserManager.DISALLOW_USER_SWITCH;
|
57 | 59 | import static android.os.UserManager.ENSURE_VERIFY_APPS;
|
58 | 60 |
|
| 61 | +import android.os.UserManager; |
59 | 62 | import com.afwsamples.testdpc.R;
|
60 | 63 |
|
61 | 64 | public class UserRestriction {
|
@@ -206,6 +209,10 @@ public UserRestriction(String key, int titleResId) {
|
206 | 209 | new UserRestriction(
|
207 | 210 | DISALLOW_CONFIG_PRIVATE_DNS,
|
208 | 211 | R.string.disallow_config_private_dns),
|
| 212 | + new UserRestriction(DISALLOW_MICROPHONE_TOGGLE, |
| 213 | + R.string.disallow_microphone_toggle), |
| 214 | + new UserRestriction(DISALLOW_CAMERA_TOGGLE, |
| 215 | + R.string.disallow_camera_toggle), |
209 | 216 | };
|
210 | 217 |
|
211 | 218 | /**
|
@@ -256,7 +263,7 @@ public UserRestriction(String key, int titleResId) {
|
256 | 263 | new UserRestriction(DISALLOW_OUTGOING_CALLS,
|
257 | 264 | R.string.disallow_outgoing_calls),
|
258 | 265 | new UserRestriction(DISALLOW_UNMUTE_MICROPHONE,
|
259 |
| - R.string.disallow_unmute_microphone), |
| 266 | + R.string.disallow_unmute_microphone) |
260 | 267 | };
|
261 | 268 |
|
262 | 269 | /**
|
@@ -293,7 +300,9 @@ public UserRestriction(String key, int titleResId) {
|
293 | 300 | * User restrictions that cannot be set by profile owners. Applied to all users.
|
294 | 301 | */
|
295 | 302 | public static final String[] DEVICE_OWNER_ONLY_RESTRICTIONS = {
|
296 |
| - DISALLOW_USER_SWITCH |
| 303 | + DISALLOW_USER_SWITCH, |
| 304 | + DISALLOW_MICROPHONE_TOGGLE, |
| 305 | + DISALLOW_CAMERA_TOGGLE, |
297 | 306 | };
|
298 | 307 |
|
299 | 308 | /**
|
|
0 commit comments