Home
last modified time | relevance | path

Searched refs:getUid (Results 1 – 25 of 125) sorted by relevance

12345

/packages/modules/Connectivity/tests/common/java/android/net/
DUidRangeTest.java22 import static android.os.UserHandle.getUid;
88 getUid(USER_SYSTEM, 10000), getUid(USER_SYSTEM, 10100)); in testGetStartAndEndUser()
90 getUid(MIN_SECONDARY_USER_ID, 10000), getUid(MIN_SECONDARY_USER_ID, 10100)); in testGetStartAndEndUser()
97 getUid(USER_SYSTEM, 10000), getUid(MIN_SECONDARY_USER_ID, 10100)); in testGetStartAndEndUser()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/applications/specialaccess/
DAppStateAppOpsBridgeTest.java98 int uid = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 1); in androidPackagesIgnored()
111 int uid = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 1); in selfPackageIgnored()
124 int uid = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 1); in packagesNotRequestingPermissionIgnored()
140 int uid = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 1); in unavailablePackageIgnored()
155 int uid = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 1); in loadsAppOpsExtraInfo_modeAllowed_isPermissible()
170 int uid = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 1); in loadsAppOpsExtraInfo_modeDefault_isPermissible()
185 int uid = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 1); in loadsAppOpsExtraInfo_modeIgnored_isNotPermissible()
200 int uid1 = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 1); in loadsAppOpsExtraInfo_multipleApps()
206 int uid2 = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 2); in loadsAppOpsExtraInfo_multipleApps()
220 int uid1 = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 1); in loadsAppOpExtraInfo_multipleProfiles()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DPowerUsageFeatureProviderImplTest.java72 when(mBatterySipper.getUid()).thenReturn(Process.ROOT_UID); in testIsTypeSystem_uidRoot_returnTrue()
80 when(mBatterySipper.getUid()).thenReturn(Process.SYSTEM_UID); in testIsTypeSystem_uidSystem_returnTrue()
88 when(mBatterySipper.getUid()).thenReturn(Process.MEDIA_UID); in testIsTypeSystem_uidMedia_returnTrue()
96 when(mBatterySipper.getUid()).thenReturn(UID_CALENDAR); in testIsTypeSystem_appCalendar_returnTrue()
104 when(mBatterySipper.getUid()).thenReturn(UID_MEDIA); in testIsTypeSystem_appMedia_returnTrue()
112 when(mBatterySipper.getUid()).thenReturn(UID_SYSTEMUI); in testIsTypeSystem_appSystemUi_returnTrue()
120 when(mBatterySipper.getUid()).thenReturn(UID_OTHER); in testIsTypeSystem_uidOther_returnFalse()
/packages/services/Car/service/src/com/android/car/stats/
DCarStatsService.java56 entry.getUid(), entry.getPackageName(),
70 entry.getUid(),
77 Comparator.comparingInt(VmsClientStats::getUid)
142 .filter(entry -> entry.getUid() > 0) in dumpVmsStats()
144 .sorted(Comparator.comparingInt(VmsClientLogger::getUid)) in dumpVmsStats()
164 entry.getUid(), in pullVmsClientStats()
/packages/services/Car/service/src/com/android/car/
DAppFocusService.java150 ownerInfo.getPid(), ownerInfo.getUid()) in requestAppFocus()
152 info.getPid(), info.getUid())) { in requestAppFocus()
154 + "pid=" + info.getPid() + ", uid=" + info.getUid() + ")." in requestAppFocus()
156 + ownerInfo.getUid() + ") owns it."); in requestAppFocus()
287 return clientInfo.getUid() == uid && clientInfo.getPid() == pid; in isFocusOwner()
316 callback.onFocusAcquired(key, clientInfo.getUid(), clientInfo.getPid()); in registerContextOwnerChangedCallback()
335 () -> callback.onFocusAcquired(appType, owner.getUid(), owner.getPid())); in dispatchAcquireFocusOwnerLocked()
345 () -> callback.onFocusAbandoned(appType, owner.getUid(), owner.getPid())); in dispatchAbandonFocusOwnerLocked()
470 int getUid() { in getUid() method in AppFocusService.OwnershipClientInfo
/packages/modules/DnsResolver/
DDnsProxyListener.cpp693 const uid_t uid = mClient->getUid(); in doDns64Synthesis()
733 const uid_t uid = mClient->getUid(); in run()
787 return makeThreadName(mNetContext.dns_netid, mClient->getUid()); in threadName()
829 const uid_t uid = cli->getUid(); in runCommand()
859 const uid_t uid = cli->getUid(); in runCommand()
919 const uid_t uid = mClient->getUid(); in run()
997 return makeThreadName(mNetContext.dns_netid, mClient->getUid()); in threadName()
1016 const uid_t uid = cli->getUid(); in runCommand()
1068 uid_t uid = cli->getUid(); in runCommand()
1107 const uid_t uid = mClient->getUid(); in doDns64Synthesis()
[all …]
/packages/modules/StatsD/tests/src/android/cts/statsd/uidmap/
DUidMapTests.java56 if (change.getAppHash() == DEVICE_SIDE_TEST_PKG_HASH && change.getUid() == uid) { in hasMatchingChange()
81 int uid = getUid(); in testChangeFromInstallation()
105 int uid = getUid(); in testChangeFromReinstall()
119 int uid = getUid(); in testChangeFromUninstall()
/packages/providers/MediaProvider/tests/src/com/android/providers/media/metrics/
DStorageAccessMetricsTest.java58 assertThat(stats.getUid()).isEqualTo(3); in testLogMimeType()
76 assertThat(stats.getUid()).isEqualTo(3); in testIncrementAccessViaFuse()
96 assertThat(stats.getUid()).isEqualTo(3); in testIncrementAccessViaMediaProvider_externalVolumes()
123 assertThat(stats.getUid()).isEqualTo(3); in testIncrementAccessViaMediaProvider_secondaryVolumes()
/packages/apps/CertInstaller/robotests/src/com/android/certinstaller/
DCertInstallerRoboTest.java78 assertThat(helper.getUid()).isEqualTo(Process.WIFI_UID); in testUidUsageEqualWifiPass()
95 assertThat(helper.getUid()).isEqualTo(KeyStore.UID_SELF); in testUidUsageNotNullPass()
110 assertThat(helper.getUid()).isEqualTo(100); in testUidUsageNullPass()
132 assertThat(helper.getUid()).isEqualTo(Process.INVALID_UID); in testIntentNullPass()
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DCredentialsTest.java30 assertEquals(0, cred.getUid()); in testCredentials()
36 assertEquals(Integer.MAX_VALUE, cred.getUid()); in testCredentials()
42 assertEquals(Integer.MIN_VALUE, cred.getUid()); in testCredentials()
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DBatteryAppListPreferenceController.java117 final int userId = UserHandle.getUserId(entry.getUid());
229 final UserHandle userHandle = new UserHandle(UserHandle.getUserId(entry.getUid())); in refreshAppListGroup()
312 consumer -> consumer.getUid() == getRealUid(consumer) ? 0 : 1)); in getCoalescedUsageList()
395 int realUid = consumer.getUid(); in getRealUid()
399 if (isSharedGid(consumer.getUid())) { in getRealUid()
400 realUid = UserHandle.getUid(UserHandle.USER_SYSTEM, in getRealUid()
401 UserHandle.getAppIdFromSharedAppGid(consumer.getUid())); in getRealUid()
DBatteryUtils.java130 Log.v(TAG, "package: " + mPackageManager.getNameForUid(uid.getUid())); in getScreenUsageTimeMs()
156 Log.v(TAG, "package: " + mPackageManager.getNameForUid(uid.getUid())); in getProcessBackgroundTimeMs()
173 mPackageManager.getPackagesForUid(consumer.getUid())); in shouldHideUidBatteryConsumer()
181 return mPowerUsageFeatureProvider.isTypeSystem(consumer.getUid(), packages) in shouldHideUidBatteryConsumer()
191 return consumer.getUid() < 0 || isHiddenSystemModule(packages); in shouldHideUidBatteryConsumerUnconditionally()
/packages/modules/StatsD/tests/src/android/cts/statsd/validation/
DBatteryStatsValidationTests.java133 int uid = getUid(); in testServiceStartCount()
147 if (uidProto.getUid() == uid) { in testServiceStartCount()
178 int uid = getUid(); in testServiceLaunchCount()
192 if (uidProto.getUid() == uid) { in testServiceLaunchCount()
/packages/modules/StatsD/service/java/com/android/server/stats/
DStatsManagerService.java84 public int getUid() { in getUid() method in StatsManagerService.ConfigKey
101 return this.mUid == other.getUid() && this.mConfigId == other.getConfigId(); in equals()
116 public int getUid() { in getUid() method in StatsManagerService.PullerKey
133 return this.mUid == other.getUid() && this.mAtomTag == other.getAtom(); in equals()
611 statsd.registerPullAtomCallback(key.getUid(), key.getAtom(), value.getCoolDownMillis(), in registerAllPullers()
628 statsd.setDataFetchOperation(key.getConfigId(), entry.getValue(), key.getUid()); in registerAllDataFetchOperations()
664 subscriberEntry.getValue(), configKey.getUid()); in registerAllBroadcastSubscribers()
/packages/modules/Wifi/service/java/com/android/server/wifi/util/
DWorkSourceHelper.java77 if (isPrivileged(mWorkSource.getUid(i))) return true; in hasAnyPrivilegedAppRequest()
107 if (isSystem(mWorkSource.getPackageName(i), mWorkSource.getUid(i))) return true; in hasAnySystemAppRequest()
167 if (mWorkSource.getUid(i) == Process.WIFI_UID) return true; in hasAnyInternalRequest()
/packages/services/Car/service/src/com/android/car/vms/
DVmsBrokerService.java122 .sorted(Comparator.comparingInt(VmsClientInfo::getUid)) in dump()
235 mStatsService.getVmsClientLogger(client.getUid()) in deliverToSubscribers()
256 mStatsService.getVmsClientLogger(subscriber.getUid()) in deliverToSubscribers()
259 mStatsService.getVmsClientLogger(subscriber.getUid()) in deliverToSubscribers()
274 mStatsService.getVmsClientLogger(client.getUid()) in unregisterClient()
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/
DPermissionMonitorTest.java499 final int uid = user.getUid(app); in expectPermission()
513 final int uid = user.getUid(app); in expectNoPermission()
551 when(mPackageManager.getPackagesForUid(MOCK_USER1.getUid(SYSTEM_UID))) in testUserAndPackageAddRemove()
553 when(mPackageManager.getPackagesForUid(MOCK_USER2.getUid(SYSTEM_UID))) in testUserAndPackageAddRemove()
572 when(mPackageManager.getPackagesForUid(MOCK_USER1.getUid(MOCK_UID1))) in testUserAndPackageAddRemove()
574 when(mPackageManager.getPackagesForUid(MOCK_USER2.getUid(MOCK_UID1))) in testUserAndPackageAddRemove()
628 MOCK_PACKAGE1, MOCK_USER1.getUid(MOCK_UID1)); in testUidFilteringDuringVpnConnectDisconnectAndUidUpdates()
630 mPermissionMonitor.onPackageAdded(MOCK_PACKAGE1, MOCK_USER1.getUid(MOCK_UID1)); in testUidFilteringDuringVpnConnectDisconnectAndUidUpdates()
665 mPermissionMonitor.onPackageAdded(MOCK_PACKAGE1, MOCK_USER1.getUid(MOCK_UID1)); in testUidFilteringDuringPackageInstallAndUninstall()
671 MOCK_PACKAGE1, MOCK_USER1.getUid(MOCK_UID1)); in testUidFilteringDuringPackageInstallAndUninstall()
[all …]
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/avrcpcontroller/
DAvrcpItemTest.java101 Assert.assertEquals(0, item.getUid()); in buildAvrcpItem()
153 Assert.assertEquals(0, item.getUid()); in buildAvrcpItemFromAvrcpAttributes()
213 Assert.assertEquals(0, item.getUid()); in buildAvrcpItemFromAvrcpAttributesWithBadIds_badIdsIgnored()
265 Assert.assertEquals(0, item.getUid()); in buildAvrcpItemFromAvrcpAttributes_imageHandleTooShort()
317 Assert.assertEquals(0, item.getUid()); in buildAvrcpItemFromAvrcpAttributes_imageHandleEmpty()
369 Assert.assertEquals(0, item.getUid()); in buildAvrcpItemFromAvrcpAttributes_imageHandleNull()
421 Assert.assertEquals(0, item.getUid()); in buildAvrcpItemFromAvrcpAttributes_imageHandleNotDigits()
/packages/apps/Nfc/src/com/android/nfc/cardemulation/
DRegisteredNfcFServicesCache.java332 if (service == null || (service.getUid() != dynamicSystemCode.uid)) { in invalidateCache()
348 if (service == null || (service.getUid() != dynamicNfcid2.uid)) { in invalidateCache()
374 new DynamicNfcid2(service.getUid(), randomNfcid2); in invalidateCache()
551 if (service.getUid() != uid) { in registerSystemCodeForService()
595 if (service.getUid() != uid) { in getSystemCodeForService()
628 if (service.getUid() != uid) { in setNfcid2ForService()
670 if (service.getUid() != uid) { in getNfcid2ForService()
DRegisteredServicesCache.java306 if (serviceInfo == null || (serviceInfo.getUid() != dynamicSettings.uid)) { in invalidateCache()
466 if (serviceInfo.getUid() != uid) { in setOffHostSecureElement()
509 if (serviceInfo.getUid() != uid) { in unsetOffHostSecureElement()
552 if (serviceInfo.getUid() != uid) { in registerAidGroupForService()
598 if (serviceInfo.getUid() != uid) { in getAidGroupForService()
617 if (serviceInfo.getUid() != uid) { in removeAidGroupForService()
/packages/modules/ExtServices/java/src/android/ext/services/storage/
DCacheQuotaServiceImpl.java64 .collect(Collectors.groupingBy(CacheQuotaHintExtend::getUid)); in onComputeCacheQuotaHints()
170 public int getUid() { in getUid() method in CacheQuotaServiceImpl.CacheQuotaHintExtend
171 return mCacheQuotaHint.getUid(); in getUid()
/packages/apps/Dialer/java/com/android/voicemail/impl/imap/
DImapHelper.java259 .setSourceData(messageDetails.getUid()) in getVoicemailFromMessageStructure()
298 LogUtils.d(TAG, "Fetching message structure for " + message.getUid()); in fetchMessageStructure()
340 LogUtils.d(TAG, "Fetching message body for " + message.getUid()); in fetchVoicemailPayload()
537 LogUtils.d(TAG, "Fetched message structure for " + message.getUid()); in messageRetrieved()
602 LogUtils.d(TAG, "Fetched message body for " + message.getUid()); in messageRetrieved()
644 LogUtils.d(TAG, "Fetched transcription for " + message.getUid()); in messageRetrieved()
/packages/apps/Settings/src/com/android/settings/notification/app/
DConversationListPreferenceController.java105 conversation.getPkg(), conversation.getUid(), in createConversationPref()
133 channelArgs.putInt(AppInfoBase.ARG_PACKAGE_UID, conversation.getUid()); in getSubSettingLauncher()
144 .setUserHandle(UserHandle.getUserHandleForUid(conversation.getUid())) in getSubSettingLauncher()
/packages/apps/Settings/src/com/android/settings/notification/history/
DNotificationHistoryAdapter.java83 .NOTIFICATION_HISTORY_OLDER_ITEM_CLICK, hn.getUid(), hn.getPackage(), position); in onBindViewHolder()
145 hn.getPackage(), hn.getUid(), hn.getPostedTimeMs()); in onItemSwipeDeleted()
150 .NOTIFICATION_HISTORY_OLDER_ITEM_DELETE, hn.getUid(), hn.getPackage(), in onItemSwipeDeleted()
/packages/modules/StatsD/tests/src/android/cts/statsd/atom/
DDeviceAtomTestCase.java107 int appUid = getUid(); in doDeviceMethod()
168 protected int getUid() throws Exception { in getUid() method in DeviceAtomTestCase
185 LogUtil.CLog.i("Installing device-side test app with uid " + getUid()); in installTestApp()

12345