Home
last modified time | relevance | path

Searched refs:UserManager (Results 1 – 25 of 571) sorted by relevance

12345678910>>...23

/frameworks/base/services/core/java/com/android/server/pm/
DUserRestrictionsUtils.java36 import android.os.UserManager;
82 UserManager.DISALLOW_CONFIG_WIFI,
83 UserManager.DISALLOW_CONFIG_LOCALE,
84 UserManager.DISALLOW_MODIFY_ACCOUNTS,
85 UserManager.DISALLOW_INSTALL_APPS,
86 UserManager.DISALLOW_UNINSTALL_APPS,
87 UserManager.DISALLOW_SHARE_LOCATION,
88 UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES,
89 UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES_GLOBALLY,
90 UserManager.DISALLOW_CONFIG_BLUETOOTH,
[all …]
/frameworks/base/services/tests/PackageManagerServiceTests/server/src/com/android/server/pm/
DRestrictionsSetTest.java30 import android.os.UserManager;
51 Bundle restrictions = newRestrictions(UserManager.ENSURE_VERIFY_APPS); in testUpdateRestrictions_addRestrictions()
60 Bundle restrictions = newRestrictions(UserManager.ENSURE_VERIFY_APPS); in testUpdateRestrictions_removeRestrictions()
70 Bundle restrictions = newRestrictions(UserManager.ENSURE_VERIFY_APPS); in testUpdateRestrictions_noChange()
80 String restriction = UserManager.DISALLOW_CONFIG_DATE_TIME; in testMoveRestriction_containsRestriction()
97 newRestrictions(UserManager.ENSURE_VERIFY_APPS)); in testMoveRestriction_doesNotContainRestriction()
100 UserManager.DISALLOW_CONFIG_DATE_TIME); in testMoveRestriction_doesNotContainRestriction()
102 assertRestrictions(newRestrictions(UserManager.ENSURE_VERIFY_APPS), in testMoveRestriction_doesNotContainRestriction()
115 newRestrictions(UserManager.ENSURE_VERIFY_APPS, in testIsEmpty_hasRestrictions()
116 UserManager.DISALLOW_CONFIG_DATE_TIME)); in testIsEmpty_hasRestrictions()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DUserRestrictionsUtilsTest.java31 import android.os.UserManager;
91 assertFalse(UserRestrictionsUtils.canDeviceOwnerChange(UserManager.DISALLOW_RECORD_AUDIO)); in testCanDeviceOwnerChange()
92 assertFalse(UserRestrictionsUtils.canDeviceOwnerChange(UserManager.DISALLOW_WALLPAPER)); in testCanDeviceOwnerChange()
93 assertTrue(UserRestrictionsUtils.canDeviceOwnerChange(UserManager.DISALLOW_ADD_USER)); in testCanDeviceOwnerChange()
94 assertTrue(UserRestrictionsUtils.canDeviceOwnerChange(UserManager.DISALLOW_USER_SWITCH)); in testCanDeviceOwnerChange()
100 UserManager.DISALLOW_RECORD_AUDIO, in testCanProfileOwnerChange_mainUser()
104 UserManager.DISALLOW_WALLPAPER, in testCanProfileOwnerChange_mainUser()
108 UserManager.DISALLOW_USER_SWITCH, in testCanProfileOwnerChange_mainUser()
112 UserManager.DISALLOW_ADD_USER, in testCanProfileOwnerChange_mainUser()
116 UserManager.DISALLOW_ADJUST_VOLUME, in testCanProfileOwnerChange_mainUser()
[all …]
DUserManagerTest.java39 import android.os.UserManager;
93 private UserManager mUserManager = null;
104 mUserManager = UserManager.get(mContext); in setUp()
176 UserTypeFactory.getUserTypes().get(UserManager.USER_TYPE_PROFILE_CLONE); in testCloneUser()
177 assertWithMessage("No %s type on device", UserManager.USER_TYPE_PROFILE_CLONE) in testCloneUser()
184 UserManager.USER_TYPE_PROFILE_CLONE, in testCloneUser()
188 UserManager.USER_TYPE_PROFILE_CLONE, in testCloneUser()
194 final UserManager profileUM = UserManager.get(profileUserContest); in testCloneUser()
196 UserManager.class).isMediaSharedWithParent()).isTrue(); in testCloneUser()
247 mUserManager.isUserTypeEnabled(UserManager.USER_TYPE_PROFILE_COMMUNAL)); in testCommunalProfile()
[all …]
DUserManagerServiceUserInfoTest.java30 import static android.os.UserManager.USER_TYPE_FULL_DEMO;
31 import static android.os.UserManager.USER_TYPE_FULL_GUEST;
32 import static android.os.UserManager.USER_TYPE_FULL_RESTRICTED;
33 import static android.os.UserManager.USER_TYPE_FULL_SECONDARY;
34 import static android.os.UserManager.USER_TYPE_FULL_SYSTEM;
35 import static android.os.UserManager.USER_TYPE_PROFILE_MANAGED;
36 import static android.os.UserManager.USER_TYPE_SYSTEM_HEADLESS;
51 import android.os.UserManager;
129 final String globalRestriction = UserManager.DISALLOW_FACTORY_RESET; in testWriteReadDevicePolicyUserRestrictions()
130 final String localRestriction = UserManager.DISALLOW_CONFIG_DATE_TIME; in testWriteReadDevicePolicyUserRestrictions()
[all …]
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/
DPolicyDefinition.java40 import android.os.UserManager;
441 USER_RESTRICTION_FLAGS.put(UserManager.DISALLOW_MODIFY_ACCOUNTS, /* flags= */ 0); in USER_RESTRICTION_FLAGS.put()
442 USER_RESTRICTION_FLAGS.put(UserManager.DISALLOW_CONFIG_WIFI, /* flags= */ 0); in USER_RESTRICTION_FLAGS.put()
444 UserManager.DISALLOW_CHANGE_WIFI_STATE, POLICY_FLAG_GLOBAL_ONLY_POLICY); in USER_RESTRICTION_FLAGS.put()
446 UserManager.DISALLOW_WIFI_TETHERING, POLICY_FLAG_GLOBAL_ONLY_POLICY); in USER_RESTRICTION_FLAGS.put()
447 USER_RESTRICTION_FLAGS.put(UserManager.DISALLOW_GRANT_ADMIN, /* flags= */ 0); in USER_RESTRICTION_FLAGS.put()
450 UserManager.DISALLOW_SHARING_ADMIN_CONFIGURED_WIFI, /* flags= */ 0); in USER_RESTRICTION_FLAGS.put()
452 UserManager.DISALLOW_WIFI_DIRECT, POLICY_FLAG_GLOBAL_ONLY_POLICY); in USER_RESTRICTION_FLAGS.put()
454 UserManager.DISALLOW_ADD_WIFI_CONFIG, POLICY_FLAG_GLOBAL_ONLY_POLICY); in USER_RESTRICTION_FLAGS.put()
455 USER_RESTRICTION_FLAGS.put(UserManager.DISALLOW_CONFIG_LOCALE, /* flags= */ 0); in USER_RESTRICTION_FLAGS.put()
[all …]
/frameworks/base/core/java/com/android/internal/app/
DConfirmUserCreationActivity.java30 import android.os.UserManager;
45 private static final String USER_TYPE = UserManager.USER_TYPE_FULL_SECONDARY;
53 private UserManager mUserManager;
62 mUserName = intent.getStringExtra(UserManager.EXTRA_USER_NAME); in onCreate()
63 mAccountName = intent.getStringExtra(UserManager.EXTRA_USER_ACCOUNT_NAME); in onCreate()
64 mAccountType = intent.getStringExtra(UserManager.EXTRA_USER_ACCOUNT_TYPE); in onCreate()
66 …intent.getParcelableExtra(UserManager.EXTRA_USER_ACCOUNT_OPTIONS, android.os.PersistableBundle.cla… in onCreate()
68 mUserManager = getSystemService(UserManager.class); in onCreate()
105 boolean cantCreateUser = mUserManager.hasUserRestriction(UserManager.DISALLOW_ADD_USER) in checkUserCreationRequirements()
117 setResult(UserManager.USER_CREATION_FAILED_NOT_PERMITTED); in checkUserCreationRequirements()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/user/domain/interactor/
DUserActionsUtil.kt21 import android.os.UserManager
32 manager: UserManager, in canCreateGuest()
42 UserManager.USER_TYPE_FULL_GUEST in canCreateGuest()
51 manager: UserManager, in canCreateUser()
61 UserManager.USER_TYPE_FULL_SECONDARY in canCreateUser()
70 manager: UserManager, in canCreateSupervisedUser()
97 manager: UserManager, in canAddMoreUsers()
114 manager: UserManager, in currentUserCanCreateUsers()
122 UserManager.DISALLOW_ADD_USER, in currentUserCanCreateUsers()
124 ) && !manager.hasUserRestrictionForUser(UserManager.DISALLOW_ADD_USER, UserHandle.SYSTEM) in currentUserCanCreateUsers()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/wifi/
DWifiEnterpriseRestrictionUtils.java21 import android.os.UserManager;
39 if (!hasUserRestrictionFromT(context, UserManager.DISALLOW_WIFI_TETHERING)) return true; in isWifiTetheringAllowed()
51 if (!hasUserRestrictionFromT(context, UserManager.DISALLOW_WIFI_DIRECT)) return true; in isWifiDirectAllowed()
63 if (!hasUserRestrictionFromT(context, UserManager.DISALLOW_ADD_WIFI_CONFIG)) return true; in isAddWifiConfigAllowed()
75 if (!hasUserRestrictionFromT(context, UserManager.DISALLOW_CHANGE_WIFI_STATE)) return true; in isChangeWifiStateAllowed()
83 final UserManager userManager = context.getSystemService(UserManager.class); in hasUserRestrictionFromT()
/frameworks/base/tests/MultiUser/src/com/android/test/multiuser/
DMultiUserSettingsTests.java28 import android.os.UserManager;
83 Assume.assumeTrue(UserManager.supportsMultipleUsers()); in testChangingFontScaleOfABackgroundUser_shouldNotAffectUI()
85 UserManager userManager = UserManager.get(mContext); in testChangingFontScaleOfABackgroundUser_shouldNotAffectUI()
88 UserManager.USER_TYPE_FULL_SECONDARY, 0).id; in testChangingFontScaleOfABackgroundUser_shouldNotAffectUI()
107 Assume.assumeTrue(UserManager.supportsMultipleUsers()); in testChangingFontWeightOfABackgroundUser_shouldNotAffectUI()
109 UserManager userManager = UserManager.get(mContext); in testChangingFontWeightOfABackgroundUser_shouldNotAffectUI()
112 UserManager.USER_TYPE_FULL_SECONDARY, 0).id; in testChangingFontWeightOfABackgroundUser_shouldNotAffectUI()
131 Assume.assumeTrue(UserManager.supportsMultipleUsers()); in testChangingFontScaleOfTheForegroundUser_shouldAffectUI()
150 Assume.assumeTrue(UserManager.supportsMultipleUsers()); in testChangingFontWeightOfTheForegroundUser_shouldAffectUI()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/
DTetherUtilTest.java28 import android.os.UserManager;
49 private UserManager mUserManager;
124 List<UserManager.EnforcingUser> enforcingUsers = new ArrayList<>(); in setupIsTetherAvailable()
128 enforcingUsers.add(new UserManager.EnforcingUser(userId, in setupIsTetherAvailable()
129 UserManager.RESTRICTION_SOURCE_DEVICE_OWNER)); in setupIsTetherAvailable()
130 enforcingUsers.add(new UserManager.EnforcingUser(userId, in setupIsTetherAvailable()
131 UserManager.RESTRICTION_SOURCE_PROFILE_OWNER)); in setupIsTetherAvailable()
134 UserManager.DISALLOW_CONFIG_TETHERING, UserHandle.of(userId))) in setupIsTetherAvailable()
139 UserManager.DISALLOW_CONFIG_TETHERING, UserHandle.of(userId))) in setupIsTetherAvailable()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DTelephonyAdminReceiver.java23 import android.os.UserManager;
35 private UserManager mUserManager;
43 UserManager.DISALLOW_CELLULAR_2G); in TelephonyAdminReceiver()
46 filter.addAction(UserManager.ACTION_USER_RESTRICTIONS_CHANGED); in TelephonyAdminReceiver()
54 if (!intent.getAction().equals(UserManager.ACTION_USER_RESTRICTIONS_CHANGED)) { in onReceive()
62 UserManager.DISALLOW_CELLULAR_2G); in onReceive()
90 mUserManager = mContext.getSystemService(UserManager.class); in ensureUserManagerExists()
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenshot/data/repository/
DProfileTypeRepositoryImpl.kt21 import android.os.UserManager
34 private val userManager: UserManager,
47 UserManager.USER_TYPE_PROFILE_MANAGED -> ProfileType.WORK in getProfileType()
48 UserManager.USER_TYPE_PROFILE_PRIVATE -> ProfileType.PRIVATE in getProfileType()
49 UserManager.USER_TYPE_PROFILE_CLONE -> ProfileType.CLONE in getProfileType()
50 UserManager.USER_TYPE_PROFILE_COMMUNAL -> ProfileType.COMMUNAL in getProfileType()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DTelephonyAdminReceiverTest.java28 import android.os.UserManager;
65 mContext.sendBroadcast(new Intent(UserManager.ACTION_USER_RESTRICTIONS_CHANGED)); in test_nullIntent_noUpdate()
74 when(mUserManager.hasUserRestriction(UserManager.DISALLOW_CELLULAR_2G)).thenReturn(false); in test_userRestrictionsNotChanged_noUpdate()
76 mContext.sendBroadcast(new Intent(UserManager.ACTION_USER_RESTRICTIONS_CHANGED)); in test_userRestrictionsNotChanged_noUpdate()
85 when(mUserManager.hasUserRestriction(UserManager.DISALLOW_CELLULAR_2G)).thenReturn( in test_userRestrictionToggled_shouldUpdate()
88 mContext.sendBroadcast(new Intent(UserManager.ACTION_USER_RESTRICTIONS_CHANGED)); in test_userRestrictionToggled_shouldUpdate()
91 mContext.sendBroadcast(new Intent(UserManager.ACTION_USER_RESTRICTIONS_CHANGED)); in test_userRestrictionToggled_shouldUpdate()
/frameworks/base/core/java/android/companion/virtual/audio/
DUserRestrictionsDetector.java25 import android.os.UserManager;
43 private final UserManager mUserManager;
51 mUserManager = context.getSystemService(UserManager.class); in UserRestrictionsDetector()
57 return bundle.getBoolean(UserManager.DISALLOW_UNMUTE_MICROPHONE); in isUnmuteMicrophoneDisallowed()
64 filter.addAction(UserManager.ACTION_USER_RESTRICTIONS_CHANGED); in register()
84 if (UserManager.ACTION_USER_RESTRICTIONS_CHANGED.equals(action)) { in onReceive()
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/handheld/
DUninstallAlertDialogFragment.java19 import static android.os.UserManager.USER_TYPE_PROFILE_CLONE;
20 import static android.os.UserManager.USER_TYPE_PROFILE_MANAGED;
37 import android.os.UserManager;
94 UserManager userManager = getContext().getSystemService(UserManager.class); in getAppDataSize()
138 UserManager userManager = getContext().getSystemService(UserManager.class); in onCreateDialog()
152 UserManager customUserManager = getContext() in onCreateDialog()
154 .getSystemService(UserManager.class); in onCreateDialog()
252 UserManager customUserManager = getContext() in isCloneProfile()
254 .getSystemService(UserManager.class); in isCloneProfile()
255 if (customUserManager.isUserOfType(UserManager.USER_TYPE_PROFILE_CLONE)) { in isCloneProfile()
[all …]
/frameworks/base/core/java/android/content/pm/
DUserInfo.java30 import android.os.UserManager;
347 case 0 : return UserManager.USER_TYPE_FULL_SECONDARY; in getDefaultUserType()
348 case FLAG_GUEST: return UserManager.USER_TYPE_FULL_GUEST; in getDefaultUserType()
349 case FLAG_RESTRICTED: return UserManager.USER_TYPE_FULL_RESTRICTED; in getDefaultUserType()
350 case FLAG_MANAGED_PROFILE: return UserManager.USER_TYPE_PROFILE_MANAGED; in getDefaultUserType()
351 case FLAG_DEMO: return UserManager.USER_TYPE_FULL_DEMO; in getDefaultUserType()
376 return UserManager.isUserTypeGuest(userType); in isGuest()
381 return UserManager.isUserTypeRestricted(userType); in isRestricted()
390 return UserManager.isUserTypeManagedProfile(userType); in isManagedProfile()
394 return UserManager.isUserTypeCloneProfile(userType); in isCloneProfile()
[all …]
/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/
DInstallNonMarketAppsDeprecationTest.java30 import android.os.UserManager;
56 private UserManager mUm;
103 mUm = (UserManager) getContext().getSystemService(Context.USER_SERVICE); in setUp()
104 mHasUserRestriction = mUm.hasUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES); in setUp()
106 UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES, Process.myUserHandle()) in setUp()
107 == UserManager.RESTRICTION_SOURCE_SYSTEM; in setUp()
154 mUm.setUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES, !mHasUserRestriction); in testValueRespectsUserRestriction()
161 mUm.setUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES, mHasUserRestriction); in testValueRespectsUserRestriction()
175 mUm.setUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES, in tearDown()
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/television/
DUninstallAlertFragment.java19 import static android.os.UserManager.USER_TYPE_PROFILE_MANAGED;
27 import android.os.UserManager;
67 UserManager userManager = getContext().getSystemService(UserManager.class); in onCreateGuidance()
79 UserManager customUserManager = getContext() in onCreateGuidance()
81 .getSystemService(UserManager.class); in onCreateGuidance()
133 private boolean isSingleUser(UserManager userManager) { in isSingleUser()
135 return userCount == 1 || (UserManager.isHeadlessSystemUserMode() && userCount == 2); in isSingleUser()
/frameworks/base/services/core/java/com/android/server/oemlock/
DPersistentDataBlockLock.java22 import android.os.UserManager;
56 UserManager.get(mContext).setUserRestriction( in setOemUnlockAllowedByCarrier()
57 UserManager.DISALLOW_OEM_UNLOCK, !allowed, UserHandle.SYSTEM); in setOemUnlockAllowedByCarrier()
66 return !UserManager.get(mContext) in isOemUnlockAllowedByCarrier()
67 .hasUserRestriction(UserManager.DISALLOW_OEM_UNLOCK, UserHandle.SYSTEM); in isOemUnlockAllowedByCarrier()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/
DWifiEnterpriseRestrictionUtilsTest.java18 import static android.os.UserManager.DISALLOW_ADD_WIFI_CONFIG;
19 import static android.os.UserManager.DISALLOW_CHANGE_WIFI_STATE;
20 import static android.os.UserManager.DISALLOW_WIFI_DIRECT;
21 import static android.os.UserManager.DISALLOW_WIFI_TETHERING;
30 import android.os.UserManager;
57 private UserManager mUserManager;
61 when(mContext.getSystemService(UserManager.class)).thenReturn(mUserManager); in setUp()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/development/
DDevelopmentSettingsEnabler.java22 import android.os.UserManager;
43 final UserManager um = (UserManager) context.getSystemService(Context.USER_SERVICE); in isDevelopmentSettingsEnabled()
48 UserManager.DISALLOW_DEBUGGING_FEATURES); in isDevelopmentSettingsEnabled()
/frameworks/base/services/core/java/com/android/server/policy/
DPowerAction.java20 import android.os.UserManager;
44 UserManager um = mContext.getSystemService(UserManager.class); in onLongPress()
45 if (!um.hasUserRestriction(UserManager.DISALLOW_SAFE_BOOT)) { in onLongPress()
DRestartAction.java20 import android.os.UserManager;
44 UserManager um = mContext.getSystemService(UserManager.class); in onLongPress()
45 if (!um.hasUserRestriction(UserManager.DISALLOW_SAFE_BOOT)) { in onLongPress()
/frameworks/base/services/core/java/com/android/server/location/injector/
DSystemUserInfoHelper.java19 import static android.os.UserManager.DISALLOW_SHARE_LOCATION;
30 import android.os.UserManager;
54 @Nullable private UserManager mUserManager;
93 protected final UserManager getUserManager() { in getUserManager()
96 mUserManager = mContext.getSystemService(UserManager.class); in getUserManager()
170 UserManager userManager = getUserManager(); in getProfileIds()
201 UserManager userManager = getUserManager(); in dump()

12345678910>>...23