/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/user/ |
D | UserCreatorTest.kt | 35 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/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/model/app/ |
D | AppRepositoryTest.kt | 28 import com.android.settingslib.spaprivileged.framework.common.userManager 43 private val userManager = mock<UserManager>() constant in com.android.settingslib.spaprivileged.model.app.AppRepositoryTest 46 on { userManager } doReturn userManager in <lambda>() 53 whenever(userManager.isManagedProfile(APP.userId)).thenReturn(true) in produceIconContentDescription_workProfile() 63 whenever(userManager.isManagedProfile(APP.userId)).thenReturn(false) in produceIconContentDescription_personalProfile()
|
D | ApplicationInfosTest.kt | 27 import com.android.settingslib.spaprivileged.framework.common.userManager 48 private lateinit var userManager: UserManager variable in com.android.settingslib.spaprivileged.model.app.ApplicationInfosTest 55 whenever(context.userManager).thenReturn(userManager) in setUp() 120 userManager.hasBaseUserRestriction(UserManager.DISALLOW_APPS_CONTROL, app.userHandle) in isDisallowControl()
|
/frameworks/base/packages/SettingsLib/ProfileSelector/src/com/android/settingslib/widget/ |
D | ProfileSelectFragment.java | 181 UserManager userManager = getContext().getSystemService(UserManager.class); in initProfileTabsToShow() local 182 List<UserHandle> userHandles = userManager.getUserProfiles(); in initProfileTabsToShow() 189 } else if (userManager.isManagedProfile(userHandle.getIdentifier())) { in initProfileTabsToShow() 219 private boolean shouldShowUserInQuietMode(UserHandle userHandle, UserManager userManager) { in shouldShowUserInQuietMode() argument 220 UserProperties userProperties = userManager.getUserProperties(userHandle); in shouldShowUserInQuietMode() 221 return !userManager.isQuietModeEnabled(userHandle) in shouldShowUserInQuietMode() 234 UserManager userManager = userContext.getSystemService(UserManager.class); in shouldShowPrivateProfileIfItsOne() local 235 return userManager.isPrivateProfile() in shouldShowPrivateProfileIfItsOne() 236 && shouldShowUserInQuietMode(userHandle, userManager); in shouldShowPrivateProfileIfItsOne()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/user/ |
D | UserCreator.kt | 39 private val userManager: UserManager, constant in com.android.systemui.user.UserCreator 61 val user = userManager.createUser(userName, UserManager.USER_TYPE_FULL_SECONDARY, 0) in createUser() 75 userManager.setUserIcon( in createUser() 87 userManager.setUserAdmin(userId) in setUserAdmin() 91 return userManager.isAdminUser in isUserAdmin()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/keyguard/ |
D | WorkLockActivityTest.kt | 51 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/tests/MultiUser/src/com/android/test/multiuser/ |
D | MultiUserSettingsTests.java | 85 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/services/core/java/com/android/server/location/injector/ |
D | SystemUserInfoHelper.java | 170 UserManager userManager = getUserManager(); in getProfileIds() local 173 Preconditions.checkState(userManager != null); in getProfileIds() 177 return userManager.getEnabledProfileIds(userId); in getProfileIds() 201 UserManager userManager = getUserManager(); in dump() local 202 if (userManager != null) { in dump() 204 if (userManager.hasUserRestrictionForUser(DISALLOW_SHARE_LOCATION, in dump()
|
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/ |
D | UninstallFinish.java | 73 UserManager userManager = context.getSystemService(UserManager.class); in onReceive() local 102 for (UserHandle otherUserHandle : userManager.getUserHandles(true)) { in onReceive() 105 if (isProfileOfOrSame(userManager, myUserHandle, otherUserHandle)) { in onReceive() 138 List<UserHandle> userHandles = userManager.getUserHandles(true); in onReceive() 149 if (isProfileOfOrSame(userManager, myUserHandle, otherBlockingUserHandle)) { in onReceive() 201 private boolean isProfileOfOrSame(UserManager userManager, UserHandle userHandle, in isProfileOfOrSame() argument 206 return userManager.getProfileParent(profileHandle) != null in isProfileOfOrSame() 207 && userManager.getProfileParent(profileHandle).equals(userHandle); in isProfileOfOrSame()
|
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/handheld/ |
D | UninstallAlertDialogFragment.java | 94 UserManager userManager = getContext().getSystemService(UserManager.class); in getAppDataSize() local 99 List<UserHandle> userHandles = userManager.getUserHandles(true); in getAppDataSize() 138 UserManager userManager = getContext().getSystemService(UserManager.class); in onCreateDialog() local 140 if (isSingleUser(userManager)) { in onCreateDialog() 146 if (dialogInfo.allUsers && !isSingleUser(userManager)) { in onCreateDialog() 264 UserManager userManager = getContext().getSystemService(UserManager.class); in hasClonedInstance() local 265 List<UserHandle> profiles = userManager.getUserProfiles(); in hasClonedInstance() 312 private boolean isSingleUser(UserManager userManager) { in isSingleUser() argument 313 final int userCount = userManager.getUserCount(); in isSingleUser()
|
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/television/ |
D | UninstallAlertFragment.java | 67 UserManager userManager = getContext().getSystemService(UserManager.class); in onCreateGuidance() local 69 if (isSingleUser(userManager)) { in onCreateGuidance() 75 if (dialogInfo.allUsers && !isSingleUser(userManager)) { in onCreateGuidance() 133 private boolean isSingleUser(UserManager userManager) { in isSingleUser() argument 134 final int userCount = userManager.getUserCount(); in isSingleUser()
|
D | UninstallAppProgress.java | 145 UserManager userManager = in handleMessage() local 150 for (UserHandle otherUserHandle : userManager.getUserHandles(true)) { in handleMessage() 153 if (isProfileOfOrSame(userManager, myUserHandle, otherUserHandle)) { in handleMessage() 182 UserManager userManager = in handleMessage() local 185 List<UserHandle> userHandles = userManager.getUserHandles(true); in handleMessage() 195 if (isProfileOfOrSame(userManager, myUserHandle, otherBlockingUserHandle)) { in handleMessage() 228 private boolean isProfileOfOrSame(UserManager userManager, UserHandle userHandle, in isProfileOfOrSame() argument 233 return userManager.getProfileParent(profileHandle) != null in isProfileOfOrSame() 234 && userManager.getProfileParent(profileHandle).equals(userHandle); in isProfileOfOrSame()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ |
D | ManagedProfileControllerImplTest.kt | 45 @Mock private lateinit var userManager: UserManager variable in com.android.systemui.statusbar.phone.ManagedProfileControllerImplTest 51 controller = ManagedProfileControllerImpl(context, mainExecutor, userTracker, userManager) in setup() 104 captor.value.onProfilesChanged(userManager.getEnabledProfiles(1)) in callbackRemovedWhileDispatching_doesntCrash() 108 `when`(userManager.getEnabledProfiles(userId)) in setupWorkingProfile()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/wifi/ |
D | WifiEnterpriseRestrictionUtils.java | 83 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/services/tests/servicestests/src/com/android/server/devicepolicy/ |
D | MockSystemServices.java | 104 public final UserManager userManager; field in MockSystemServices 162 userManager = mock(UserManager.class); in MockSystemServices() 243 when(userManager.getMainUser()).thenReturn(UserHandle.SYSTEM); in MockSystemServices() 286 when(userManager.getUserInfo(eq(userId))).thenReturn(uh); in addUser() 296 when(userManager.getUsers()).thenReturn(mUserInfos); in addUser() 297 when(userManager.getAliveUsers()).thenReturn(mUserInfos); in addUser() 298 when(userManager.isUserRunning(eq(new UserHandle(userId)))).thenReturn(true); in addUser() 299 when(userManager.getProfileParent(anyInt())).thenAnswer( in addUser() 306 when(userManager.getProfileParent(any(UserHandle.class))).thenAnswer( in addUser() 313 when(userManager.getProfiles(anyInt())).thenAnswer( in addUser() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/ |
D | CredentialInteractorImplTest.kt | 47 @Mock private lateinit var userManager: UserManager variable in com.android.systemui.biometrics.domain.interactor.CredentialInteractorImplTest 60 whenever(userManager.getUserInfo(eq(USER_ID))).thenReturn(UserInfo(USER_ID, "", 0)) in setup() 68 userManager, in setup() 86 whenever(userManager.getCredentialOwnerProfile(eq(USER_ID))).thenReturn(value) in testCredentialOwner() 95 whenever(userManager.getProfileParent(eq(USER_ID))) in testParentProfile() 106 whenever(userManager.getProfileParent(eq(USER_ID))).thenReturn(null) in useCredentialOwnerWhenParentProfileIsNull() 107 whenever(userManager.getCredentialOwnerProfile(eq(USER_ID))).thenReturn(value) in useCredentialOwnerWhenParentProfileIsNull()
|
/frameworks/base/packages/StatementService/src/com/android/statementservice/ |
D | StatementServiceApplication.kt | 28 val userManager = getSystemService(UserManager::class.java) ?: return in onCreate() constant 29 if (userManager.isUserUnlocked) { in onCreate()
|
/frameworks/base/core/java/android/provider/ |
D | CallLog.java | 251 UserManager userManager = context.getSystemService(UserManager.class); in storeCallComposerPicture() local 259 Uri baseUri = userManager.isUserUnlocked(realUser) ? CALL_COMPOSER_PICTURE_URI in storeCallComposerPicture() 277 if (!userManager.isUserUnlocked(UserHandle.SYSTEM)) { in storeCallComposerPicture() 317 for (UserInfo u : userManager.getAliveUsers()) { in storeCallComposerPicture() 325 context, userManager, userHandle.getIdentifier())) { in storeCallComposerPicture() 330 if (userManager.isUserRunning(userHandle) in storeCallComposerPicture() 331 && userManager.isUserUnlocked(userHandle)) { in storeCallComposerPicture() 1918 final UserManager userManager = context.getSystemService(UserManager.class); in addCall() local 1919 final int currentUserId = userManager.getProcessUserId(); in addCall() 1922 if (userManager.isUserUnlocked(UserHandle.SYSTEM)) { in addCall() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/notetask/ |
D | NoteTaskController.kt | 79 private val userManager: UserManager, constant in com.android.systemui.notetask.NoteTaskController 144 .firstOrNull { userManager.isManagedProfile(it.id) } in getUserForHandlingNotesTaking() 195 if (!userManager.isUserUnlocked) return in awaitShowNoteTaskAsUser() 267 if (!userManager.isUserUnlocked(user)) { in setNoteTaskShortcutEnabled() 303 if (userManager.isManagedProfile(profile.id)) { in updateNoteTaskForCurrentUserAndManagedProfiles() 321 if (!userManager.isUserUnlocked(user)) { in updateNoteTaskAsUser() 346 if (!userManager.isUserUnlocked(user)) { in launchUpdateNoteTaskAsUser()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/fuelgauge/ |
D | BatteryUtils.java | 82 final UserManager userManager = context.getSystemService(UserManager.class); in isWorkProfile() local 83 return userManager.isManagedProfile() && !userManager.isSystemUser(); in isWorkProfile()
|
/frameworks/base/packages/Shell/tests/src/com/android/shell/ |
D | BugreportProgressServiceTest.java | 58 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/packages/SystemUI/tests/utils/src/com/android/systemui/communal/domain/interactor/ |
D | CommunalInteractorKosmos.kt | 19 import android.os.userManager 59 userManager = userManager, in <lambda>()
|
/frameworks/base/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/model/app/ |
D | AppRepository.kt | 29 import com.android.settingslib.spaprivileged.framework.common.userManager 56 val userInfo = context.userManager.getUserInfo(app.userId) in rememberAppRepository() 86 context.userManager.isManagedProfile(app.userId) -> { in produceIconContentDescription()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/settings/ |
D | UserTrackerImplTest.kt | 78 private lateinit var userManager: UserManager in <lambda>() variable in com.android.systemui.settings.UserTrackerImplTest 115 `when`(userManager.getProfiles(anyInt())).thenAnswer { invocation -> in <lambda>() 125 userManager, in <lambda>() 200 verify(userManager).getProfiles(testID) in <lambda>() 224 verify(userManager).getProfiles(newID) in <lambda>() 241 `when`(userManager.getProfiles(anyInt())).thenAnswer { invocation -> in <lambda>() 267 `when`(userManager.getProfiles(anyInt())).thenAnswer { invocation -> in <lambda>() 293 `when`(userManager.getProfiles(anyInt())).thenAnswer { invocation -> in <lambda>() 314 `when`(userManager.getProfiles(anyInt())).thenAnswer { invocation -> in <lambda>() 416 `when`(userManager.getProfiles(anyInt())).thenAnswer { invocation -> in <lambda>()
|
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/ |
D | UninstallRepository.kt | 59 private val userManager: UserManager? = context.getSystemService(UserManager::class.java) constant in com.android.packageinstaller.v2.model.UninstallRepository 131 if (uninstallFromAllUsers && !userManager!!.isAdminUser) { in performPreUninstallChecks() 140 val profiles = userManager!!.userProfiles in performPreUninstallChecks() 228 if (userManager!!.isSameProfileGroup(myUserHandle, uninstalledUser!!)) { in generateUninstallDetails() 305 val userCount = userManager!!.userCount in isSingleUser() 312 val profiles = userManager!!.userProfiles in hasClonedInstance() 350 val userHandles = userManager!!.getUserHandles(true) in getAppDataSize() 536 userManager!!, in handleUninstallResult() 596 for (otherUserHandle in userManager!!.getUserHandles(true)) { in findUserOfDeviceAdmin() 599 if (isProfileOfOrSame(userManager, myUserHandle, otherUserHandle)) { in findUserOfDeviceAdmin() [all …]
|