Home
last modified time | relevance | path

Searched refs:userManager (Results 1 – 25 of 138) sorted by relevance

123456

/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/user/
DUserCreatorTest.kt35 private lateinit var userManager: UserManager variable in com.android.systemui.user.UserCreatorTest
45 userCreator = UserCreator(context, userManager, mainExecutor, bgExecutor) in setUp()
47 Mockito.`when`(userManager.createUser(USER_NAME, UserManager.USER_TYPE_FULL_SECONDARY, 0)) in setUp()
62 verify(userManager, never()).createUser(USER_NAME, UserManager.USER_TYPE_FULL_SECONDARY, 0) in testCreateUser_threadingOrder()
66 verify(userManager, never()).setUserIcon(anyInt(), any(Bitmap::class.java)) in testCreateUser_threadingOrder()
69 verify(userManager).createUser(USER_NAME, UserManager.USER_TYPE_FULL_SECONDARY, 0) in testCreateUser_threadingOrder()
70 verify(userManager).setUserIcon(anyInt(), any(Bitmap::class.java)) in testCreateUser_threadingOrder()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/
DSimStatusImeiInfoPreferenceControllerTest.java55 ShadowUserManager userManager = in testIsAvailable_isAdminAndHasMobile_shouldReturnTrue() local
57 userManager.setIsAdminUser(true); in testIsAvailable_isAdminAndHasMobile_shouldReturnTrue()
67 ShadowUserManager userManager = in testIsAvailable_isAdminButNoMobile_shouldReturnFalse() local
69 userManager.setIsAdminUser(true); in testIsAvailable_isAdminButNoMobile_shouldReturnFalse()
79 ShadowUserManager userManager = in testIsAvailable_isNotAdmin_shouldReturnFalse() local
81 userManager.setIsAdminUser(false); in testIsAvailable_isNotAdmin_shouldReturnFalse()
/frameworks/base/services/core/java/com/android/server/location/injector/
DSystemUserInfoHelper.java140 UserManager userManager = getUserManager(); in getProfileIds() local
143 Preconditions.checkState(userManager != null); in getProfileIds()
147 return userManager.getEnabledProfileIds(userId); in getProfileIds()
171 UserManager userManager = getUserManager(); in dump() local
172 if (userManager != null) { in dump()
174 if (userManager.hasUserRestrictionForUser(DISALLOW_SHARE_LOCATION, in dump()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/keyguard/
DWorkLockActivityTest.kt51 private val userManager: UserManager = mock() constant in com.android.systemui.keyguard.WorkLockActivityTest
62 userManager: UserManager,
64 ) : WorkLockActivity(broadcastDispatcher, userManager, packageManager) {
79 userManager = userManager, in setUp()
96 whenever(userManager.getBadgedIconForUser(any(), eq(UserHandle.of(USER_ID)))) in testGetBadgedIcon()
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/television/
DUninstallAlertFragment.java66 UserManager userManager = UserManager.get(getActivity()); in onCreateGuidance() local
68 if (isSingleUser(userManager)) { in onCreateGuidance()
74 if (dialogInfo.allUsers && !isSingleUser(userManager)) { in onCreateGuidance()
77 UserInfo userInfo = userManager.getUserInfo(dialogInfo.user.getIdentifier()); in onCreateGuidance()
127 private boolean isSingleUser(UserManager userManager) { in isSingleUser() argument
128 final int userCount = userManager.getUserCount(); in isSingleUser()
DUninstallAppProgress.java151 UserManager userManager = in handleMessage() local
158 for (UserInfo user : userManager.getUsers()) { in handleMessage()
161 if (isProfileOfOrSame(userManager, myUserId, user.id)) continue; in handleMessage()
189 UserManager userManager = in handleMessage() local
193 List<UserInfo> users = userManager.getUsers(); in handleMessage()
209 if (isProfileOfOrSame(userManager, myUserId, blockingUserId)) { in handleMessage()
242 private boolean isProfileOfOrSame(UserManager userManager, int userId, int profileId) { in isProfileOfOrSame() argument
246 UserInfo parentUser = userManager.getProfileParent(profileId); in isProfileOfOrSame()
/frameworks/base/tests/MultiUser/src/com/android/test/multiuser/
DMultiUserSettingsTests.java85 UserManager userManager = UserManager.get(mContext); in testChangingFontScaleOfABackgroundUser_shouldNotAffectUI() local
87 final int backgroundUserId = userManager.createUser("test_user", in testChangingFontScaleOfABackgroundUser_shouldNotAffectUI()
99 userManager.removeUser(backgroundUserId); in testChangingFontScaleOfABackgroundUser_shouldNotAffectUI()
109 UserManager userManager = UserManager.get(mContext); in testChangingFontWeightOfABackgroundUser_shouldNotAffectUI() local
111 final int backgroundUserId = userManager.createUser("test_user", in testChangingFontWeightOfABackgroundUser_shouldNotAffectUI()
123 userManager.removeUser(backgroundUserId); in testChangingFontWeightOfABackgroundUser_shouldNotAffectUI()
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/handheld/
DUninstallAlertDialogFragment.java89 UserManager userManager = getContext().getSystemService(UserManager.class); in getAppDataSize() local
94 List<UserInfo> users = userManager.getUsers(); in getAppDataSize()
130 UserManager userManager = UserManager.get(getActivity()); in onCreateDialog() local
132 if (isSingleUser(userManager)) { in onCreateDialog()
138 if (dialogInfo.allUsers && !isSingleUser(userManager)) { in onCreateDialog()
141 UserInfo userInfo = userManager.getUserInfo(dialogInfo.user.getIdentifier()); in onCreateDialog()
217 private boolean isSingleUser(UserManager userManager) { in isSingleUser() argument
218 final int userCount = userManager.getUserCount(); in isSingleUser()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/wifi/
DWifiEnterpriseRestrictionUtils.java83 final UserManager userManager = context.getSystemService(UserManager.class); in hasUserRestrictionFromT()
84 if (userManager == null) return false; in hasUserRestrictionFromT()
85 return userManager.hasUserRestriction(restrictionKey); in hasUserRestrictionFromT()
/frameworks/base/core/java/android/provider/
DCallLog.java247 UserManager userManager = context.getSystemService(UserManager.class); in storeCallComposerPicture() local
255 Uri baseUri = userManager.isUserUnlocked(realUser) ? CALL_COMPOSER_PICTURE_URI in storeCallComposerPicture()
273 if (!userManager.isUserUnlocked(UserHandle.SYSTEM)) { in storeCallComposerPicture()
313 for (UserInfo u : userManager.getAliveUsers()) { in storeCallComposerPicture()
321 context, userManager, userHandle.getIdentifier())) { in storeCallComposerPicture()
326 if (userManager.isUserRunning(userHandle) in storeCallComposerPicture()
327 && userManager.isUserUnlocked(userHandle)) { in storeCallComposerPicture()
1811 final UserManager userManager = context.getSystemService(UserManager.class); in addCall() local
1812 final int currentUserId = userManager.getProcessUserId(); in addCall()
1815 if (userManager.isUserUnlocked(UserHandle.SYSTEM)) { in addCall()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DMockSystemServices.java97 public final UserManager userManager; field in MockSystemServices
149 userManager = mock(UserManager.class); in MockSystemServices()
260 when(userManager.getUserInfo(eq(userId))).thenReturn(uh); in addUser()
270 when(userManager.getUsers()).thenReturn(mUserInfos); in addUser()
271 when(userManager.getAliveUsers()).thenReturn(mUserInfos); in addUser()
272 when(userManager.isUserRunning(eq(new UserHandle(userId)))).thenReturn(true); in addUser()
273 when(userManager.getProfileParent(anyInt())).thenAnswer( in addUser()
280 when(userManager.getProfileParent(any(UserHandle.class))).thenAnswer( in addUser()
287 when(userManager.getProfiles(anyInt())).thenAnswer( in addUser()
293 when(userManager.getProfileIdsWithDisabled(anyInt())).thenAnswer( in addUser()
[all …]
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/
DUninstallFinish.java74 UserManager userManager = context.getSystemService(UserManager.class); in onReceive() local
102 for (UserInfo user : userManager.getUsers()) { in onReceive()
105 if (isProfileOfOrSame(userManager, myUserId, user.id)) { in onReceive()
139 List<UserInfo> users = userManager.getUsers(); in onReceive()
156 if (isProfileOfOrSame(userManager, myUserId, blockingUserId)) { in onReceive()
208 private boolean isProfileOfOrSame(@NonNull UserManager userManager, int userId, int profileId) { in isProfileOfOrSame() argument
213 UserInfo parentUser = userManager.getProfileParent(profileId); in isProfileOfOrSame()
/frameworks/base/packages/SystemUI/src/com/android/systemui/user/
DUserCreator.kt37 private val userManager: UserManager, constant in com.android.systemui.user.UserCreator
59 val user = userManager.createUser(userName, UserManager.USER_TYPE_FULL_SECONDARY, 0) in createUser()
73 userManager.setUserIcon( in createUser()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/
DManagedProfileControllerImplTest.kt41 @Mock private lateinit var userManager: UserManager variable in com.android.systemui.statusbar.phone.ManagedProfileControllerImplTest
47 controller = ManagedProfileControllerImpl(context, mainExecutor, userTracker, userManager) in setup()
76 `when`(userManager.getEnabledProfiles(userId)) in setupWorkingProfile()
/frameworks/base/packages/StatementService/src/com/android/statementservice/
DStatementServiceApplication.kt28 val userManager = getSystemService(UserManager::class.java) ?: return in onCreate() constant
29 if (userManager.isUserUnlocked) { in onCreate()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/settings/
DUserTrackerImplTest.kt57 private lateinit var userManager: UserManager in <lambda>() variable in com.android.systemui.settings.UserTrackerImplTest
82 `when`(userManager.getProfiles(anyInt())).thenAnswer { invocation -> in <lambda>()
87 tracker = UserTrackerImpl(context, userManager, iActivityManager, dumpManager, handler) in <lambda>()
151 verify(userManager).getProfiles(testID) in <lambda>()
173 verify(userManager).getProfiles(newID) in <lambda>()
190 `when`(userManager.getProfiles(anyInt())).thenAnswer { invocation -> in <lambda>()
215 `when`(userManager.getProfiles(anyInt())).thenAnswer { invocation -> in <lambda>()
240 `when`(userManager.getProfiles(anyInt())).thenAnswer { invocation -> in <lambda>()
261 `when`(userManager.getProfiles(anyInt())).thenAnswer { invocation -> in <lambda>()
327 `when`(userManager.getProfiles(anyInt())).thenAnswer { invocation -> in <lambda>()
DUserTrackerImplReceiveTest.kt54 @Mock private lateinit var userManager: UserManager in <lambda>() variable in com.android.systemui.settings.UserTrackerImplReceiveTest
72 tracker = UserTrackerImpl(context, userManager, iActivityManager, dumpManager, handler) in <lambda>()
81 `when`(userManager.getProfiles(anyInt())).thenAnswer { invocation -> in <lambda>()
/frameworks/base/packages/Shell/tests/src/com/android/shell/
DBugreportProgressServiceTest.java58 public UserManager userManager; field in BugreportProgressServiceTest.MyContext
71 return userManager; in getSystemService()
114 when(mTestContext.userManager.getUserProfiles()).thenReturn( in findSendToAccount_noWorkProfile()
177 when(mTestContext.userManager.getUserProfiles()).thenReturn( in findSendToAccount_withWorkProfile_noAccounts()
245 when(mTestContext.userManager.getUserProfiles()).thenReturn( in findSendToAccount_withWorkProfile_1account()
312 when(mTestContext.userManager.getUserProfiles()).thenReturn( in findSendToAccount_withWorkProfile_mixedDomains()
/frameworks/base/services/core/java/com/android/server/pm/
DUserNeedsBadgingCache.java39 public UserNeedsBadgingCache(@NonNull UserManagerService userManager) { in UserNeedsBadgingCache() argument
40 mUserManager = userManager; in UserNeedsBadgingCache()
/frameworks/base/packages/SystemUI/src/com/android/systemui/mediaprojection/devicepolicy/
DScreenCaptureDevicePolicyResolver.kt32 private val userManager: UserManager, constant in com.android.systemui.mediaprojection.devicepolicy.ScreenCaptureDevicePolicyResolver
116 userManager.hasUserRestrictionForUser( in <lambda>()
/frameworks/base/packages/SystemUI/src/com/android/systemui/controls/start/
DControlsStartable.kt61 private val userManager: UserManager, in <lambda>() constant in com.android.systemui.controls.start.ControlsStartable
124 if (userManager.isUserUnlocked(userTracker.userId)) { in <lambda>()
130 if (userManager.isUserUnlocked(userTracker.userId)) { in <lambda>()
/frameworks/base/services/core/java/com/android/server/display/
DAmbientBrightnessStatsTracker.java68 public AmbientBrightnessStatsTracker(UserManager userManager, @Nullable Injector injector) { in AmbientBrightnessStatsTracker() argument
69 mUserManager = userManager; in AmbientBrightnessStatsTracker()
355 public int getUserSerialNumber(UserManager userManager, int userId) { in getUserSerialNumber() argument
356 return userManager.getUserSerialNumber(userId); in getUserSerialNumber()
359 public int getUserId(UserManager userManager, int userSerialNumber) { in getUserId() argument
360 return userManager.getUserHandle(userSerialNumber); in getUserId()
/frameworks/base/services/core/java/com/android/server/pm/resolution/
DComponentResolver.java160 public ComponentResolver(@NonNull UserManagerService userManager, in ComponentResolver() argument
162 super(userManager); in ComponentResolver()
163 mActivities = new ActivityIntentResolver(userManager, userNeedsBadgingCache); in ComponentResolver()
164 mProviders = new ProviderIntentResolver(userManager); in ComponentResolver()
165 mReceivers = new ReceiverIntentResolver(userManager, userNeedsBadgingCache); in ComponentResolver()
166 mServices = new ServiceIntentResolver(userManager); in ComponentResolver()
819 MimeGroupsAwareIntentResolver(@NonNull UserManagerService userManager) { in MimeGroupsAwareIntentResolver() argument
820 mUserManager = userManager; in MimeGroupsAwareIntentResolver()
825 @NonNull UserManagerService userManager) { in MimeGroupsAwareIntentResolver() argument
826 mUserManager = userManager; in MimeGroupsAwareIntentResolver()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/controls/start/
DControlsStartableTest.kt72 @Mock private lateinit var userManager: UserManager variable in com.android.systemui.controls.start.ControlsStartableTest
83 whenever(userManager.isUserUnlocked(anyInt())).thenReturn(true) in setUp()
226 whenever(userManager.isUserUnlocked(anyInt())).thenReturn(false) in testPreferredSelectionIsPanel_userNotUnlocked_notBind()
240 whenever(userManager.isUserUnlocked(anyInt())).thenReturn(false) in testPreferredSelectionIsPanel_userNotUnlocked_broadcastRegistered_broadcastSentBinds()
264 whenever(userManager.isUserUnlocked(anyInt())).thenReturn(true) in testPreferredSelectionIsPanel_userNotUnlocked_broadcastRegistered_broadcastSentBinds()
334 userManager, in createStartable()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/footer/data/repository/
DUserSwitcherRepository.kt60 private val userManager: UserManager, constant in com.android.systemui.qs.footer.data.repository.UserSwitcherRepositoryImpl
138 userManager.isUserSwitcherEnabled(showUserSwitcherForSingleUser) in isUserSwitcherEnabled()
148 userManager.isGuestUser(KeyguardUpdateMonitor.getCurrentUser()) in isGuestUser()

123456