Home
last modified time | relevance | path

Searched refs:userHandle (Results 1 – 25 of 163) 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/services/Telecomm/src/com/android/server/telecom/
DPhoneAccountRegistrar.java205 UserHandle userHandle) { in getOutgoingPhoneAccountForScheme() argument
206 final PhoneAccountHandle userSelected = getUserSelectedOutgoingPhoneAccount(userHandle); in getOutgoingPhoneAccountForScheme()
218 userHandle); in getOutgoingPhoneAccountForScheme()
241 public PhoneAccountHandle getUserSelectedOutgoingPhoneAccount(UserHandle userHandle) { in getUserSelectedOutgoingPhoneAccount() argument
242 if (userHandle == null) { in getUserSelectedOutgoingPhoneAccount()
246 .get(userHandle); in getUserSelectedOutgoingPhoneAccount()
252 userHandle); in getUserSelectedOutgoingPhoneAccount()
264 private DefaultPhoneAccountHandle getUserSelectedDefaultPhoneAccount(UserHandle userHandle) { in getUserSelectedDefaultPhoneAccount() argument
265 if (userHandle == null) { in getUserSelectedDefaultPhoneAccount()
269 .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) { 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.java33 public void setShortSupportMessageForUser(ComponentName admin, int userHandle, String message) { in setShortSupportMessageForUser() argument
34 mSupportMessagesMap.put(Objects.hash(admin, userHandle), message); in setShortSupportMessageForUser()
39 int userHandle) { in getShortSupportMessageForUser() argument
40 return mSupportMessagesMap.get(Objects.hash(admin, userHandle)); in getShortSupportMessageForUser()
54 protected long getMaximumTimeToLock(ComponentName admin, @UserIdInt int userHandle) { in getMaximumTimeToLock() argument
55 return mProfileTimeouts.getOrDefault(userHandle, 0L); in getMaximumTimeToLock()
71 public void setMaximumTimeToLock(@UserIdInt int userHandle, Long timeout) { in setMaximumTimeToLock() argument
72 mProfileTimeouts.put(userHandle, timeout); in setMaximumTimeToLock()
80 public int getPasswordQuality(ComponentName admin, int userHandle) { in getPasswordQuality() argument
89 public int getPasswordMinimumLength(ComponentName admin, int userHandle) { in getPasswordMinimumLength() argument
[all …]
DShadowUserManager.java65 protected List<UserInfo> getProfiles(@UserIdInt int userHandle) { in getProfiles() argument
70 protected int[] getProfileIds(@UserIdInt int userHandle, boolean enabledOnly) { in getProfileIds() argument
79 protected int getCredentialOwnerProfile(@UserIdInt int userHandle) { in getCredentialOwnerProfile() argument
80 return userHandle; in getCredentialOwnerProfile()
84 protected boolean hasBaseUserRestriction(String restrictionKey, UserHandle userHandle) { in hasBaseUserRestriction() argument
99 String restrictionKey, UserHandle userHandle) { in getUserRestrictionSources() argument
103 mRestrictionSources.get(restrictionKey + userHandle.getIdentifier()); in getUserRestrictionSources()
108 String restrictionKey, UserHandle userHandle, List<EnforcingUser> enforcers) { in setUserRestrictionSources() argument
109 mRestrictionSources.put(restrictionKey + userHandle.getIdentifier(), enforcers); in setUserRestrictionSources()
113 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/Car/Settings/tests/robotests/src/com/android/car/settings/testutils/
DShadowUserManager.java44 protected UserInfo getUserInfo(@UserIdInt int userHandle) { in getUserInfo() argument
45 return sInstance.getUserInfo(userHandle); in getUserInfo()
57 protected List<UserInfo> getProfiles(int userHandle) { in getProfiles() argument
58 if (mProfiles.containsKey(userHandle)) { in getProfiles()
59 return new ArrayList<>(mProfiles.get(userHandle)); in getProfiles()
66 int userHandle, int profileUserHandle, String profileName, int profileFlags) { in addProfile() argument
67 mProfiles.putIfAbsent(userHandle, new ArrayList<>()); in addProfile()
68 mProfiles.get(userHandle).add(new UserInfo(profileUserHandle, profileName, profileFlags)); in addProfile()
/packages/services/Telephony/src/com/android/phone/
DNotificationMgr.java379 final UserHandle userHandle = user.getUserHandle(); in updateMwi() local
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
396 final UserHandle userHandle = user.getUserHandle(); in updateMwi() local
398 UserManager.DISALLOW_OUTGOING_CALLS, userHandle) in updateMwi()
399 && !mUserManager.isManagedProfile(userHandle.getIdentifier())) { in updateMwi()
401 false, userHandle, isRefresh)) { in updateMwi()
405 userHandle); in updateMwi() local
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/profileselector/
DProfileSelectDialogTest.java70 tile.userHandle.add(NORMAL_USER); in updateUserHandlesIfNeeded_Normal()
74 assertThat(tile.userHandle).hasSize(1); in updateUserHandlesIfNeeded_Normal()
75 assertThat(tile.userHandle.get(0).getIdentifier()).isEqualTo(NORMAL_USER.getIdentifier()); in updateUserHandlesIfNeeded_Normal()
82 tile.userHandle.add(REMOVED_USER); in updateUserHandlesIfNeeded_Remove()
83 tile.userHandle.add(NORMAL_USER); in updateUserHandlesIfNeeded_Remove()
84 tile.userHandle.add(REMOVED_USER); in updateUserHandlesIfNeeded_Remove()
88 assertThat(tile.userHandle).hasSize(1); in updateUserHandlesIfNeeded_Remove()
89 assertThat(tile.userHandle.get(0).getIdentifier()).isEqualTo(NORMAL_USER.getIdentifier()); in updateUserHandlesIfNeeded_Remove()
/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/
DDashboardFeatureProviderImplTest.java165 tile.userHandle = new ArrayList<>(); in bindPreference_noFragmentMetadata_shouldBindToProfileSelector()
166 tile.userHandle.add(mock(UserHandle.class)); in bindPreference_noFragmentMetadata_shouldBindToProfileSelector()
167 tile.userHandle.add(mock(UserHandle.class)); in bindPreference_noFragmentMetadata_shouldBindToProfileSelector()
180 tile.userHandle = new ArrayList<>(); in bindPreference_noFragmentMetadataSingleUser_shouldBindToDirectLaunchIntent()
181 tile.userHandle.add(mock(UserHandle.class)); in bindPreference_noFragmentMetadataSingleUser_shouldBindToDirectLaunchIntent()
203 tile.userHandle = new ArrayList<>(); in bindPreference_toInternalSettingActivity_shouldBindToDirectLaunchIntentAndNotLog()
204 tile.userHandle.add(mock(UserHandle.class)); in bindPreference_toInternalSettingActivity_shouldBindToDirectLaunchIntentAndNotLog()
335 tile.userHandle = null; in bindPreference_withIntentActionMetadata_shouldSetLaunchAction()
357 tile.userHandle = null; in clickPreference_withUnresolvableIntent_shouldNotLaunchAnything()
377 tile.userHandle = handles; in openTileIntent_profileSelectionDialog_shouldShow()
[all …]
/packages/services/Car/service/src/com/android/car/user/
DCarUserService.java194 public void setUserLockStatus(int userHandle, boolean unlocked) { in setUserLockStatus() argument
196 callback.onUserLockChanged(userHandle, unlocked); in setUserLockStatus()
203 if (userHandle == UserHandle.USER_SYSTEM) { in setUserLockStatus()
211 Integer user = userHandle; in setUserLockStatus()
212 if (mCarUserManagerHelper.isPersistentUser(userHandle)) { in setUserLockStatus()
214 if (userHandle == mCarUserManagerHelper.getCurrentForegroundUserId()) { in setUserLockStatus()
222 Log.i(TAG, "New user unlocked:" + userHandle in setUserLockStatus()
322 public void onSwitchUser(int userHandle) { in onSwitchUser() argument
324 callback.onSwitchUser(userHandle); in onSwitchUser()
/packages/apps/PermissionController/src/com/android/packageinstaller/permission/ui/
DManagePermissionsActivity.java104 UserHandle userHandle = getIntent().getParcelableExtra(Intent.EXTRA_USER); in onCreate() local
105 if (userHandle == null) { in onCreate()
106 userHandle = UserHandle.of(UserHandle.myUserId()); in onCreate()
112 userHandle); in onCreate()
115 userHandle); in onCreate()
125 .AllAppPermissionsFragment.newInstance(packageName, userHandle); in onCreate()
129 packageName, userHandle, sessionId); in onCreate()
/packages/apps/PermissionController/src/com/android/packageinstaller/permission/ui/handheld/
DAppPermissionsFragment.java85 @NonNull UserHandle userHandle, long sessionId) { in newInstance() argument
87 new AppPermissionsFragment(), packageName, userHandle, sessionId); in newInstance()
91 @NonNull T fragment, @NonNull String packageName, @NonNull UserHandle userHandle, in setPackageNameAndUserHandleAndSessionId() argument
95 arguments.putParcelable(Intent.EXTRA_USER, userHandle); in setPackageNameAndUserHandleAndSessionId()
112 UserHandle userHandle = getArguments().getParcelable(Intent.EXTRA_USER); in onCreate() local
114 PackageInfo packageInfo = getPackageInfo(activity, packageName, userHandle); in onCreate()
362 @NonNull UserHandle userHandle) { in getPackageInfo() argument
365 userHandle).getPackageManager().getPackageInfo(packageName, in getPackageInfo()
392 UserHandle userHandle = getArguments().getParcelable(Intent.EXTRA_USER); in onViewCreated() local
393 bindUi(this, getPackageInfo(getActivity(), packageName, userHandle)); in onViewCreated()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/dashboard/
DDashboardFeatureProviderImpl.java240 if (tile.userHandle == null || tile.isPrimaryProfileOnly()) { in launchIntentOrSelectProfile()
243 } else if (tile.userHandle.size() == 1) { in launchIntentOrSelectProfile()
245 activity.startActivityForResultAsUser(intent, 0, tile.userHandle.get(0)); in launchIntentOrSelectProfile()
247 final UserHandle userHandle = intent.getParcelableExtra(EXTRA_USER); in launchIntentOrSelectProfile() local
248 if (userHandle != null && tile.userHandle.contains(userHandle)) { in launchIntentOrSelectProfile()
251 activity.startActivityForResultAsUser(intent, 0, userHandle); in launchIntentOrSelectProfile()
/packages/apps/Settings/src/com/android/settings/dashboard/
DDashboardFeatureProviderImpl.java240 if (tile.userHandle == null || tile.isPrimaryProfileOnly()) { in launchIntentOrSelectProfile()
243 } else if (tile.userHandle.size() == 1) { in launchIntentOrSelectProfile()
245 activity.startActivityForResultAsUser(intent, 0, tile.userHandle.get(0)); in launchIntentOrSelectProfile()
247 final UserHandle userHandle = intent.getParcelableExtra(EXTRA_USER); in launchIntentOrSelectProfile() local
248 if (userHandle != null && tile.userHandle.contains(userHandle)) { in launchIntentOrSelectProfile()
251 activity.startActivityForResultAsUser(intent, 0, userHandle); in launchIntentOrSelectProfile()
/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/Settings/tests/robotests/src/com/android/settings/core/
DSubSettingLauncherTest.java128 final UserHandle userHandle = new UserHandle(1234); in launch_hasUserHandle_shouldStartActivityAsUser() local
137 .setUserHandle(userHandle) in launch_hasUserHandle_shouldStartActivityAsUser()
140 verify(launcher).launchAsUser(any(Intent.class), eq(userHandle)); in launch_hasUserHandle_shouldStartActivityAsUser()
146 final UserHandle userHandle = new UserHandle(1234); in launch_hasUserHandleAndRequestCode_shouldStartActivityForResultAsUser() local
156 .setUserHandle(userHandle) in launch_hasUserHandleAndRequestCode_shouldStartActivityForResultAsUser()
160 verify(launcher).launchForResultAsUser(any(Intent.class), eq(userHandle), eq(mFragment), in launch_hasUserHandleAndRequestCode_shouldStartActivityForResultAsUser()

1234567