|
10 | 10 | import static android.Manifest.permission.MANAGE_DEVICE_POLICY_LOCK_CREDENTIALS;
|
11 | 11 | import static android.Manifest.permission.MANAGE_DEVICE_POLICY_MOBILE_NETWORK;
|
12 | 12 | import static android.Manifest.permission.MANAGE_DEVICE_POLICY_MODIFY_USERS;
|
| 13 | +import static android.Manifest.permission.MANAGE_DEVICE_POLICY_PROFILES; |
13 | 14 | import static android.Manifest.permission.MANAGE_DEVICE_POLICY_RESTRICT_PRIVATE_DNS;
|
14 | 15 | import static android.Manifest.permission.MANAGE_DEVICE_POLICY_SAFE_BOOT;
|
15 | 16 | import static android.Manifest.permission.MANAGE_DEVICE_POLICY_SMS;
|
|
19 | 20 | import static android.Manifest.permission.MANAGE_DEVICE_POLICY_WIFI;
|
20 | 21 | import static android.os.UserManager.ALLOW_PARENT_PROFILE_APP_LINKING;
|
21 | 22 | import static android.os.UserManager.DISALLOW_ADD_MANAGED_PROFILE;
|
| 23 | +import static android.os.UserManager.DISALLOW_ADD_PRIVATE_PROFILE; |
22 | 24 | import static android.os.UserManager.DISALLOW_ADD_USER;
|
23 | 25 | import static android.os.UserManager.DISALLOW_ADD_WIFI_CONFIG;
|
24 | 26 | import static android.os.UserManager.DISALLOW_ADJUST_VOLUME;
|
@@ -221,6 +223,10 @@ public UserRestriction(String key, int titleResId, String permission) {
|
221 | 223 | new UserRestriction(DISALLOW_ULTRA_WIDEBAND_RADIO, R.string.disallow_ultra_wideband_radio),
|
222 | 224 | new UserRestriction(DISALLOW_ASSIST_CONTENT, R.string.disallow_assist_content),
|
223 | 225 | new UserRestriction(DISALLOW_SIM_GLOBALLY, R.string.disallow_sim_globally),
|
| 226 | + new UserRestriction( |
| 227 | + DISALLOW_ADD_PRIVATE_PROFILE, |
| 228 | + R.string.disallow_add_private_profile, |
| 229 | + MANAGE_DEVICE_POLICY_PROFILES), |
224 | 230 | };
|
225 | 231 |
|
226 | 232 | /**
|
@@ -259,6 +265,7 @@ public UserRestriction(String key, int titleResId, String permission) {
|
259 | 265 | DISALLOW_ULTRA_WIDEBAND_RADIO,
|
260 | 266 | DISALLOW_CONFIG_BRIGHTNESS,
|
261 | 267 | DISALLOW_CONFIG_SCREEN_TIMEOUT,
|
| 268 | + DISALLOW_ADD_PRIVATE_PROFILE, |
262 | 269 | };
|
263 | 270 |
|
264 | 271 | /** Setting these user restrictions only have effect on primary users. */
|
@@ -318,7 +325,8 @@ public UserRestriction(String key, int titleResId, String permission) {
|
318 | 325 | DISALLOW_AIRPLANE_MODE,
|
319 | 326 | DISALLOW_CONFIG_SCREEN_TIMEOUT,
|
320 | 327 | DISALLOW_CONFIG_BRIGHTNESS,
|
321 |
| - DISALLOW_AMBIENT_DISPLAY |
| 328 | + DISALLOW_AMBIENT_DISPLAY, |
| 329 | + DISALLOW_ADD_PRIVATE_PROFILE, |
322 | 330 | };
|
323 | 331 |
|
324 | 332 | /** These user restrictions are added in MNC. */
|
@@ -376,7 +384,10 @@ public UserRestriction(String key, int titleResId, String permission) {
|
376 | 384 | public static String[] VIC_PLUS_RESTRICTIONS = {DISALLOW_SIM_GLOBALLY};
|
377 | 385 |
|
378 | 386 | public static String[] VIC_PLUS_PARENT_RESTRICTIONS = {
|
379 |
| - DISALLOW_CONFIG_BRIGHTNESS, DISALLOW_CONFIG_SCREEN_TIMEOUT, DISALLOW_ASSIST_CONTENT |
| 387 | + DISALLOW_CONFIG_BRIGHTNESS, |
| 388 | + DISALLOW_CONFIG_SCREEN_TIMEOUT, |
| 389 | + DISALLOW_ASSIST_CONTENT, |
| 390 | + DISALLOW_ADD_PRIVATE_PROFILE |
380 | 391 | };
|
381 | 392 |
|
382 | 393 | public static UserRestriction getRestriction(String restrictionKey) {
|
|
0 commit comments