Home
last modified time | relevance | path

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

123456789

/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DUserRestrictionsUtilsTest.java24 import android.os.UserManager;
89 assertFalse(UserRestrictionsUtils.canDeviceOwnerChange(UserManager.DISALLOW_RECORD_AUDIO)); in testCanDeviceOwnerChange()
90 assertFalse(UserRestrictionsUtils.canDeviceOwnerChange(UserManager.DISALLOW_WALLPAPER)); in testCanDeviceOwnerChange()
91 assertTrue(UserRestrictionsUtils.canDeviceOwnerChange(UserManager.DISALLOW_ADD_USER)); in testCanDeviceOwnerChange()
97 UserManager.DISALLOW_RECORD_AUDIO, user)); in testCanProfileOwnerChange()
99 UserManager.DISALLOW_WALLPAPER, user)); in testCanProfileOwnerChange()
101 UserManager.DISALLOW_ADD_USER, user)); in testCanProfileOwnerChange()
103 UserManager.DISALLOW_ADJUST_VOLUME, user)); in testCanProfileOwnerChange()
107 UserManager.DISALLOW_RECORD_AUDIO, user)); in testCanProfileOwnerChange()
109 UserManager.DISALLOW_WALLPAPER, user)); in testCanProfileOwnerChange()
[all …]
DUserManagerTest.java28 import android.os.UserManager;
62 private UserManager mUserManager = null;
69 mUserManager = UserManager.get(getContext()); in setUp()
137 restrictions.getBoolean(UserManager.DISALLOW_CONFIG_WIFI)); in testAddUser()
250 mUserManager.setUserRestriction(UserManager.DISALLOW_ADD_USER, true, primaryUserHandle); in testCreateUser_disallowAddUser()
255 mUserManager.setUserRestriction(UserManager.DISALLOW_ADD_USER, false, in testCreateUser_disallowAddUser()
265 mUserManager.setUserRestriction(UserManager.DISALLOW_ADD_MANAGED_PROFILE, true, in testCreateProfileForUser_disallowAddManagedProfile()
272 mUserManager.setUserRestriction(UserManager.DISALLOW_ADD_MANAGED_PROFILE, false, in testCreateProfileForUser_disallowAddManagedProfile()
282 mUserManager.setUserRestriction(UserManager.DISALLOW_ADD_MANAGED_PROFILE, true, in testCreateProfileForUserEvenWhenDisallowed()
289 mUserManager.setUserRestriction(UserManager.DISALLOW_ADD_MANAGED_PROFILE, false, in testCreateProfileForUserEvenWhenDisallowed()
[all …]
DUserManagerServiceTest.java24 import android.os.UserManager;
50 UserManager.get(mContext).removeUser(tempUserId); in tearDown()
68 UserManager um = UserManager.get(mContext); in testAddUserWithAccount()
/frameworks/base/services/core/java/com/android/server/pm/
DUserRestrictionsUtils.java32 import android.os.UserManager;
68 UserManager.DISALLOW_CONFIG_WIFI,
69 UserManager.DISALLOW_MODIFY_ACCOUNTS,
70 UserManager.DISALLOW_INSTALL_APPS,
71 UserManager.DISALLOW_UNINSTALL_APPS,
72 UserManager.DISALLOW_SHARE_LOCATION,
73 UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES,
74 UserManager.DISALLOW_CONFIG_BLUETOOTH,
75 UserManager.DISALLOW_BLUETOOTH,
76 UserManager.DISALLOW_BLUETOOTH_SHARING,
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DDevicePolicyManagerServiceMigrationTest.java29 import android.os.UserManager;
86 UserManager.DISALLOW_ADD_USER, in testMigration()
87 UserManager.DISALLOW_RECORD_AUDIO)); in testMigration()
91 UserManager.DISALLOW_REMOVE_USER, in testMigration()
92 UserManager.DISALLOW_ADD_USER, in testMigration()
93 UserManager.DISALLOW_SMS, in testMigration()
94 UserManager.DISALLOW_OUTGOING_CALLS, in testMigration()
95 UserManager.DISALLOW_WALLPAPER, in testMigration()
96 UserManager.DISALLOW_RECORD_AUDIO)); in testMigration()
100 UserManager.DISALLOW_REMOVE_USER, in testMigration()
[all …]
DDevicePolicyManagerTest.java71 import android.os.UserManager;
912 dpm.addUserRestriction(admin1, UserManager.DISALLOW_ADD_USER); in testClearDeviceOwner()
913 when(getServices().userManager.hasUserRestriction(eq(UserManager.DISALLOW_ADD_USER), in testClearDeviceOwner()
939 verify(getServices().userManager).setUserRestriction(eq(UserManager.DISALLOW_ADD_USER), in testClearDeviceOwner()
1451 dpm.addUserRestriction(admin1, UserManager.DISALLOW_ADD_USER); in testSetUserRestriction_asDo()
1454 MockUtils.checkUserRestrictions(UserManager.DISALLOW_ADD_USER), in testSetUserRestriction_asDo()
1458 dpm.addUserRestriction(admin1, UserManager.DISALLOW_OUTGOING_CALLS); in testSetUserRestriction_asDo()
1461 MockUtils.checkUserRestrictions(UserManager.DISALLOW_OUTGOING_CALLS, in testSetUserRestriction_asDo()
1462 UserManager.DISALLOW_ADD_USER), in testSetUserRestriction_asDo()
1468 UserManager.DISALLOW_ADD_USER, UserManager.DISALLOW_OUTGOING_CALLS), in testSetUserRestriction_asDo()
[all …]
/frameworks/base/core/java/com/android/internal/app/
DConfirmUserCreationActivity.java30 import android.os.UserManager;
50 private UserManager mUserManager;
57 mUserName = intent.getStringExtra(UserManager.EXTRA_USER_NAME); in onCreate()
58 mAccountName = intent.getStringExtra(UserManager.EXTRA_USER_ACCOUNT_NAME); in onCreate()
59 mAccountType = intent.getStringExtra(UserManager.EXTRA_USER_ACCOUNT_TYPE); in onCreate()
61 intent.getParcelableExtra(UserManager.EXTRA_USER_ACCOUNT_OPTIONS); in onCreate()
63 mUserManager = getSystemService(UserManager.class); in onCreate()
99 boolean cantCreateUser = mUserManager.hasUserRestriction(UserManager.DISALLOW_ADD_USER) in checkUserCreationRequirements()
111 setResult(UserManager.USER_CREATION_FAILED_NOT_PERMITTED); in checkUserCreationRequirements()
114 setResult(UserManager.USER_CREATION_FAILED_NO_MORE_USERS); in checkUserCreationRequirements()
/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/
DInstallNonMarketAppsDeprecationTest.java27 import android.os.UserManager;
50 private UserManager mUm;
88 mUm = (UserManager) getContext().getSystemService(Context.USER_SERVICE); in setUp()
89 mHasUserRestriction = mUm.hasUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES); in setUp()
91 UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES, Process.myUserHandle()) in setUp()
92 == UserManager.RESTRICTION_SOURCE_SYSTEM; in setUp()
134 mUm.setUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES, !mHasUserRestriction); in testValueRespectsUserRestriction()
140 mUm.setUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES, mHasUserRestriction); in testValueRespectsUserRestriction()
151 mUm.setUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES, in tearDown()
/frameworks/base/services/core/java/com/android/server/oemlock/
DPersistentDataBlockLock.java22 import android.os.UserManager;
50 UserManager.get(mContext).setUserRestriction( in setOemUnlockAllowedByCarrier()
51 UserManager.DISALLOW_OEM_UNLOCK, !allowed, UserHandle.SYSTEM); in setOemUnlockAllowedByCarrier()
60 return !UserManager.get(mContext) in isOemUnlockAllowedByCarrier()
61 .hasUserRestriction(UserManager.DISALLOW_OEM_UNLOCK, UserHandle.SYSTEM); in isOemUnlockAllowedByCarrier()
DOemLockService.java30 import android.os.UserManager;
97 UserManager.DISALLOW_FACTORY_RESET)) {
99 !newRestrictions.getBoolean(UserManager.DISALLOW_FACTORY_RESET);
223 return !UserManager.get(mContext) in isOemUnlockAllowedByAdmin()
224 .hasUserRestriction(UserManager.DISALLOW_FACTORY_RESET, UserHandle.SYSTEM); in isOemUnlockAllowedByAdmin()
253 if (!UserManager.get(mContext).isUserAdmin(userId)) { in enforceUserIsAdmin()
/frameworks/base/core/java/android/app/
DAppOpsManager.java33 import android.os.UserManager;
735 UserManager.DISALLOW_SHARE_LOCATION, //COARSE_LOCATION
736 UserManager.DISALLOW_SHARE_LOCATION, //FINE_LOCATION
737 UserManager.DISALLOW_SHARE_LOCATION, //GPS
741 UserManager.DISALLOW_OUTGOING_CALLS, //READ_CALL_LOG
742 UserManager.DISALLOW_OUTGOING_CALLS, //WRITE_CALL_LOG
745 UserManager.DISALLOW_SHARE_LOCATION, //WIFI_SCAN
749 UserManager.DISALLOW_SMS, //READ_SMS
750 UserManager.DISALLOW_SMS, //WRITE_SMS
751 UserManager.DISALLOW_SMS, //RECEIVE_SMS
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
DRestrictedLockUtils.java35 import android.os.UserManager;
84 final UserManager um = UserManager.get(context); in checkIfRestrictionEnforced()
85 final List<UserManager.EnforcingUser> enforcingUsers = in checkIfRestrictionEnforced()
98 if (restrictionSource == UserManager.RESTRICTION_SOURCE_PROFILE_OWNER) { in checkIfRestrictionEnforced()
110 } else if (restrictionSource == UserManager.RESTRICTION_SOURCE_DEVICE_OWNER) { in checkIfRestrictionEnforced()
123 final UserManager um = (UserManager) context.getSystemService(Context.USER_SERVICE); in hasBaseUserRestriction()
151 if (UserManager.get(context).getUserInfo(userId).isManagedProfile()) { in checkIfKeyguardFeaturesDisabled()
195 UserManager.DISALLOW_APPS_CONTROL, userId); in checkIfUninstallBlocked()
200 UserManager.DISALLOW_UNINSTALL_APPS, userId); in checkIfUninstallBlocked()
318 UserManager um = (UserManager) context.getSystemService(Context.USER_SERVICE); in getManagedProfileId()
[all …]
/frameworks/base/core/tests/packagemanagertests/src/android/content/pm/
DKernelPackageMappingTests.java29 import android.os.UserManager;
62 private UserManager getUserManager() { in getUserManager()
63 UserManager um = (UserManager) InstrumentationRegistry.getContext().getSystemService( in getUserManager()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/drawer/
DProfileSelectDialog.java28 import android.os.UserManager;
59 UserAdapter adapter = UserAdapter.createUserAdapter(UserManager.get(context), context, in onCreateDialog()
80 final UserManager userManager = UserManager.get(context); in updateUserHandlesIfNeeded()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DMockLockSettingsContext.java25 import android.os.UserManager;
30 private UserManager mUserManager;
36 public MockLockSettingsContext(Context base, UserManager userManager, in MockLockSettingsContext()
/frameworks/base/core/java/android/util/
DIconDrawableFactory.java26 import android.os.UserManager;
39 protected final UserManager mUm;
46 mUm = context.getSystemService(UserManager.class); in IconDrawableFactory()
101 public static int getUserBadgeColor(UserManager um, @UserIdInt int userId) { in getUserBadgeColor()
/frameworks/base/services/tests/servicestests/src/com/android/server/am/
DTaskPersisterTest.java22 import android.os.UserManager;
37 private UserManager mUserManager;
42 mUserManager = UserManager.get(getContext()); in setUp()
/frameworks/support/compat/java/android/support/v4/os/
DUserManagerCompat.java21 import android.os.UserManager;
40 return context.getSystemService(UserManager.class).isUserUnlocked(); in isUserUnlocked()
/frameworks/base/core/java/android/webkit/
DUserPackage.java24 import android.os.UserManager;
99 UserManager userManager = (UserManager) context.getSystemService(Context.USER_SERVICE); in getAllUsers()
/frameworks/base/services/tests/servicestests/src/com/android/server/wm/
DTaskSnapshotPersisterTestBase.java29 import android.os.UserManager;
58 final UserManager um = UserManager.get(InstrumentationRegistry.getContext()); in setUp()
/frameworks/base/services/core/java/com/android/server/media/
DMediaResourceMonitorService.java26 import android.os.UserManager;
65 UserManager manager = (UserManager) getContext().getSystemService( in notifyResourceGranted()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DAccessPointControllerImpl.java25 import android.os.UserManager;
58 private final UserManager mUserManager;
64 mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE); in AccessPointControllerImpl()
70 return !mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_WIFI, in canConfigWifi()
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DBatteryStatsUserLifecycleTests.java30 import android.os.UserManager;
60 private UserManager mUm;
65 assumeTrue(UserManager.getMaxSupportedUsers() > 1); in setUpOnce()
71 mUm = UserManager.get(mContext); in setUp()
/frameworks/base/services/core/java/com/android/server/storage/
DAppCollector.java31 import android.os.UserManager;
67 (UserManager) context.getSystemService(Context.USER_SERVICE), in AppCollector()
101 private final UserManager mUm;
105 PackageManager pm, UserManager um, StorageStatsManager storageStatsManager) { in BackgroundHandler()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DConfigurationMap.java6 import android.os.UserManager;
20 private final UserManager mUserManager;
24 ConfigurationMap(UserManager userManager) { in ConfigurationMap()

123456789