Home
last modified time | relevance | path

Searched refs:myUserId (Results 1 – 25 of 552) sorted by relevance

12345678910>>...23

/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/security/
DSecurityEntryPreferenceControllerTest.java59 getShadowUserManager().addUser(UserHandle.myUserId(), "name", UserInfo.FLAG_GUEST); in getAvailabilityStatus_guestUser_disabledForUser()
67 getShadowUserManager().addUser(UserHandle.myUserId(), "name", UserInfo.FLAG_GUEST); in getAvailabilityStatus_guestUser_disabledForUser_zoneWrite()
75 getShadowUserManager().addUser(UserHandle.myUserId(), "name", UserInfo.FLAG_GUEST); in getAvailabilityStatus_guestUser_disabledForUser_zoneRead()
83 getShadowUserManager().addUser(UserHandle.myUserId(), "name", UserInfo.FLAG_GUEST); in getAvailabilityStatus_guestUser_disabledForUser_zoneHidden()
90 getShadowUserManager().addUser(UserHandle.myUserId(), "name", /* flags= */ 0); in getAvailabilityStatus_nonGuestUser_available()
98 getShadowUserManager().addUser(UserHandle.myUserId(), "name", /* flags= */ 0); in getAvailabilityStatus_nonGuestUser_available_zoneWrite()
106 getShadowUserManager().addUser(UserHandle.myUserId(), "name", /* flags= */ 0); in getAvailabilityStatus_nonGuestUser_available_zoneRead()
114 getShadowUserManager().addUser(UserHandle.myUserId(), "name", /* flags= */ 0); in getAvailabilityStatus_nonGuestUser_available_zoneHidden()
/packages/apps/Settings/src/com/android/settings/notification/
DRedactNotificationPreferenceController.java79 mProfileUserId = UserHandle.myUserId(); in RedactNotificationPreferenceController()
80 final List<UserInfo> profiles = mUm.getProfiles(UserHandle.myUserId()); in RedactNotificationPreferenceController()
85 && profile.getUserHandle().getIdentifier() != UserHandle.myUserId()) { in RedactNotificationPreferenceController()
97 ? UserHandle.myUserId() : mProfileUserId; in displayPreference()
106 ? UserHandle.myUserId() : mProfileUserId; in isChecked()
114 ? UserHandle.myUserId() : mProfileUserId; in setChecked()
125 && mProfileUserId == UserHandle.myUserId()) { in getAvailabilityStatus()
130 ? UserHandle.myUserId() : mProfileUserId; in getAvailabilityStatus()
/packages/apps/Settings/tests/robotests/src/com/android/settings/location/
DLocationInjectedServicesPreferenceControllerTest.java130 new int[]{UserHandle.myUserId(), fakeWorkProfileId}); in workProfileDisallowShareLocationOn_getParentUserLocationServicesOnly()
131 ShadowUserManager.getShadow().addProfile(new UserInfo(UserHandle.myUserId(), "", 0)); in workProfileDisallowShareLocationOn_getParentUserLocationServicesOnly()
161 new int[]{UserHandle.myUserId(), fakeWorkProfileId}); in workProfileDisallowShareLocationOff_getAllUserLocationServices()
162 ShadowUserManager.getShadow().addProfile(new UserInfo(UserHandle.myUserId(), "", 0)); in workProfileDisallowShareLocationOff_getAllUserLocationServices()
191 new int[]{UserHandle.myUserId(), fakePrivateProfileId}); in privateProfileDisallowShareLocationOn_getParentUserLocationServicesOnly()
192 ShadowUserManager.getShadow().addProfile(new UserInfo(UserHandle.myUserId(), "", 0)); in privateProfileDisallowShareLocationOn_getParentUserLocationServicesOnly()
226 new int[]{UserHandle.myUserId(), fakePrivateProfileId}); in privateProfileDisallowShareLocationOff_getAllUserLocationServices()
227 ShadowUserManager.getShadow().addProfile(new UserInfo(UserHandle.myUserId(), "", 0)); in privateProfileDisallowShareLocationOff_getAllUserLocationServices()
263 map.put(UserHandle.myUserId(), preferences); in withUserRestriction_shouldDisableLocationAccuracy()
266 ShadowUserManager.getShadow().setProfileIdsWithDisabled(new int[]{UserHandle.myUserId()}); in withUserRestriction_shouldDisableLocationAccuracy()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/
DRedactionInterstitialTest.java113 UserHandle.myUserId(), UserHandle.myUserId(), in managedProfileNoRestrictionsTest()
128 UserHandle.myUserId(), UserHandle.myUserId(), in managedProfileUnredactedRestrictionTest()
143 LOCK_SCREEN_SHOW_NOTIFICATIONS, 1, UserHandle.myUserId()); in defaultShowSensitiveContent_configDeny()
154 LOCK_SCREEN_SHOW_NOTIFICATIONS, 1, UserHandle.myUserId()); in defaultShowSensitiveContent_configAllow()
177 LOCK_SCREEN_SHOW_NOTIFICATIONS, show, UserHandle.myUserId()); in setupSettings()
179 LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, showUnredacted, UserHandle.myUserId()); in setupSettings()
/packages/apps/Car/Settings/src/com/android/car/settings/storage/
DStorageFileCategoryPreferenceController.java68 StorageAsyncLoader.AppsStorageResult data = result.get(UserHandle.myUserId()); in calculateCategoryUsage()
76 int myUserId = UserHandle.myUserId(); in handlePreferenceClicked() local
78 intent.putExtra(Intent.EXTRA_USER_ID, myUserId); in handlePreferenceClicked()
80 getContext().startActivityAsUser(intent, UserHandle.of(myUserId)); in handlePreferenceClicked()
/packages/modules/Permission/tests/utils/safetycenter/java/com/android/safetycenter/testing/
DSafetyCenterTestData.kt165 userId: Int = UserHandle.myUserId(), in safetyCenterStatusOneAlert()
183 userId: Int = UserHandle.myUserId(), in safetyCenterStatusOneAlert()
196 userId: Int = UserHandle.myUserId(), in safetyCenterStatusOneAlert()
239 userId: Int = UserHandle.myUserId(), in safetyCenterStatusOneAlert()
254 userId: Int = UserHandle.myUserId(), in safetyCenterStatusOneAlert()
292 userId: Int = UserHandle.myUserId(), in safetyCenterStatusOneAlert()
332 userId: Int = UserHandle.myUserId(), in safetyCenterIssueRecommendation()
385 userId: Int = UserHandle.myUserId(), in safetyCenterIssueCritical()
455 fun entryId(sourceId: String, userId: Int = UserHandle.myUserId()) = in entryId()
468 userId: Int = UserHandle.myUserId() in entryId()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/
DExternalSourcesDetailsTest.java129 shadowUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in refreshUi_userRestrictionsUnknownSources_disablesSwitchPreference()
143 UserHandle.of(UserHandle.myUserId()))).isTrue(); in refreshUi_userRestrictionsUnknownSources_disablesSwitchPreference()
168 shadowUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in refreshUi_userRestrictionsUnknownSourcesGlobally_disablesSwitchPreference()
182 UserHandle.of(UserHandle.myUserId()))).isTrue(); in refreshUi_userRestrictionsUnknownSourcesGlobally_disablesSwitchPreference()
207 shadowUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in refreshUi_bothUnknownSourcesUserRestrictions_disableSwitchPreference()
209 shadowUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in refreshUi_bothUnknownSourcesUserRestrictions_disableSwitchPreference()
223 UserHandle.of(UserHandle.myUserId()))).isTrue(); in refreshUi_bothUnknownSourcesUserRestrictions_disableSwitchPreference()
226 UserHandle.of(UserHandle.myUserId()))).isTrue(); in refreshUi_bothUnknownSourcesUserRestrictions_disableSwitchPreference()
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/device/apps/
DRecentAppsPreferenceControllerTest.java157 when(mAppState.getEntry(stat1.mPackageName, UserHandle.myUserId())) in display_showRecents()
159 when(mAppState.getEntry(stat2.mPackageName, UserHandle.myUserId())) in display_showRecents()
161 when(mAppState.getEntry(stat3.mPackageName, UserHandle.myUserId())) in display_showRecents()
196 when(mAppState.getEntry(stat1.mPackageName, UserHandle.myUserId())).thenReturn(stat1Entry); in display_showRecentsWithInstantApp()
197 when(mAppState.getEntry(stat2.mPackageName, UserHandle.myUserId())).thenReturn(stat2Entry); in display_showRecentsWithInstantApp()
234 when(mAppState.getEntry(stat1.mPackageName, UserHandle.myUserId())) in display_showRecentsWithNullAppEntryOrInfo()
236 when(mAppState.getEntry(stat2.mPackageName, UserHandle.myUserId())) in display_showRecentsWithNullAppEntryOrInfo()
260 when(mAppState.getEntry(stat1.mPackageName, UserHandle.myUserId())) in display_hasRecentButNoneDisplayable_showAllApps()
262 when(mAppState.getEntry(stat2.mPackageName, UserHandle.myUserId())) in display_hasRecentButNoneDisplayable_showAllApps()
282 when(mAppState.getEntry(stat1.mPackageName, UserHandle.myUserId())) in display_showRecents_formatSummary()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/
DUserPickerActivity.java46 int myUserId = UserHandle.myUserId(); in onCreate() local
47 Log.i(TAG, "onCreate userid " + myUserId); in onCreate()
48 if (myUserId != UserHandle.USER_SYSTEM) { in onCreate()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/media/
DMediaBrowserProxyService.java79 + ", myUserId=" + UserHandle.myUserId()); in connect()
120 Log.d(TAG, "disconnect() for user " + UserHandle.myUserId()); in disconnect()
132 Log.d(TAG, "addSubscriptionDeprecated() for user " + UserHandle.myUserId()); in addSubscriptionDeprecated()
146 Log.d(TAG, "removeSubscriptionDeprecated() for user " + UserHandle.myUserId()); in removeSubscriptionDeprecated()
160 Log.d(TAG, "getMediaItem() for user " + UserHandle.myUserId()); in getMediaItem()
173 Log.d(TAG, "addSubscription() for user " + UserHandle.myUserId()); in addSubscription()
186 Log.d(TAG, "removeSubscription() for user " + UserHandle.myUserId()); in removeSubscription()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/bluetooth/
DPairNewDevicePreferenceControllerTest.java151 UserHandle.of(UserHandle.myUserId()), DISALLOW_BLUETOOTH, true); in getAvailabilityStatus_disallowBluetoothUserRestriction_disabledForUser()
162 UserHandle.of(UserHandle.myUserId()), DISALLOW_BLUETOOTH, true); in getAvailabilityStatus_disallowBluetoothUserRestriction_zoneWrite()
173 UserHandle.of(UserHandle.myUserId()), DISALLOW_BLUETOOTH, true); in getAvailabilityStatus_disallowBluetoothUserRestriction_zoneRead()
184 UserHandle.of(UserHandle.myUserId()), DISALLOW_BLUETOOTH, true); in getAvailabilityStatus_disallowBluetoothUserRestriction_zoneHidden()
194 UserHandle.of(UserHandle.myUserId()), DISALLOW_CONFIG_BLUETOOTH, true); in getAvailabilityStatus_disallowConfigBluetoothUserRestriction_disabledForUser()
205 UserHandle.of(UserHandle.myUserId()), DISALLOW_CONFIG_BLUETOOTH, true); in getAvailabilityStatus_disallowConfigBluetoothUserRestriction_zoneWrite()
216 UserHandle.of(UserHandle.myUserId()), DISALLOW_CONFIG_BLUETOOTH, true); in getAvailabilityStatus_disallowConfigBluetoothUserRestriction_zoneRead()
227 UserHandle.of(UserHandle.myUserId()), DISALLOW_CONFIG_BLUETOOTH, true); in getAvailabilityStatus_disallowConfigBluetoothUserRestriction_zoneHidden()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/
DRecentAppStatsMixinTest.java119 when(mAppState.getEntry(stat1.mPackageName, UserHandle.myUserId())) in loadDisplayableRecentApps_oneValidRecentAppSet_shouldHaveOneRecentApp()
150 when(mAppState.getEntry(stat1.mPackageName, UserHandle.myUserId())) in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps()
152 when(mAppState.getEntry(stat2.mPackageName, UserHandle.myUserId())) in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps()
154 when(mAppState.getEntry(stat3.mPackageName, UserHandle.myUserId())) in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps()
186 when(mAppState.getEntry(stat1.mPackageName, UserHandle.myUserId())) in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp()
188 when(mAppState.getEntry(stat2.mPackageName, UserHandle.myUserId())) in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp()
190 when(mAppState.getEntry(stat3.mPackageName, UserHandle.myUserId())) in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp()
217 when(mAppState.getEntry(stat.mPackageName, UserHandle.myUserId())).thenReturn(statEntry); in loadDisplayableRecentApps_oneInstantAppSet_shouldHaveOneRecentApp()
245 when(mAppState.getEntry(stat1.mPackageName, UserHandle.myUserId())) in loadDisplayableRecentApps_withNullAppEntryOrInfo_shouldNotCrash()
247 when(mAppState.getEntry(stat2.mPackageName, UserHandle.myUserId())) in loadDisplayableRecentApps_withNullAppEntryOrInfo_shouldNotCrash()
[all …]
/packages/apps/Settings/tests/robotests/testutils/com/android/settings/testutils/shadow/
DShadowLockPatternUtils.java204 sUserToComplexityMap.put(UserHandle.myUserId(), complexity); in setRequiredPasswordComplexity()
208 sUserToProfileComplexityMap.put(UserHandle.myUserId(), complexity); in setRequiredProfilePasswordComplexity()
223 sUserToMetricsMap.put(UserHandle.myUserId(), metrics); in setRequestedPasswordMetrics()
227 sUserToProfileMetricsMap.put(UserHandle.myUserId(), metrics); in setRequestedProfilePasswordMetrics()
231 sUserToActivePasswordQualityMap.put(UserHandle.myUserId(), quality); in setActivePasswordQuality()
245 sKeyguardStoredPasswordQualityMap.put(UserHandle.myUserId(), quality); in setKeyguardStoredPasswordQuality()
/packages/apps/Settings/tests/robotests/src/com/android/settings/users/
DMultiUserSwitchBarControllerTest.java64 mUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in onStart_disallowUserSwitch_shouldSetDisabledByAdmin()
75 mUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in onStart_allowUserSwitch_shouldNotSetDisabledByAdmin()
86 mUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in onStart_userIsNotMain_shouldNotBeEnabled()
98 mUserManager.setUserRestriction(UserHandle.of(UserHandle.myUserId()), in onStart_userIsMain_shouldBeEnabled()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/provisioning/
DProvisioningControllerFactory.java46 ? UserHandle.USER_SYSTEM : UserHandle.myUserId(); in createProvisioningController()
58 UserHandle.myUserId(), in createProvisioningController()
64 UserHandle.myUserId(), in createProvisioningController()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/location/
DLocationStateSwitchOuterPreferenceControllerTest.java84 int currentUser = UserHandle.myUserId(); in getDefaultAvailabilityStatus_driverWithAdas_conditionallyUnavailable()
95 int currentUser = UserHandle.myUserId(); in getDefaultAvailabilityStatus_driverNoAdas_available()
106 int nonCurrentUser = UserHandle.myUserId() + 1; in getDefaultAvailabilityStatus_passengerAdas_available()
117 int nonCurrentUser = UserHandle.myUserId() + 1; in getDefaultAvailabilityStatus_passengerNoAdas_available()
DLocationRequiredAppsSectionPreferenceControllerTest.java84 int currentUser = UserHandle.myUserId(); in getDefaultAvailabilityStatus_driverWithAdas_available()
95 int currentUser = UserHandle.myUserId(); in getDefaultAvailabilityStatus_driverNoAdas_conditionallyUnavailable()
106 int nonCurrentUser = UserHandle.myUserId() + 1; in getDefaultAvailabilityStatus_passengerAdas_conditionallyUnavailable()
117 int nonCurrentUser = UserHandle.myUserId() + 1; in getDefaultAvailabilityStatus_passengerNoAdas_conditionallyUnavailable()
DLocationAccessDisclaimerPreferenceControllerTest.java84 int currentUser = UserHandle.myUserId(); in getDefaultAvailabilityStatus_driverWithAdas_conditionallyUnavailable()
95 int currentUser = UserHandle.myUserId(); in getDefaultAvailabilityStatus_driverNoAdas_available()
106 int nonCurrentUser = UserHandle.myUserId() + 1; in getDefaultAvailabilityStatus_passengerAdas_available()
117 int nonCurrentUser = UserHandle.myUserId() + 1; in getDefaultAvailabilityStatus_passengerNoAdas_available()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/applications/
DStoragePreferenceControllerTest.java106 when(mMockApplicationsState.getEntry(PACKAGE_NAME, UserHandle.myUserId())) in onCreate_nullSize_calculatingSummary()
120 when(mMockApplicationsState.getEntry(PACKAGE_NAME, UserHandle.myUserId())) in onCreate_validApp_sizeSummary()
135 when(mMockApplicationsState.getEntry(PACKAGE_NAME, UserHandle.myUserId())) in onCreate_lateAppLoad_updateSummary()
153 when(mMockApplicationsState.getEntry(PACKAGE_NAME, UserHandle.myUserId())) in onCreate_packageSizeChange_updateSummary()
171 when(mMockApplicationsState.getEntry(PACKAGE_NAME, UserHandle.myUserId())) in onCreate_otherPackageSizeChange_doesNotUpdateSummary()
/packages/apps/Settings/tests/unit/src/com/android/settings/homepage/contextualcards/slices/
DFaceSetupSliceTest.java68 when(faceManager.hasEnrolledTemplates(UserHandle.myUserId())).thenReturn(true); in getSlice_faceEnrolled_noReEnroll_shouldReturnNull()
83 when(faceManager.hasEnrolledTemplates(UserHandle.myUserId())).thenReturn(false); in getSlice_faceNotEnrolled_shouldReturnSlice()
94 when(faceManager.hasEnrolledTemplates(UserHandle.myUserId())).thenReturn(true); in getSlice_faceEnrolled_shouldReEnroll_shouldReturnSlice()
107 when(faceManager.hasEnrolledTemplates(UserHandle.myUserId())).thenReturn(true); in getSlice_faceEnrolled_musteEnroll_shouldReturnSlice()
/packages/modules/Permission/PermissionController/tests/outofprocess/src/com/android/permissioncontroller/tests/outofprocess/
DDumpTest.kt20 import android.os.UserHandle.myUserId
67 assertThat(dump.autoRevoke.usersList.map { it.userId }).contains(myUserId()) in autoRevokeDumpHasCurrentUser()
77 assertThat(dump.autoRevoke.usersList[myUserId()].packagesList.map { it.packageName }) in autoRevokeDumpHasAndroidPackage()
/packages/apps/Settings/src/com/android/settings/
DUserCredentialsSettings.java163 final int myUserId = UserHandle.myUserId(); in onCreateDialog() local
165 myUserId)) { in onCreateDialog()
169 .checkIfRestrictionEnforced(getContext(), restriction, myUserId); in onCreateDialog()
292 final int myUserId = UserHandle.myUserId(); in doInBackground() local
293 final int systemUid = UserHandle.getUid(myUserId, Process.SYSTEM_UID); in doInBackground()
294 final int wifiUid = UserHandle.getUid(myUserId, Process.WIFI_UID); in doInBackground()
300 if (myUserId == 0) { in doInBackground()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/accessibility/
DScreenReaderEnabledSwitchPreferenceControllerTest.java85 UserHandle.myUserId())).contains(mScreenReaderComponent); in testSwitchedSetOn_setsScreenReaderEnabled()
96 UserHandle.myUserId())).doesNotContain(mScreenReaderComponent); in testSwitchedSetOff_setsScreenReaderDisabled()
102 UserHandle.myUserId()); in setScreenReaderEnabled()
/packages/apps/Settings/src/com/android/settings/security/
DScreenPinningSettings.java131 int defaultValueIfSettingNull = mLockPatternUtils.isSecure(UserHandle.myUserId()) ? 1 : 0; in isScreenLockUsed()
141 .getKeyguardStoredPasswordQuality(UserHandle.myUserId()); in setScreenLockUsed()
174 UserHandle.myUserId()) in onActivityResult()
185 int quality = lockPatternUtils.getKeyguardStoredPasswordQuality(UserHandle.myUserId()); in getCurrentSecurityTitle()
196 if (lockPatternUtils.isLockPatternEnabled(UserHandle.myUserId())) { in getCurrentSecurityTitle()
/packages/apps/Settings/src/com/android/settings/notification/app/
DVisibilityPreferenceController.java159 final UserInfo parentUser = mUm.getProfileParent(UserHandle.myUserId()); in getLockscreenNotificationsEnabled()
160 final int primaryUserId = parentUser != null ? parentUser.id : UserHandle.myUserId(); in getLockscreenNotificationsEnabled()
171 boolean lockscreenSecure = mLockPatternUtils.isSecure(UserHandle.myUserId()); in isLockScreenSecure()
172 UserInfo parentUser = mUm.getProfileParent(UserHandle.myUserId()); in isLockScreenSecure()

12345678910>>...23