Home
last modified time | relevance | path

Searched refs:UserHandle (Results 1 – 25 of 539) sorted by relevance

12345678910>>...22

/frameworks/base/core/java/android/os/
DUserHandle.java29 public final class UserHandle implements Parcelable { class
39 public static final UserHandle ALL = new UserHandle(USER_ALL);
45 public static final UserHandle CURRENT = new UserHandle(USER_CURRENT);
55 public static final UserHandle CURRENT_OR_SELF = new UserHandle(USER_CURRENT_OR_SELF);
72 public static final UserHandle OWNER = new UserHandle(USER_OWNER);
81 public static final UserHandle SYSTEM = new UserHandle(USER_SYSTEM);
137 public static UserHandle getUserHandleForUid(int uid) { in getUserHandleForUid()
149 return UserHandle.USER_SYSTEM; in getUserId()
160 public static UserHandle of(@UserIdInt int userId) { in of()
161 return userId == USER_SYSTEM ? SYSTEM : new UserHandle(userId); in of()
[all …]
DUserManager.java739 boolean isSystemUserUnlocked = isUserUnlocked(UserHandle.SYSTEM); in canSwitchUsers()
752 return UserHandle.myUserId(); in getUserHandle()
791 UserInfo user = getUserInfo(UserHandle.myUserId()); in isPrimaryUser()
803 return UserHandle.myUserId() == UserHandle.USER_SYSTEM; in isSystemUser()
812 return isUserAdmin(UserHandle.myUserId()); in isAdminUser()
857 UserInfo user = getUserInfo(UserHandle.myUserId()); in isGuestUser()
871 return mService.isManagedProfile(UserHandle.myUserId()); in isManagedProfile()
901 return isUserEphemeral(UserHandle.myUserId()); in isEphemeralUser()
921 public boolean isUserRunning(UserHandle user) { in isUserRunning()
942 public boolean isUserRunningOrStopping(UserHandle user) { in isUserRunningOrStopping()
[all …]
/frameworks/base/core/java/android/content/pm/
DIOnAppsChangedListener.aidl20 import android.os.UserHandle;
26 void onPackageRemoved(in UserHandle user, String packageName); in onPackageRemoved()
27 void onPackageAdded(in UserHandle user, String packageName); in onPackageAdded()
28 void onPackageChanged(in UserHandle user, String packageName); in onPackageChanged()
29 void onPackagesAvailable(in UserHandle user, in String[] packageNames, boolean replacing); in onPackagesAvailable()
30 void onPackagesUnavailable(in UserHandle user, in String[] packageNames, boolean replacing); in onPackagesUnavailable()
31 void onPackagesSuspended(in UserHandle user, in String[] packageNames); in onPackagesSuspended()
32 void onPackagesUnsuspended(in UserHandle user, in String[] packageNames); in onPackagesUnsuspended()
33 void onShortcutChanged(in UserHandle user, String packageName, in ParceledListSlice shortcuts); in onShortcutChanged()
DLauncherApps.java35 import android.os.UserHandle;
83 abstract public void onPackageRemoved(String packageName, UserHandle user); in onPackageRemoved()
94 abstract public void onPackageAdded(String packageName, UserHandle user); in onPackageAdded()
104 abstract public void onPackageChanged(String packageName, UserHandle user); in onPackageChanged()
117 abstract public void onPackagesAvailable(String[] packageNames, UserHandle user, in onPackagesAvailable()
131 abstract public void onPackagesUnavailable(String[] packageNames, UserHandle user, in onPackagesUnavailable()
143 public void onPackagesSuspended(String[] packageNames, UserHandle user) { in onPackagesSuspended()
155 public void onPackagesUnsuspended(String[] packageNames, UserHandle user) { in onPackagesUnsuspended()
173 @NonNull List<ShortcutInfo> shortcuts, @NonNull UserHandle user) { in onShortcutsChanged()
287 public List<LauncherActivityInfo> getActivityList(String packageName, UserHandle user) { in getActivityList()
[all …]
DILauncherApps.aidl29 import android.os.UserHandle;
40 ParceledListSlice getLauncherActivities(String packageName, in UserHandle user); in getLauncherActivities()
41 ActivityInfo resolveActivity(in ComponentName component, in UserHandle user); in resolveActivity()
43 in Bundle opts, in UserHandle user); in startActivityAsUser()
45 in Bundle opts, in UserHandle user); in showAppDetailsAsUser()
46 boolean isPackageEnabled(String packageName, in UserHandle user); in isPackageEnabled()
47 boolean isActivityEnabled(in ComponentName component, in UserHandle user); in isActivityEnabled()
48 ApplicationInfo getApplicationInfo(String packageName, int flags, in UserHandle user); in getApplicationInfo()
51 in List shortcutIds, in ComponentName componentName, int flags, in UserHandle user); in getShortcuts()
53 in UserHandle user); in pinShortcuts()
DUserInfo.java22 import android.os.UserHandle;
90 public static final int NO_PROFILE_GROUP_ID = UserHandle.USER_NULL;
171 return userId == UserHandle.USER_SYSTEM && UserManager.isSplitSystemUser(); in isSystemOnly()
192 return (!hideSystemUser || id != UserHandle.USER_SYSTEM) && supportsSwitchTo(); in supportsSwitchToByUser()
201 return id != UserHandle.USER_SYSTEM; in canHaveProfile()
203 return id == UserHandle.USER_SYSTEM; in canHaveProfile()
225 public UserHandle getUserHandle() { in getUserHandle()
226 return new UserHandle(id); in getUserHandle()
/frameworks/base/core/tests/coretests/src/android/content/pm/
DAppsQueryHelperTests.java21 import android.os.UserHandle;
40 List<String> apps = mAppsQueryHelper.queryApps(0, true, UserHandle.SYSTEM); in testQueryAppsSystemAppsOnly()
43 apps = mAppsQueryHelper.queryApps(0, false, UserHandle.SYSTEM); in testQueryAppsSystemAppsOnly()
49 true, UserHandle.SYSTEM); in testQueryAppsNonLaunchable()
53 false, UserHandle.SYSTEM); in testQueryAppsNonLaunchable()
59 AppsQueryHelper.GET_APPS_WITH_INTERACT_ACROSS_USERS_PERM, true, UserHandle.SYSTEM); in testQueryAppsInteractAcrossUser()
63 AppsQueryHelper.GET_APPS_WITH_INTERACT_ACROSS_USERS_PERM, false, UserHandle.SYSTEM); in testQueryAppsInteractAcrossUser()
71 true, UserHandle.SYSTEM); in testQueryApps()
77 false, UserHandle.SYSTEM); in testQueryApps()
84 true, UserHandle.of(UserHandle.myUserId())); in testQueryAppsImes()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DLauncherAppsService.java50 import android.os.UserHandle;
85 public final UserHandle user;
88 BroadcastCookie(UserHandle userHandle, String packageName) { in BroadcastCookie()
125 return UserHandle.getUserId(injectBinderCallingUid()); in injectCallingUserId()
140 return UserHandle.getUserId(injectBinderCallingUid()); in getCallingUserId()
162 mListeners.register(listener, new BroadcastCookie(UserHandle.of(getCallingUserId()), in addOnAppsChangedListener()
189 mPackageMonitor.register(mContext, UserHandle.ALL, true, mCallbackHandler); in startWatchingPackageBroadcasts()
216 private void ensureInUserProfiles(UserHandle userToCheck, String message) { in ensureInUserProfiles()
247 UserHandle.getUserId(getCallingUid())); in verifyCallingPackage()
259 private boolean isUserEnabled(UserHandle user) { in isUserEnabled()
[all …]
/frameworks/base/core/java/android/nfc/cardemulation/
DCardEmulation.java30 import android.os.UserHandle;
204 return sService.isDefaultServiceForCategory(UserHandle.myUserId(), service, category); in isDefaultServiceForCategory()
213 return sService.isDefaultServiceForCategory(UserHandle.myUserId(), service, in isDefaultServiceForCategory()
235 return sService.isDefaultServiceForAid(UserHandle.myUserId(), service, aid); in isDefaultServiceForAid()
244 return sService.isDefaultServiceForAid(UserHandle.myUserId(), service, aid); in isDefaultServiceForAid()
329 return sService.registerAidGroupForService(UserHandle.myUserId(), service, aidGroup); in registerAidsForService()
338 return sService.registerAidGroupForService(UserHandle.myUserId(), service, in registerAidsForService()
363 AidGroup group = sService.getAidGroupForService(UserHandle.myUserId(), service, in getAidsForService()
373 AidGroup group = sService.getAidGroupForService(UserHandle.myUserId(), service, in getAidsForService()
400 return sService.removeAidGroupForService(UserHandle.myUserId(), service, category); in removeAidsForService()
[all …]
DNfcFCardEmulation.java28 import android.os.UserHandle;
121 return sService.getSystemCodeForService(UserHandle.myUserId(), service); in getSystemCodeForService()
130 return sService.getSystemCodeForService(UserHandle.myUserId(), service); in getSystemCodeForService()
167 return sService.registerSystemCodeForService(UserHandle.myUserId(), in registerSystemCodeForService()
177 return sService.registerSystemCodeForService(UserHandle.myUserId(), in registerSystemCodeForService()
198 return sService.removeSystemCodeForService(UserHandle.myUserId(), service); in unregisterSystemCodeForService()
207 return sService.removeSystemCodeForService(UserHandle.myUserId(), service); in unregisterSystemCodeForService()
233 return sService.getNfcid2ForService(UserHandle.myUserId(), service); in getNfcid2ForService()
242 return sService.getNfcid2ForService(UserHandle.myUserId(), service); in getNfcid2ForService()
276 return sService.setNfcid2ForService(UserHandle.myUserId(), in setNfcid2ForService()
[all …]
/frameworks/base/core/java/com/android/server/backup/
DPreferredActivityBackupHelper.java22 import android.os.UserHandle;
58 return pm.getPreferredActivityBackup(UserHandle.USER_SYSTEM); in getBackupPayload()
60 return pm.getDefaultAppsBackup(UserHandle.USER_SYSTEM); in getBackupPayload()
62 return pm.getIntentFilterVerificationBackup(UserHandle.USER_SYSTEM); in getBackupPayload()
82 pm.restorePreferredActivities(payload, UserHandle.USER_SYSTEM); in applyRestoredPayload()
85 pm.restoreDefaultApps(payload, UserHandle.USER_SYSTEM); in applyRestoredPayload()
88 pm.restoreIntentFilterVerification(payload, UserHandle.USER_SYSTEM); in applyRestoredPayload()
/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/
DSettingsProviderPerformanceTest.java20 import android.os.UserHandle;
50 FAKE_SETTING_NAME, UserHandle.USER_SYSTEM); in testSetAndGetPerformanceForGlobalViaFrontEndApi()
59 FAKE_SETTING_NAME, UserHandle.USER_SYSTEM); in testSetAndGetPerformanceForGlobalViaFrontEndApi()
89 FAKE_SETTING_VALUE, UserHandle.USER_SYSTEM); in testSetAndGetPerformanceForGlobalViaProviderApi()
93 FAKE_SETTING_NAME, UserHandle.USER_SYSTEM); in testSetAndGetPerformanceForGlobalViaProviderApi()
98 FAKE_SETTING_VALUE_1, UserHandle.USER_SYSTEM); in testSetAndGetPerformanceForGlobalViaProviderApi()
102 FAKE_SETTING_NAME, UserHandle.USER_SYSTEM); in testSetAndGetPerformanceForGlobalViaProviderApi()
/frameworks/base/media/java/android/media/projection/
DMediaProjectionInfo.java21 import android.os.UserHandle;
28 private final UserHandle mUserHandle;
30 public MediaProjectionInfo(String packageName, UserHandle handle) { in MediaProjectionInfo()
37 mUserHandle = UserHandle.readFromParcel(in); in MediaProjectionInfo()
44 public UserHandle getUserHandle() { in getUserHandle()
78 UserHandle.writeToParcel(mUserHandle, out); in writeToParcel()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DUserSwitcherController.java37 import android.os.UserHandle;
101 private int mLastNonGuestUser = UserHandle.USER_SYSTEM;
105 private int mSecondaryUser = UserHandle.USER_NULL;
124 mContext.registerReceiverAsUser(mReceiver, UserHandle.SYSTEM, filter, in UserSwitcherController()
132 mContext.registerReceiverAsUser(mReceiver, UserHandle.SYSTEM, filter, in UserSwitcherController()
151 refreshUsers(UserHandle.USER_NULL); in UserSwitcherController()
164 if (forcePictureLoadForId != UserHandle.USER_NULL) { in refreshUsers()
172 boolean forceAllUsers = mForcePictureLoadForUserId.get(UserHandle.USER_ALL); in refreshUsers()
235 UserManager.DISALLOW_ADD_USER, UserHandle.SYSTEM); in refreshUsers()
238 || currentUserInfo.id == UserHandle.USER_SYSTEM) in refreshUsers()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/location/
DRecentLocationApps.java28 import android.os.UserHandle;
72 final List<UserHandle> profiles = um.getUserProfiles(); in getAppList()
80 int userId = UserHandle.getUserId(uid); in getAppList()
83 if (isAndroidOs || !profiles.contains(new UserHandle(userId))) { in getAppList()
135 int userId = UserHandle.getUserId(uid); in getRequestFromOps()
148 final UserHandle userHandle = new UserHandle(userId); in getRequestFromOps()
170 public final UserHandle userHandle;
176 private Request(String packageName, UserHandle userHandle, Drawable icon, in Request()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/drawer/
DUserAdapter.java26 import android.os.UserHandle;
49 private final UserHandle mUserHandle;
53 public UserDetails(UserHandle userHandle, UserManager um, Context context) { in UserDetails()
89 public UserHandle getUserHandle(int position) { in getUserHandle()
108 if (userHandle == UserHandle.USER_CURRENT in getTitle()
190 List<UserHandle> userProfiles = userManager.getUserProfiles(); in createUserSpinnerAdapter()
195 UserHandle myUserHandle = new UserHandle(UserHandle.myUserId()); in createUserSpinnerAdapter()
204 Context context, List<UserHandle> userProfiles) { in createUserAdapter()
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DDevicePolicyManagerServiceMigrationTest.java27 import android.os.UserHandle;
63 setUpPackageManagerForAdmin(admin2, UserHandle.getUid(10, 123)); in testMigration()
64 setUpPackageManagerForAdmin(admin3, UserHandle.getUid(11, 456)); in testMigration()
88 eq(UserHandle.USER_SYSTEM))).thenReturn(DpmTestUtils.newRestrictions( in testMigration()
143 assertFalse(dpms.mOwners.hasProfileOwner(UserHandle.USER_SYSTEM)); in testMigration()
151 UserHandle.USER_SYSTEM)); in testMigration()
161 newBaseRestrictions.get(UserHandle.USER_SYSTEM)); in testMigration()
219 eq(UserHandle.USER_SYSTEM))).thenReturn(DpmTestUtils.newRestrictions( in testMigration2_profileOwnerOnUser0()
257 assertTrue(dpms.mOwners.hasProfileOwner(UserHandle.USER_SYSTEM)); in testMigration2_profileOwnerOnUser0()
262 UserHandle.USER_SYSTEM)); in testMigration2_profileOwnerOnUser0()
[all …]
DDpmMockContext.java39 import android.os.UserHandle;
74 public static final int CALLER_UID = UserHandle.getUid(CALLER_USER_HANDLE, 20123);
120 public UserHandle getCallingUserHandle() { in getCallingUserHandle()
121 return new UserHandle(UserHandle.getUserId(getCallingUid())); in getCallingUserHandle()
310 systemUserDataDir = addUser(UserHandle.USER_SYSTEM, UserInfo.FLAG_PRIMARY); in DpmMockContext()
313 setUserRunning(UserHandle.USER_SYSTEM, true); in DpmMockContext()
325 when(userManager.isUserRunning(eq(new UserHandle(userId)))).thenReturn(true); in addUser()
502 public void sendBroadcastAsUser(Intent intent, UserHandle user) { in sendBroadcastAsUser()
507 Assert.assertEquals(UserHandle.getUserId(binder.getCallingUid()), user.getIdentifier()); in sendBroadcastAsUser()
514 public void sendBroadcastAsUser(Intent intent, UserHandle user, String receiverPermission) { in sendBroadcastAsUser()
[all …]
DDevicePolicyManagerTest.java33 import android.os.UserHandle;
131 final Map<Pair<String, UserHandle>, Bundle> appRestrictions = new HashMap<>(); in setUpUserManager()
139 UserHandle user = (UserHandle) invocation.getArguments()[2]; in setUpUserManager()
146 anyString(), any(Bundle.class), any(UserHandle.class)); in setUpUserManager()
153 UserHandle user = (UserHandle) invocation.getArguments()[1]; in setUpUserManager()
158 anyString(), any(UserHandle.class)); in setUpUserManager()
315 final int ANOTHER_ADMIN_UID = UserHandle.getUid(ANOTHER_USER_ID, 20456); in testSetActiveAdmin_multiUsers()
553 dpm.setActiveAdmin(admin2, /* refreshing= */ true, UserHandle.USER_SYSTEM); in testSetDeviceOwner()
555 dpm.setProfileOwner(admin2, "owner-name", UserHandle.USER_SYSTEM); in testSetDeviceOwner()
611 eq(UserHandle.USER_SYSTEM), eq(false)); in setDeviceOwner()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/
DAccessibilityManagerServiceTest.java28 import android.os.UserHandle;
112 mManagerService.addClient(mockClient, UserHandle.USER_CURRENT); in testAddClient_AccessibilityDisabledThenEnabled()
125 mManagerService.addClient(mockClient, UserHandle.USER_CURRENT); in testAddClient_AccessibilityDisabledThenEnabled()
147 mManagerService.addClient(mockClient, UserHandle.USER_CURRENT); in testAddClient_AccessibilityEnabledThenDisabled()
160 mManagerService.addClient(mockClient, UserHandle.USER_CURRENT); in testAddClient_AccessibilityEnabledThenDisabled()
180 UserHandle.USER_CURRENT)) { in testGetAccessibilityServicesList()
221 mManagerService.sendAccessibilityEvent(sentEvent, UserHandle.USER_CURRENT); in testSendAccessibilityEvent_OneService_MatchingPackageAndEventType()
251 mManagerService.sendAccessibilityEvent(sentEvent, UserHandle.USER_CURRENT); in testSendAccessibilityEvent_OneService_NotMatchingPackage()
281 mManagerService.sendAccessibilityEvent(sentEvent, UserHandle.USER_CURRENT); in testSendAccessibilityEvent_OneService_NotMatchingEventType()
317 mManagerService.sendAccessibilityEvent(firstEvent, UserHandle.USER_CURRENT); in testSendAccessibilityEvent_OneService_NotifivationAfterTimeout()
[all …]
/frameworks/base/telecomm/java/android/telecom/
DPhoneAccountHandle.java24 import android.os.UserHandle;
45 private final UserHandle mUserHandle;
56 @NonNull UserHandle userHandle) { in PhoneAccountHandle()
97 public UserHandle getUserHandle() { in getUserHandle()
144 private void checkParameters(ComponentName componentName, UserHandle userHandle) { in checkParameters()
170 UserHandle.CREATOR.createFromParcel(in)); in PhoneAccountHandle()
/frameworks/base/core/java/android/nfc/
DBeamShareData.java6 import android.os.UserHandle;
18 public final UserHandle userHandle;
21 public BeamShareData(NdefMessage msg, Uri[] uris, UserHandle userHandle, int flags) { in BeamShareData()
56 UserHandle userHandle = source.readParcelable(UserHandle.class.getClassLoader());
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DAppInfo.java20 import android.os.UserHandle;
27 private final UserHandle mUser;
29 public AppInfo(ComponentName componentName, UserHandle user) { in AppInfo()
39 public UserHandle getUser() { in getUser()
/frameworks/base/services/tests/servicestests/src/com/android/server/accounts/
DAccountManagerServiceTest.java40 import android.os.UserHandle;
73 SQLiteDatabase.deleteDatabase(new File(mAms.getCeDatabaseName(UserHandle.USER_SYSTEM))); in tearDown()
74 SQLiteDatabase.deleteDatabase(new File(mAms.getDeDatabaseName(UserHandle.USER_SYSTEM))); in tearDown()
75 SQLiteDatabase.deleteDatabase(new File(mAms.getPreNDatabaseName(UserHandle.USER_SYSTEM))); in tearDown()
227 Account[] accounts = ams2.getAccounts(UserHandle.USER_SYSTEM, mContext.getOpPackageName()); in testRemovedAccountSync()
232 String ceDatabaseName = mAms.getCeDatabaseName(UserHandle.USER_SYSTEM); in testRemovedAccountSync()
237 ams2.onUserUnlocked(newIntentForUser(UserHandle.USER_SYSTEM)); in testRemovedAccountSync()
240 accounts = ams2.getAccounts(UserHandle.USER_SYSTEM, mContext.getOpPackageName()); in testRemovedAccountSync()
246 String preNDatabaseName = mAms.getPreNDatabaseName(UserHandle.USER_SYSTEM); in testPreNDatabaseMigration()
267 String deDatabaseName = mAms.getDeDatabaseName(UserHandle.USER_SYSTEM); in testPreNDatabaseMigration()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/
DStorageNotification.java32 import android.os.UserHandle;
94 mNotificationManager.cancelAsUser(fsUuid, PRIVATE_ID, UserHandle.ALL);
122 mNotificationManager.cancelAsUser(null, MOVE_ID, UserHandle.ALL);
193 mNotificationManager.cancelAsUser(fsUuid, PRIVATE_ID, UserHandle.ALL); in updateMissingPrivateVolumes()
215 .build(), UserHandle.ALL); in updateMissingPrivateVolumes()
241 UserHandle.ALL); in onDiskScannedInternal()
245 mNotificationManager.cancelAsUser(disk.getId(), DISK_ID, UserHandle.ALL); in onDiskScannedInternal()
255 mNotificationManager.cancelAsUser(disk.getId(), DISK_ID, UserHandle.ALL); in onDiskDestroyedInternal()
311 mNotificationManager.notifyAsUser(vol.getId(), PUBLIC_ID, notif, UserHandle.ALL); in onPublicVolumeStateChangedInternal()
313 mNotificationManager.cancelAsUser(vol.getId(), PUBLIC_ID, UserHandle.ALL); in onPublicVolumeStateChangedInternal()
[all …]

12345678910>>...22