Home
last modified time | relevance | path

Searched refs:uid (Results 1 – 25 of 90) sorted by relevance

1234

/cts/tools/release-parser/tests/resources/
Dplatform.xml.pb.txt220 name: "uid"
227 name: "uid"
234 name: "uid"
241 name: "uid"
248 name: "uid"
255 name: "uid"
262 name: "uid"
269 name: "uid"
276 name: "uid"
283 name: "uid"
[all …]
/cts/tests/tests/net/native/qtaguid/src/
DNativeQtaguidTest.cpp44 int getCtrlSkInfo(int tag, uid_t uid, uint64_t* sk_addr, int* ref_cnt) { in getCtrlSkInfo() argument
49 uint64_t full_tag = (uint64_t)tag << 32 | uid; in getCtrlSkInfo()
51 snprintf(pattern, sizeof(pattern), " tag=0x%" PRIx64 " (uid=%" PRIu32 ")", full_tag, uid); in getCtrlSkInfo()
66 if (!(res == TOTAL_PARAM && k_tag == full_tag && k_uid == uid)) in getCtrlSkInfo()
77 uid_t uid = getuid(); in checkNoSocketPointerLeaks() local
83 EXPECT_EQ(0, legacy_tagSocket(sockfd, tag, uid)); in checkNoSocketPointerLeaks()
84 EXPECT_EQ(0, getCtrlSkInfo(tag, uid, &sk_addr, &ref_cnt)); in checkNoSocketPointerLeaks()
87 EXPECT_EQ(-ENOENT, getCtrlSkInfo(tag, uid, &sk_addr, &ref_cnt)); in checkNoSocketPointerLeaks()
94 uid_t uid = getuid(); in TEST() local
98 EXPECT_EQ(0, legacy_tagSocket(sockfd, tag, uid)); in TEST()
[all …]
/cts/tests/app/src/android/app/cts/
DActivityManagerProcessErrorStateInfoTest.java43 int uid = 3; in testWriteToParcel() local
51 mErrorStateInfo.uid = uid; in testWriteToParcel()
65 assertEquals(uid, values.uid); in testWriteToParcel()
77 int uid = 3; in testReadFromParcel() local
85 mErrorStateInfo.uid = uid; in testReadFromParcel()
99 assertEquals(uid, values.uid); in testReadFromParcel()
/cts/tests/tests/externalservice/src/android/externalservice/cts/
DExternalServiceTest.java146 assertFalse(id.uid == 0 || id.pid == 0); in testBindExternalService()
147 assertNotEquals(Process.myUid(), id.uid); in testBindExternalService()
169 assertFalse(creatorId.uid == 0 || creatorId.pid == 0); in testBindExternalServiceWithRunningOwn()
203 assertFalse(creatorServiceId.uid == 0 || creatorId.pid == 0); in testBindExternalServiceWithRunningOwn()
215 assertFalse(serviceId.uid == 0 || serviceId.pid == 0); in testBindExternalServiceWithRunningOwn()
222 assertNotEquals(myUid, creatorId.uid); in testBindExternalServiceWithRunningOwn()
223 assertNotEquals(myUid, creatorServiceId.uid); in testBindExternalServiceWithRunningOwn()
224 assertNotEquals(myUid, serviceId.uid); in testBindExternalServiceWithRunningOwn()
229 assertNotEquals(creatorId.uid, creatorServiceId.uid); in testBindExternalServiceWithRunningOwn()
230 assertNotEquals(creatorId.uid, serviceId.uid); in testBindExternalServiceWithRunningOwn()
[all …]
/cts/hostsidetests/net/app/src/com/android/cts/net/hostside/
DAbstractRestrictBackgroundNetworkTestCase.java471 protected void addRestrictBackgroundWhitelist(int uid) throws Exception { in addRestrictBackgroundWhitelist() argument
472 executeShellCommand("cmd netpolicy add restrict-background-whitelist " + uid); in addRestrictBackgroundWhitelist()
473 assertRestrictBackgroundWhitelist(uid, true); in addRestrictBackgroundWhitelist()
476 assertRestrictBackgroundBlacklist(uid, false); in addRestrictBackgroundWhitelist()
479 protected void removeRestrictBackgroundWhitelist(int uid) throws Exception { in removeRestrictBackgroundWhitelist() argument
480 executeShellCommand("cmd netpolicy remove restrict-background-whitelist " + uid); in removeRestrictBackgroundWhitelist()
481 assertRestrictBackgroundWhitelist(uid, false); in removeRestrictBackgroundWhitelist()
484 protected void assertRestrictBackgroundWhitelist(int uid, boolean expected) throws Exception { in assertRestrictBackgroundWhitelist() argument
485 assertRestrictBackground("restrict-background-whitelist", uid, expected); in assertRestrictBackgroundWhitelist()
488 protected void addRestrictBackgroundBlacklist(int uid) throws Exception { in addRestrictBackgroundBlacklist() argument
[all …]
DDataSaverModeTest.java172 int uid = -1; in testGetRestrictBackgroundStatus_requiredWhitelistedPackages() local
174 uid = getUid(packageName); in testGetRestrictBackgroundStatus_requiredWhitelistedPackages()
175 assertRestrictBackgroundWhitelist(uid, true); in testGetRestrictBackgroundStatus_requiredWhitelistedPackages()
178 if (uid > 0) { in testGetRestrictBackgroundStatus_requiredWhitelistedPackages()
179 error.append(" (uid ").append(uid).append(")"); in testGetRestrictBackgroundStatus_requiredWhitelistedPackages()
/cts/tests/app/src/android/app/cts/android/app/cts/tools/
DUidImportanceListener.java35 public UidImportanceListener(Context context, int uid, int cutPoint) { in UidImportanceListener() argument
36 this(context, uid, cutPoint, 5*1000); in UidImportanceListener()
39 public UidImportanceListener(Context context, int uid, int cutPoint, long defaultWaitTime) { in UidImportanceListener() argument
41 mUid = uid; in UidImportanceListener()
47 public void onUidImportance(int uid, int importance) { in onUidImportance() argument
49 Log.d("XXXXX", "Got importance for uid " + uid + " (cut " + mCutPoint in onUidImportance()
51 if (uid == mUid) { in onUidImportance()
/cts/tests/tests/appop/src/android/app/appops/cts/
DHistoricalAppopsTest.kt44 private val uid = Process.myUid() in <lambda>() constant
120 val firstOps = getHistoricalOpsFromDiskRaw(appOpsManager!!, uid, packageName!!, in <lambda>()
127 val secondOps = getHistoricalOpsFromDiskRaw(appOpsManager!!, uid, packageName!!, in <lambda>()
134 val thirdOps = getHistoricalOpsFromDiskRaw(appOpsManager!!, uid, packageName!!, in <lambda>()
162 val firstOps = getHistoricalOpsFromDiskRaw(appOpsManager!!, uid, packageName!!, in <lambda>()
171 val secondOps = getHistoricalOpsFromDiskRaw(appOpsManager!!, uid, packageName!!, in <lambda>()
181 val thirdOps = getHistoricalOpsFromDiskRaw(appOpsManager!!, uid, packageName!!, in <lambda>()
190 val fourthOps = getHistoricalOpsFromDiskRaw(appOpsManager!!, uid, packageName!!, in <lambda>()
195 val fifthOps = getHistoricalOpsFromDiskRaw(appOpsManager!!, uid, packageName!!, in <lambda>()
220 val ops = getHistoricalOpsFromDiskRaw(appOpsManager!!, uid, packageName!!, in <lambda>()
[all …]
/cts/tests/tests/telephony/current/src/android/telephony/cts/
DSipProfileTest.java46 int uid = 0; in testSetCallingUid() local
47 sipProfile.setCallingUid(uid); in testSetCallingUid()
48 assertEquals(uid, sipProfile.getCallingUid()); in testSetCallingUid()
49 uid = 1; in testSetCallingUid()
50 sipProfile.setCallingUid(uid); in testSetCallingUid()
51 assertEquals(uid, sipProfile.getCallingUid()); in testSetCallingUid()
/cts/hostsidetests/appsecurity/test-apps/AppAccessData/src/com/android/cts/appaccessdata/
DAccessPrivateDataTest.java135 .getApplicationInfo().uid; in testAccessPrivateTrafficStats()
155 final int uid = android.os.Process.myUid(); in testTrafficStatsStatsUidSelf() local
156 final long rxb = TrafficStats.getUidRxBytes(uid); in testTrafficStatsStatsUidSelf()
157 final long rxp = TrafficStats.getUidRxPackets(uid); in testTrafficStatsStatsUidSelf()
158 final long txb = TrafficStats.getUidTxBytes(uid); in testTrafficStatsStatsUidSelf()
159 final long txp = TrafficStats.getUidTxPackets(uid); in testTrafficStatsStatsUidSelf()
190 assertEquals(rxb, TrafficStats.getUidRxBytes(uid)); in testTrafficStatsStatsUidSelf()
191 assertEquals(rxp, TrafficStats.getUidRxPackets(uid)); in testTrafficStatsStatsUidSelf()
192 assertEquals(txb, TrafficStats.getUidTxBytes(uid)); in testTrafficStatsStatsUidSelf()
193 assertEquals(txp, TrafficStats.getUidTxPackets(uid)); in testTrafficStatsStatsUidSelf()
/cts/hostsidetests/statsd/src/android/cts/statsd/uidmap/
DUidMapTests.java56 private boolean hasMatchingChange(UidMapping uidmap, int uid, boolean expectDeletion) { in hasMatchingChange() argument
57 LogUtil.CLog.d("The uid we are looking for is " + uid); in hasMatchingChange()
59 if (change.getAppHash() == DEVICE_SIDE_TEST_PKG_HASH && change.getUid() == uid) { in hasMatchingChange()
87 int uid = getUid(); in testChangeFromInstallation() local
90 if (hasMatchingChange(report.getUidMap(), uid, false)) { in testChangeFromInstallation()
114 int uid = getUid(); in testChangeFromReinstall() local
117 if (hasMatchingChange(report.getUidMap(), uid, false)) { in testChangeFromReinstall()
131 int uid = getUid(); in testChangeFromUninstall() local
142 if (hasMatchingChange(report.getUidMap(), uid, true)) { in testChangeFromUninstall()
/cts/hostsidetests/appsecurity/test-apps/ListeningPortsApp/src/android/appsecurity/cts/listeningports/
DListeningPortsTest.java107 String addrUid = entry.localAddress.getHostAddress() + ' ' + entry.uid; in testNoAccessibleListeningPorts()
108 String addrPortUid = addrPort + ' ' + entry.uid; in testNoAccessibleListeningPorts()
117 int appId = UserHandle.getAppId(entry.uid); in testNoAccessibleListeningPorts()
124 + entry.port + ", UID=" + entry.uid in testNoAccessibleListeningPorts()
125 + " " + uidToPackage(entry.uid); in testNoAccessibleListeningPorts()
133 private String uidToPackage(int uid) { in uidToPackage() argument
135 String[] packages = pm.getPackagesForUid(uid); in uidToPackage()
199 private final int uid; field in ListeningPortsTest.ParsedProcEntry
201 private ParsedProcEntry(InetAddress addr, int port, String state, int uid) { in ParsedProcEntry() argument
205 this.uid = uid; in ParsedProcEntry()
[all …]
/cts/hostsidetests/appsecurity/test-apps/MultiUserStorageApp/src/com/android/cts/multiuserstorageapp/
DMultiUserStorageTest.java69 final int uid = android.os.Process.myUid(); in testWriteIsolatedStorage() local
71 writeInt(buildApiPath(FILE_SINGLETON), uid); in testWriteIsolatedStorage() local
72 writeInt(buildApiPath(FILE_MY_UID), uid); in testWriteIsolatedStorage() local
80 writeInt(new File(path, FILE_SINGLETON), uid); in testWriteIsolatedStorage()
85 final int uid = android.os.Process.myUid(); in testReadIsolatedStorage() local
89 assertEquals("Failed to read singleton file from API path", uid, in testReadIsolatedStorage()
91 assertEquals("Failed to read singleton file from env path", uid, in testReadIsolatedStorage()
93 assertEquals("Failed to read singleton file from raw path", uid, in testReadIsolatedStorage()
96 assertEquals("Failed to read UID file from API path", uid, in testReadIsolatedStorage()
104 assertEquals("Unexpected value in singleton file at " + path, uid, in testReadIsolatedStorage()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/
DBleClientService.java542 private void writeCharacteristic(UUID uid, String writeValue) { in writeCharacteristic() argument
543 BluetoothGattCharacteristic characteristic = getCharacteristic(uid); in writeCharacteristic()
556 private void writeDescriptor(UUID uid, String writeValue) { in writeDescriptor() argument
557 BluetoothGattDescriptor descriptor = getDescriptor(uid); in writeDescriptor()
626 private void setNotification(UUID uid, boolean enable) { in setNotification() argument
627 BluetoothGattCharacteristic characteristic = getCharacteristic(uid); in setNotification()
843 private BluetoothGattDescriptor getDescriptor(UUID uid) { in getDescriptor() argument
848 descriptor = characteristic.getDescriptor(uid); in getDescriptor()
991 final UUID uid = characteristic.getUuid();
1001 notifyError("Failed to write characteristic: " + status + " : " + uid);
[all …]
DBleEncryptedClientService.java240 private BluetoothGattDescriptor getDescriptor(UUID uid) { in getDescriptor() argument
245 descriptor = characteristic.getDescriptor(uid); in getDescriptor()
380 UUID uid = characteristic.getUuid();
382 …d(TAG, "onCharacteristicWrite: characteristic.val=" + value + " status=" + status + " uid=" + uid);
385 if (uid.equals(CHARACTERISTIC_ENCRYPTED_WRITE_UUID)) {
417 UUID uid = characteristic.getUuid();
421 if (uid.equals(CHARACTERISTIC_ENCRYPTED_READ_UUID)) {
464 UUID uid = descriptor.getUuid();
466 if (uid.equals(DESCRIPTOR_ENCRYPTED_READ_UUID)) {
487 if (uid.equals(DESCRIPTOR_ENCRYPTED_READ_UUID)) {
[all …]
/cts/tests/framework/base/windowmanager/src/android/server/wm/
DAlertWindowsAppOpsTests.java83 final int uid = Process.myUid(); in testSystemAlertWindowAppOpsInitiallyAllowed() local
97 assertFalse(appOpsManager.isOperationActive(OP_SYSTEM_ALERT_WINDOW, uid, packageName)); in testSystemAlertWindowAppOpsInitiallyAllowed()
106 eq(uid), eq(packageName), eq(true)); in testSystemAlertWindowAppOpsInitiallyAllowed()
110 uid, packageName)); in testSystemAlertWindowAppOpsInitiallyAllowed()
122 eq(uid), eq(packageName), eq(false)); in testSystemAlertWindowAppOpsInitiallyAllowed()
125 assertFalse(appOpsManager.isOperationActive(OP_SYSTEM_ALERT_WINDOW, uid, packageName)); in testSystemAlertWindowAppOpsInitiallyAllowed()
143 assertTrue(appOpsManager.isOperationActive(OP_SYSTEM_ALERT_WINDOW, uid, packageName)); in testSystemAlertWindowAppOpsInitiallyAllowed()
/cts/tests/tests/media/src/android/media/cts/
DAudioRecordAppOpTest.java61 final int uid = Process.myUid(); in testRecordAppOps() local
81 uid, packageName)).isFalse(); in testRecordAppOps()
93 eq(uid), eq(packageName), eq(true)); in testRecordAppOps()
97 uid, packageName)).isTrue(); in testRecordAppOps()
111 eq(uid), eq(packageName), eq(false)); in testRecordAppOps()
115 uid, packageName)).isFalse(); in testRecordAppOps()
/cts/hostsidetests/net/src/com/android/cts/net/
DHostsideRestrictBackgroundNetworkTests.java318 private void assertRestrictBackgroundWhitelist(int uid, boolean expected) throws Exception { in assertRestrictBackgroundWhitelist() argument
323 actual = output.contains(Integer.toString(uid)); in assertRestrictBackgroundWhitelist()
327 Log.v(TAG, "whitelist check for uid " + uid + " doesn't match yet (expected " in assertRestrictBackgroundWhitelist()
331 fail("whitelist check for uid " + uid + " failed: expected " in assertRestrictBackgroundWhitelist()
360 protected void addRestrictBackgroundWhitelist(int uid) throws Exception { in addRestrictBackgroundWhitelist() argument
361 runCommand("cmd netpolicy add restrict-background-whitelist " + uid); in addRestrictBackgroundWhitelist()
362 assertRestrictBackgroundWhitelist(uid, true); in addRestrictBackgroundWhitelist()
/cts/hostsidetests/appsecurity/test-apps/V3SigningSchemeRotation/src/android/appsecurity/cts/v3rotationtests/
DV3RotationTest.java173 int uid = pm.getPackageUid(PKG, 0); in testHasSigningCertificateByUid() local
176 pm.hasSigningCertificate(uid, firstCertBytes, PackageManager.CERT_INPUT_RAW_X509)); in testHasSigningCertificateByUid()
179 pm.hasSigningCertificate(uid, secondCertBytes, PackageManager.CERT_INPUT_RAW_X509)); in testHasSigningCertificateByUid()
186 int uid = pm.getPackageUid(PKG, 0); in testHasSigningCertificateByUidSha256() local
190 pm.hasSigningCertificate(uid, firstCertBytes, PackageManager.CERT_INPUT_SHA256)); in testHasSigningCertificateByUidSha256()
193 pm.hasSigningCertificate(uid, secondCertBytes, PackageManager.CERT_INPUT_SHA256)); in testHasSigningCertificateByUidSha256()
/cts/tests/inputmethod/src/android/view/inputmethod/cts/
DInputBindingTest.java44 int uid = 1; in testInputBinding() local
46 InputBinding inputBinding = new InputBinding(bic, binder, uid, pid); in testInputBinding()
50 assertEquals(uid, inputBinding.getUid()); in testInputBinding()
60 assertEquals(uid, target.getUid()); in testInputBinding()
/cts/hostsidetests/statsd/src/android/cts/statsd/validation/
DBatteryStatsValidationTests.java139 int uid = getUid(); in testServiceStartCount() local
143 if (dims.get(0).getValueInt() == uid) { in testServiceStartCount()
152 if (uidProto.getUid() == uid) { in testServiceStartCount()
183 int uid = getUid(); in testServiceLaunchCount() local
187 if (dims.get(0).getValueInt() == uid) { in testServiceLaunchCount()
196 if (uidProto.getUid() == uid) { in testServiceLaunchCount()
/cts/tests/tests/externalservice/common/src/android/externalservice/common/
DRunningServiceInfo.java28 public int uid; field in RunningServiceInfo
43 dest.writeInt(uid); in writeToParcel()
54 info.uid = source.readInt();
/cts/tests/tests/permission/src/android/permission/cts/
DAppIdleStatePermissionTest.java55 int uid = pm.getApplicationInfo(pkg.packageName, 0).uid; in testChangeAppIdleStatePermission() local
56 if (UserHandle.isApp(uid)) { in testChangeAppIdleStatePermission()
/cts/hostsidetests/appsecurity/test-apps/AppWithData/src/com/android/cts/appwithdata/
DMyProvider.java83 final int uid = Os.getuid(); in call() local
84 Log.v(TAG, "My UID is " + uid); in call()
85 TrafficStats.setThreadStatsUid(uid); in call()
86 if (TrafficStats.getThreadStatsUid() != uid) { in call()
/cts/hostsidetests/statsd/src/android/cts/statsd/atom/
DUidAtomTests.java296 int uid = getUid(); in testHiddenApiUsed() local
297 assertEquals(uid, atom.getUid()); in testHiddenApiUsed()
358 int uid = getUid(); in testCpuTimePerUid() local
360 if (atom.getCpuTimePerUid().getUid() == uid) { in testCpuTimePerUid()
366 assertTrue("found uid " + uid, found); in testCpuTimePerUid()
411 int uid = getUid(); in testDeviceCalculatedPowerBlameUid() local
415 if (item.getUid() == uid) { in testDeviceCalculatedPowerBlameUid()
416 assertFalse("Found multiple power values for uid " + uid, uidFound); in testDeviceCalculatedPowerBlameUid()
421 assertTrue("No power value for uid " + uid, uidFound); in testDeviceCalculatedPowerBlameUid()
422 assertTrue("Non-positive power value for uid " + uid, uidPower > 0); in testDeviceCalculatedPowerBlameUid()
[all …]

1234