Home
last modified time | relevance | path

Searched refs:userHandle (Results 1 – 25 of 172) sorted by relevance

1234567

/packages/services/Telecomm/src/com/android/server/telecom/ui/
DMissedCallNotifierImpl.java162 public void clearMissedCalls(UserHandle userHandle) { in clearMissedCalls() argument
165 if (!shouldManageNotificationThroughDefaultDialer(userHandle)) { in clearMissedCalls()
166 markMissedCallsAsRead(userHandle); in clearMissedCalls()
168 cancelMissedCallNotification(userHandle); in clearMissedCalls()
171 private void markMissedCallsAsRead(final UserHandle userHandle) { in markMissedCallsAsRead() argument
186 .maybeAddUserId(Calls.CONTENT_URI, userHandle.getIdentifier()); in markMissedCallsAsRead()
207 private Intent getShowMissedCallIntentForDefaultDialer(UserHandle userHandle) { in getShowMissedCallIntentForDefaultDialer() argument
209 userHandle.getIdentifier()); in getShowMissedCallIntentForDefaultDialer()
217 private boolean shouldManageNotificationThroughDefaultDialer(UserHandle userHandle) { in shouldManageNotificationThroughDefaultDialer() argument
218 Intent intent = getShowMissedCallIntentForDefaultDialer(userHandle); in shouldManageNotificationThroughDefaultDialer()
[all …]
DDisconnectedCallNotifier.java75 public final UserHandle userHandle; field in DisconnectedCallNotifier.CallInfo
83 public CallInfo(UserHandle userHandle, Uri handle, long endTimeMs, Bitmap callerInfoIcon, in CallInfo() argument
85 this.userHandle = userHandle; in CallInfo()
97 "userHandle=" + userHandle + in toString()
146 UserHandle userHandle = call.getTargetPhoneAccount() != null ? in onCallStateChanged() local
149 if (userHandle == null) userHandle = mCallsManager.getCurrentUserHandle(); in onCallStateChanged()
150 mPendingCallNotification = new CallInfo(userHandle, call.getHandle(), in onCallStateChanged()
157 Log.i(this, "showDisconnectedNotification: userHandle=%d", call.userHandle.getIdentifier()); in showDisconnectedNotification()
168 Context contextForUser = getContextForUser(call.userHandle); in showDisconnectedNotification()
184 publicBuilder.setContentIntent(createCallLogPendingIntent(call.userHandle)); in showDisconnectedNotification()
[all …]
/packages/apps/Car/Notification/tests/robotests/src/com/android/car/notification/
DCarNotificationListenerTest.java91 UserHandle userHandle = new UserHandle(UserHandle.USER_NULL); in onNotificationPosted_isHun_notForCurrentUser_ignoresTheEvent() local
92 when(mStatusBarNotification.getUser()).thenReturn(userHandle); in onNotificationPosted_isHun_notForCurrentUser_ignoresTheEvent()
103 UserHandle userHandle = new UserHandle(UserHandle.USER_NULL); in onNotificationPosted_isNotHun_notForCurrentUser_ignoresTheEvent() local
104 when(mStatusBarNotification.getUser()).thenReturn(userHandle); in onNotificationPosted_isNotHun_notForCurrentUser_ignoresTheEvent()
115 UserHandle userHandle = new UserHandle(CURRENT_USER_ID); in onNotificationPosted_isHun_isForCurrentUser_addsAlertEntryToDataManager() local
116 when(mStatusBarNotification.getUser()).thenReturn(userHandle); in onNotificationPosted_isHun_isForCurrentUser_addsAlertEntryToDataManager()
126 UserHandle userHandle = new UserHandle(CURRENT_USER_ID); in onNotificationPosted_isHun_isForCurrentUser_doesNotAddItToActiveNotifications() local
127 when(mStatusBarNotification.getUser()).thenReturn(userHandle); in onNotificationPosted_isHun_isForCurrentUser_doesNotAddItToActiveNotifications()
138 UserHandle userHandle = new UserHandle(UserHandle.USER_ALL); in onNotificationPosted_isHun_isForAllUsers_addsAlertEntryToDataManager() local
139 when(mStatusBarNotification.getUser()).thenReturn(userHandle); in onNotificationPosted_isHun_isForAllUsers_addsAlertEntryToDataManager()
[all …]
/packages/services/Telecomm/src/com/android/server/telecom/
DPhoneAccountRegistrar.java204 UserHandle userHandle) { in getOutgoingPhoneAccountForScheme() argument
205 final PhoneAccountHandle userSelected = getUserSelectedOutgoingPhoneAccount(userHandle); in getOutgoingPhoneAccountForScheme()
217 userHandle); in getOutgoingPhoneAccountForScheme()
240 public PhoneAccountHandle getUserSelectedOutgoingPhoneAccount(UserHandle userHandle) { in getUserSelectedOutgoingPhoneAccount() argument
241 if (userHandle == null) { in getUserSelectedOutgoingPhoneAccount()
245 .get(userHandle); in getUserSelectedOutgoingPhoneAccount()
251 userHandle); in getUserSelectedOutgoingPhoneAccount()
263 private DefaultPhoneAccountHandle getUserSelectedDefaultPhoneAccount(UserHandle userHandle) { in getUserSelectedDefaultPhoneAccount() argument
264 if (userHandle == null) { in getUserSelectedDefaultPhoneAccount()
268 .get(userHandle); in getUserSelectedDefaultPhoneAccount()
[all …]
DTelecomBroadcastIntentProcessor.java123 UserHandle userHandle = intent.getParcelableExtra(EXTRA_USERHANDLE); in processIntent() local
124 if (userHandle == null) { in processIntent()
135 missedCallNotifier.clearMissedCalls(userHandle); in processIntent()
136 sendSmsIntent(intent, userHandle); in processIntent()
142 missedCallNotifier.clearMissedCalls(userHandle); in processIntent()
143 sendCallBackIntent(intent, userHandle); in processIntent()
147 missedCallNotifier.clearMissedCalls(userHandle); in processIntent()
152 UserHandle userHandle = intent.getParcelableExtra(EXTRA_USERHANDLE); in processIntent() local
153 if (userHandle == null) { in processIntent()
165 disconnectedCallNotifier.clearNotification(userHandle); in processIntent()
[all …]
DEmergencyCallHelper.java51 void maybeGrantTemporaryLocationPermission(Call call, UserHandle userHandle) { in maybeGrantTemporaryLocationPermission() argument
53 grantLocationPermission(userHandle); in maybeGrantTemporaryLocationPermission()
96 private void grantLocationPermission(UserHandle userHandle) { in grantLocationPermission() argument
99 + ", user: " + userHandle); in grantLocationPermission()
110 Manifest.permission.ACCESS_FINE_LOCATION, userHandle); in grantLocationPermission()
114 Manifest.permission.ACCESS_BACKGROUND_LOCATION, userHandle); in grantLocationPermission()
118 recordPermissionGrant(userHandle); in grantLocationPermission()
121 + ", user: " + userHandle); in grantLocationPermission()
129 UserHandle userHandle = mLocationPermissionGrantedToUser; in revokeLocationPermission() local
133 Manifest.permission.ACCESS_FINE_LOCATION, userHandle); in revokeLocationPermission()
[all …]
DUserUtil.java29 private static UserInfo getUserInfoFromUserHandle(Context context, UserHandle userHandle) { in getUserInfoFromUserHandle() argument
31 return userManager.getUserInfo(userHandle.getIdentifier()); in getUserInfoFromUserHandle()
34 public static boolean isManagedProfile(Context context, UserHandle userHandle) { in isManagedProfile() argument
35 UserInfo userInfo = getUserInfoFromUserHandle(context, userHandle); in isManagedProfile()
39 public static boolean isProfile(Context context, UserHandle userHandle) { in isProfile() argument
40 UserInfo userInfo = getUserInfoFromUserHandle(context, userHandle); in isProfile()
DRingtoneFactory.java110 private Context getWorkProfileContextForUser(UserHandle userHandle) { in getWorkProfileContextForUser() argument
114 userHandle.getIdentifier()); in getWorkProfileContextForUser()
119 if (profileUserHandle != userHandle && profile.isManagedProfile()) { in getWorkProfileContextForUser()
133 private Context getContextForUserHandle(UserHandle userHandle) { in getContextForUserHandle() argument
134 if(userHandle == null) { in getContextForUserHandle()
138 return mContext.createPackageContextAsUser(mContext.getPackageName(), 0, userHandle); in getContextForUserHandle()
/packages/apps/Settings/tests/robotests/src/com/android/settings/testutils/shadow/
DShadowSecureSettings.java39 String tag, boolean makeDefault, int userHandle, boolean overrideableByRestore) { in putStringForUser() argument
43 userTable.put(userHandle, name, value); in putStringForUser()
45 userTable.remove(userHandle, name); in putStringForUser()
52 public static String getStringForUser(ContentResolver resolver, String name, int userHandle) { in getStringForUser() argument
55 return (String) userTable.get(userHandle, name); in getStringForUser()
61 int userHandle) { in putIntForUser() argument
64 userTable.put(userHandle, name, value); in putIntForUser()
71 int userHandle) { in getIntForUser() argument
74 final Object object = userTable.get(userHandle, name); in getIntForUser()
81 int userHandle) { in putLongForUser() argument
[all …]
DShadowDevicePolicyManager.java34 public void setShortSupportMessageForUser(ComponentName admin, int userHandle, String message) { in setShortSupportMessageForUser() argument
35 mSupportMessagesMap.put(Objects.hash(admin, userHandle), message); in setShortSupportMessageForUser()
40 int userHandle) { in getShortSupportMessageForUser() argument
41 return mSupportMessagesMap.get(Objects.hash(admin, userHandle)); in getShortSupportMessageForUser()
55 protected long getMaximumTimeToLock(ComponentName admin, @UserIdInt int userHandle) { in getMaximumTimeToLock() argument
56 return mProfileTimeouts.getOrDefault(userHandle, 0L); in getMaximumTimeToLock()
72 public void setMaximumTimeToLock(@UserIdInt int userHandle, Long timeout) { in setMaximumTimeToLock() argument
73 mProfileTimeouts.put(userHandle, timeout); in setMaximumTimeToLock()
81 public PasswordMetrics getPasswordMinimumMetrics(int userHandle) { in getPasswordMinimumMetrics() argument
DShadowUserManager.java70 protected List<UserInfo> getProfiles(@UserIdInt int userHandle) { in getProfiles() argument
75 protected int[] getProfileIds(@UserIdInt int userHandle, boolean enabledOnly) { in getProfileIds() argument
84 protected int getCredentialOwnerProfile(@UserIdInt int userHandle) { in getCredentialOwnerProfile() argument
85 return userHandle; in getCredentialOwnerProfile()
89 protected boolean hasBaseUserRestriction(String restrictionKey, UserHandle userHandle) { in hasBaseUserRestriction() argument
115 String restrictionKey, UserHandle userHandle) { in getUserRestrictionSources() argument
119 mRestrictionSources.get(restrictionKey + userHandle.getIdentifier()); in getUserRestrictionSources()
124 String restrictionKey, UserHandle userHandle, List<EnforcingUser> enforcers) { in setUserRestrictionSources() argument
125 mRestrictionSources.put(restrictionKey + userHandle.getIdentifier(), enforcers); in setUserRestrictionSources()
129 protected boolean isQuietModeEnabled(UserHandle userHandle) { in isQuietModeEnabled() argument
/packages/apps/Car/Settings/src/com/android/car/settings/accounts/
DAccountSyncDetailsFragment.java61 public static AccountSyncDetailsFragment newInstance(Account account, UserHandle userHandle) { in newInstance() argument
65 bundle.putParcelable(EXTRA_USER_HANDLE, userHandle); in newInstance()
94 UserHandle userHandle = getArguments().getParcelable(EXTRA_USER_HANDLE); in onAttach() local
101 .setUserHandle(userHandle); in onAttach()
106 .setUserHandle(userHandle); in onAttach()
136 UserHandle userHandle = getArguments().getParcelable(EXTRA_USER_HANDLE); in updateSyncButton() local
138 userHandle.getIdentifier()).isEmpty(); in updateSyncButton()
151 UserHandle userHandle = getArguments().getParcelable(EXTRA_USER_HANDLE); in requestSyncForEnabledProviders() local
152 int userId = userHandle.getIdentifier(); in requestSyncForEnabledProviders()
155 userHandle); in requestSyncForEnabledProviders()
[all …]
DAccountSyncHelper.java46 UserHandle userHandle) { in getVisibleSyncAdaptersForAccount() argument
48 userHandle); in getVisibleSyncAdaptersForAccount()
51 (SyncAdapterType syncAdapter) -> !isVisible(context, syncAdapter, userHandle)); in getVisibleSyncAdaptersForAccount()
58 UserHandle userHandle) { in getSyncableSyncAdaptersForAccount() argument
62 userHandle.getIdentifier()); in getSyncableSyncAdaptersForAccount()
73 userHandle.getIdentifier()) > 0; in getSyncableSyncAdaptersForAccount()
106 static CharSequence getTitle(Context context, String authority, UserHandle userHandle) { in getTitle() argument
109 authority, /* flags= */ 0, userHandle.getIdentifier()); in getTitle()
153 UserHandle userHandle) { in isVisible() argument
163 userHandle.getIdentifier()); in isVisible()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/core/
DSubSettingLauncher.java108 public SubSettingLauncher setUserHandle(UserHandle userHandle) { in setUserHandle() argument
109 mLaunchRequest.userHandle = userHandle; in setUserHandle()
122 boolean launchAsUser = mLaunchRequest.userHandle != null in launch()
123 && mLaunchRequest.userHandle.getIdentifier() != UserHandle.myUserId(); in launch()
126 launchForResultAsUser(intent, mLaunchRequest.userHandle, mLaunchRequest.mResultListener, in launch()
129 launchAsUser(intent, mLaunchRequest.userHandle); in launch()
167 void launchAsUser(Intent intent, UserHandle userHandle) { in launchAsUser() argument
170 mContext.startActivityAsUser(intent, userHandle); in launchAsUser()
174 void launchForResultAsUser(Intent intent, UserHandle userHandle, in launchForResultAsUser() argument
176 resultListener.getActivity().startActivityForResultAsUser(intent, requestCode, userHandle); in launchForResultAsUser()
[all …]
/packages/apps/Settings/src/com/android/settings/core/
DSubSettingLauncher.java114 public SubSettingLauncher setUserHandle(UserHandle userHandle) { in setUserHandle() argument
115 mLaunchRequest.userHandle = userHandle; in setUserHandle()
128 boolean launchAsUser = mLaunchRequest.userHandle != null in launch()
129 && mLaunchRequest.userHandle.getIdentifier() != UserHandle.myUserId(); in launch()
132 launchForResultAsUser(intent, mLaunchRequest.userHandle, mLaunchRequest.mResultListener, in launch()
135 launchAsUser(intent, mLaunchRequest.userHandle); in launch()
174 void launchAsUser(Intent intent, UserHandle userHandle) { in launchAsUser() argument
177 mContext.startActivityAsUser(intent, userHandle); in launchAsUser()
181 void launchForResultAsUser(Intent intent, UserHandle userHandle, in launchForResultAsUser() argument
183 resultListener.getActivity().startActivityForResultAsUser(intent, requestCode, userHandle); in launchForResultAsUser()
[all …]
/packages/apps/Launcher3/robolectric_tests/src/com/android/launcher3/shadows/
DLShadowUserManager.java37 protected boolean isQuietModeEnabled(UserHandle userHandle) { in isQuietModeEnabled() argument
38 return mQuietUsers.get(userHandle.hashCode()); in isQuietModeEnabled()
41 public void setQuietModeEnabled(UserHandle userHandle, boolean enabled) { in setQuietModeEnabled() argument
42 mQuietUsers.put(userHandle.hashCode(), enabled); in setQuietModeEnabled()
46 protected boolean isUserUnlocked(UserHandle userHandle) { in isUserUnlocked() argument
47 return !mLockedUsers.get(userHandle.hashCode()); in isUserUnlocked()
50 public void setUserLocked(UserHandle userHandle, boolean enabled) { in setUserLocked() argument
51 mLockedUsers.put(userHandle.hashCode(), enabled); in setUserLocked()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/testutils/
DShadowUserManager.java53 protected List<UserInfo> getProfiles(int userHandle) { in getProfiles() argument
54 if (sProfiles.containsKey(userHandle)) { in getProfiles()
55 return new ArrayList<>(sProfiles.get(userHandle)); in getProfiles()
62 int userHandle, int profileUserHandle, String profileName, int profileFlags) { in addProfile() argument
63 sProfiles.putIfAbsent(userHandle, new ArrayList<>()); in addProfile()
64 sProfiles.get(userHandle).add(new UserInfo(profileUserHandle, profileName, profileFlags)); in addProfile()
68 protected void setUserRestriction(String key, boolean value, UserHandle userHandle) { in setUserRestriction() argument
69 setUserRestriction(userHandle, key, value); in setUserRestriction()
/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/profileselector/
DProfileSelectDialogTest.java71 tile.userHandle.add(NORMAL_USER); in updateUserHandlesIfNeeded_Normal()
75 assertThat(tile.userHandle).hasSize(1); in updateUserHandlesIfNeeded_Normal()
76 assertThat(tile.userHandle.get(0).getIdentifier()).isEqualTo(NORMAL_USER.getIdentifier()); in updateUserHandlesIfNeeded_Normal()
83 tile.userHandle.add(REMOVED_USER); in updateUserHandlesIfNeeded_Remove()
84 tile.userHandle.add(NORMAL_USER); in updateUserHandlesIfNeeded_Remove()
85 tile.userHandle.add(REMOVED_USER); in updateUserHandlesIfNeeded_Remove()
89 assertThat(tile.userHandle).hasSize(1); in updateUserHandlesIfNeeded_Remove()
90 assertThat(tile.userHandle.get(0).getIdentifier()).isEqualTo(NORMAL_USER.getIdentifier()); in updateUserHandlesIfNeeded_Remove()
/packages/services/Telephony/src/com/android/phone/
DNotificationMgr.java379 for (UserHandle userHandle : users) { in updateMwi()
381 UserManager.DISALLOW_OUTGOING_CALLS, userHandle) in updateMwi()
382 && !mUserManager.isManagedProfile(userHandle.getIdentifier())) { in updateMwi()
384 pendingIntent, isSettingsIntent, userHandle, isRefresh)) { in updateMwi()
389 userHandle); in updateMwi() local
395 for (UserHandle userHandle : users) { in updateMwi()
397 UserManager.DISALLOW_OUTGOING_CALLS, userHandle) in updateMwi()
398 && !mUserManager.isManagedProfile(userHandle.getIdentifier())) { in updateMwi()
400 false, userHandle, isRefresh)) { in updateMwi()
404 userHandle); in updateMwi() local
[all …]
/packages/apps/PermissionController/src/com/android/permissioncontroller/permission/ui/
DManagePermissionsActivity.java155 UserHandle userHandle = getIntent().getParcelableExtra(Intent.EXTRA_USER); in onCreate() local
159 groupName, userHandle, caller, sessionId, null); in onCreate()
172 UserHandle userHandle = getIntent().getParcelableExtra(Intent.EXTRA_USER); in onCreate() local
173 if (userHandle == null) { in onCreate()
174 userHandle = UserHandle.of(UserHandle.myUserId()); in onCreate()
179 userHandle).uid; in onCreate()
192 packageName, userHandle)) { in onCreate()
212 userHandle); in onCreate()
215 userHandle); in onCreate()
221 .AppPermissionsFragment.newInstance(packageName, userHandle); in onCreate()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/
DDashboardFeatureProviderImplTest.java208 tile.userHandle = new ArrayList<>(); in bindPreference_noFragmentMetadata_shouldBindToProfileSelector()
209 tile.userHandle.add(mock(UserHandle.class)); in bindPreference_noFragmentMetadata_shouldBindToProfileSelector()
210 tile.userHandle.add(mock(UserHandle.class)); in bindPreference_noFragmentMetadata_shouldBindToProfileSelector()
223 tile.userHandle = new ArrayList<>(); in bindPreference_noFragmentMetadataSingleUser_shouldBindToDirectLaunchIntent()
224 tile.userHandle.add(mock(UserHandle.class)); in bindPreference_noFragmentMetadataSingleUser_shouldBindToDirectLaunchIntent()
245 tile.userHandle = new ArrayList<>(); in bindPreference_toInternalSettingActivity_shouldBindToDirectLaunchIntentAndNotLog()
246 tile.userHandle.add(mock(UserHandle.class)); in bindPreference_toInternalSettingActivity_shouldBindToDirectLaunchIntentAndNotLog()
462 tile.userHandle = null; in bindPreference_withIntentActionMetadata_shouldSetLaunchAction()
485 tile.userHandle = null; in clickPreference_withUnresolvableIntent_shouldNotLaunchAnything()
505 tile.userHandle = handles; in openTileIntent_profileSelectionDialog_shouldShow()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/dashboard/
DDashboardFeatureProviderImpl.java245 if (tile.userHandle == null || tile.isPrimaryProfileOnly()) { in launchIntentOrSelectProfile()
248 } else if (tile.userHandle.size() == 1) { in launchIntentOrSelectProfile()
250 activity.startActivityForResultAsUser(intent, 0, tile.userHandle.get(0)); in launchIntentOrSelectProfile()
252 final UserHandle userHandle = intent.getParcelableExtra(EXTRA_USER); in launchIntentOrSelectProfile() local
253 if (userHandle != null && tile.userHandle.contains(userHandle)) { in launchIntentOrSelectProfile()
255 activity.startActivityForResultAsUser(intent, 0, userHandle); in launchIntentOrSelectProfile()
/packages/apps/Settings/src/com/android/settings/accounts/
DAccountDetailDashboardFragment.java103 for (UserHandle userHandle : um.getUserProfiles()) { in finishIfAccountMissing()
104 for (Account account : accountManager.getAccountsAsUser(userHandle.getIdentifier())) { in finishIfAccountMissing()
175 UserHandle userHandle = null; in updateUi() local
178 userHandle = args.getParcelable(KEY_USER_HANDLE); in updateUi()
180 final AuthenticatorHelper helper = new AuthenticatorHelper(context, userHandle, null); in updateUi()
182 new AccountTypePreferenceLoader(this, helper, userHandle); in updateUi()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/accounts/
DAccountDetailDashboardFragment.java103 for (UserHandle userHandle : um.getUserProfiles()) { in finishIfAccountMissing()
104 for (Account account : accountManager.getAccountsAsUser(userHandle.getIdentifier())) { in finishIfAccountMissing()
172 UserHandle userHandle = null; in updateUi() local
175 userHandle = args.getParcelable(KEY_USER_HANDLE); in updateUi()
177 final AuthenticatorHelper helper = new AuthenticatorHelper(context, userHandle, null); in updateUi()
179 new AccountTypePreferenceLoader(this, helper, userHandle); in updateUi()
/packages/apps/PermissionController/src/com/android/permissioncontroller/permission/ui/legacy/
DAppPermissionActivity.java122 UserHandle userHandle = getIntent().getParcelableExtra(Intent.EXTRA_USER); in onCreate() local
123 if (userHandle == null) { in onCreate()
133 startActivityAsUser(intent, userHandle); in onCreate()
141 LocationUtils.startLocationControllerExtraPackageSettings(this, userHandle); in onCreate()
150 groupName, userHandle); in onCreate()
158 packageName, permissionName, groupName, userHandle, null, 0, null)); in onCreate()

1234567