/packages/modules/Connectivity/tests/cts/hostside-network-policy/app/src/com/android/cts/netpolicy/hostside/ |
D | NetworkPolicyManagerTest.java | 51 removeRestrictBackgroundWhitelist(mUid); in setUp() 52 removeRestrictBackgroundBlacklist(mUid); in setUp() 78 assertFalse(isUidNetworkingBlocked(mUid, METERED)); // Match NTWK_ALLOWED_DEFAULT in testIsUidNetworkingBlocked_withUidNotBlocked() 79 assertFalse(isUidNetworkingBlocked(mUid, NON_METERED)); // Match NTWK_ALLOWED_NON_METERED in testIsUidNetworkingBlocked_withUidNotBlocked() 102 assertNetworkingBlockedStatusForUid(mUid, METERED, in testIsUidNetworkingBlocked_withSystemUid() 118 assertNetworkingBlockedStatusForUid(mUid, METERED, in testIsUidNetworkingBlocked_withDataSaverMode() 124 isUidNetworkingBlocked(mUid, NON_METERED)); // Match NTWK_ALLOWED_NON_METERED in testIsUidNetworkingBlocked_withDataSaverMode() 127 addRestrictBackgroundBlacklist(mUid); in testIsUidNetworkingBlocked_withDataSaverMode() 128 assertNetworkingBlockedStatusForUid(mUid, METERED, in testIsUidNetworkingBlocked_withDataSaverMode() 134 isUidNetworkingBlocked(mUid, NON_METERED)); // Match NTWK_ALLOWED_NON_METERED in testIsUidNetworkingBlocked_withDataSaverMode() [all …]
|
D | MixedModesTest.java | 49 removeRestrictBackgroundWhitelist(mUid); in setUp() 50 removeRestrictBackgroundBlacklist(mUid); in setUp() 87 addRestrictBackgroundWhitelist(mUid); in testDataAndBatterySaverModes_meteredNetwork() 92 removeRestrictBackgroundWhitelist(mUid); in testDataAndBatterySaverModes_meteredNetwork() 96 removeRestrictBackgroundWhitelist(mUid); in testDataAndBatterySaverModes_meteredNetwork() 103 addRestrictBackgroundWhitelist(mUid); in testDataAndBatterySaverModes_meteredNetwork() 110 removeRestrictBackgroundWhitelist(mUid); in testDataAndBatterySaverModes_meteredNetwork() 113 addRestrictBackgroundBlacklist(mUid); in testDataAndBatterySaverModes_meteredNetwork() 118 removeRestrictBackgroundBlacklist(mUid); in testDataAndBatterySaverModes_meteredNetwork() 121 addRestrictBackgroundBlacklist(mUid); in testDataAndBatterySaverModes_meteredNetwork() [all …]
|
D | NetworkCallbackTest.java | 213 removeRestrictBackgroundWhitelist(mUid); in setUp() 214 removeRestrictBackgroundBlacklist(mUid); in setUp() 287 assertNetworkAccessBlockedByBpf(true, mUid, true /* metered */); in testOnBlockedStatusChanged_dataSaver() 291 addRestrictBackgroundWhitelist(mUid); in testOnBlockedStatusChanged_dataSaver() 293 assertNetworkAccessBlockedByBpf(false, mUid, true /* metered */); in testOnBlockedStatusChanged_dataSaver() 297 removeRestrictBackgroundWhitelist(mUid); in testOnBlockedStatusChanged_dataSaver() 300 assertNetworkAccessBlockedByBpf(true, mUid, true /* metered */); in testOnBlockedStatusChanged_dataSaver() 312 assertNetworkAccessBlockedByBpf(false, mUid, false /* metered */); in testOnBlockedStatusChanged_dataSaver() 318 assertNetworkAccessBlockedByBpf(false, mUid, false /* metered */); in testOnBlockedStatusChanged_dataSaver() 337 assertNetworkAccessBlockedByBpf(true, mUid, true /* metered */); in testOnBlockedStatusChanged_powerSaver() [all …]
|
D | DataSaverModeTest.java | 53 removeRestrictBackgroundWhitelist(mUid); in setUp() 54 removeRestrictBackgroundBlacklist(mUid); in setUp() 72 addRestrictBackgroundWhitelist(mUid); in testGetRestrictBackgroundStatus_disabled() 86 addRestrictBackgroundWhitelist(mUid); in testGetRestrictBackgroundStatus_whitelisted() 90 removeRestrictBackgroundWhitelist(mUid); in testGetRestrictBackgroundStatus_whitelisted() 139 addRestrictBackgroundBlacklist(mUid); in testGetRestrictBackgroundStatus_blacklisted() 152 addRestrictBackgroundWhitelist(mUid); in testGetRestrictBackgroundStatus_blacklisted() 158 addRestrictBackgroundBlacklist(mUid); in testGetRestrictBackgroundStatus_blacklisted() 163 removeRestrictBackgroundBlacklist(mUid); in testGetRestrictBackgroundStatus_blacklisted()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/appsearch/ |
D | AppSearchConsentWorker.java | 94 private final String mUid = getUserIdentifierFromBinderCallingUid(); field in AppSearchConsentWorker 162 mGlobalSearchSession, mExecutor, mUid, apiType, mAdservicesPackageName); in getConsent() 182 AppSearchConsentDao.getRowId(mUid, apiType), in setConsent() 183 mUid, in setConsent() 206 mUid, in getAppsWithConsent() 224 AppSearchAppConsentDao.getRowId(mUid, consentType), in clearAppsWithConsent() 244 mUid, in addAppWithConsent() 251 AppSearchAppConsentDao.getRowId(mUid, consentType), in addAppWithConsent() 252 mUid, in addAppWithConsent() 294 mUid, in removeAppWithConsent() [all …]
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/util/ |
D | WifiPermissionsUtilTest.java | 143 private int mUid; field in WifiPermissionsUtilTest 174 mUid = MANAGED_PROFILE_UID; // do not really care about this value in testCheckConfigOverridePermissionApproved() 181 assertTrue(codeUnderTest.checkConfigOverridePermission(mUid)); in testCheckConfigOverridePermissionApproved() 189 mUid = OTHER_USER_UID; // do not really care about this value in testCheckConfigOverridePermissionDenied() 196 assertFalse(codeUnderTest.checkConfigOverridePermission(mUid)); in testCheckConfigOverridePermissionDenied() 211 mUid = MANAGED_PROFILE_UID; in testCanReadPeersMacAddressCurrentUserAndAllPermissions() 212 mPermissionsList.put(mMacAddressPermission, mUid); in testCanReadPeersMacAddressCurrentUserAndAllPermissions() 220 codeUnderTest.enforceCanAccessScanResults(TEST_PACKAGE_NAME, TEST_FEATURE_ID, mUid, null); in testCanReadPeersMacAddressCurrentUserAndAllPermissions() 235 mUid = MANAGED_PROFILE_UID; in testCanReadPeersMacAddressCurrentProfileAndAllPermissions() 236 mPermissionsList.put(mMacAddressPermission, mUid); in testCanReadPeersMacAddressCurrentProfileAndAllPermissions() [all …]
|
/packages/services/Car/service/src/com/android/car/telemetry/publisher/net/ |
D | RefinedStats.java | 41 private final IntArray mUid = new IntArray(); field in RefinedStats 63 mUid.add(bucket.getUid()); in addNetworkStats() 67 index = mUid.size() - 1; in addNetworkStats() 86 for (int l = 0; l < left.mUid.size(); l++) { in subtract() 87 int rIndex = right.findIndex(left.mUid.get(l), left.mTag.get(l)); in subtract() 88 result.mUid.add(left.mUid.get(l)); in subtract() 103 for (int i = 0; i < mUid.size(); i++) { in findIndex() 104 if (mUid.get(i) == uid && mTag.get(i) == tag) { in findIndex() 113 return mUid.size() == 0; in isEmpty() 153 data.putInt(Constants.CONNECTIVITY_BUNDLE_KEY_SIZE, mUid.size()); in toPersistableBundle() [all …]
|
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/ |
D | LocationPermissionCheckerTest.java | 89 private int mUid; field in LocationPermissionCheckerTest 112 when(mMockAppOps.noteOp(AppOpsManager.OPSTR_WIFI_SCAN, mUid, TEST_PKG_NAME, in setupMocks() 114 when(mMockAppOps.noteOp(eq(AppOpsManager.OPSTR_COARSE_LOCATION), eq(mUid), in setupMocks() 117 when(mMockAppOps.noteOp(eq(AppOpsManager.OPSTR_FINE_LOCATION), eq(mUid), in setupMocks() 122 + " to application bound to user " + mUid)) in setupMocks() 123 .when(mMockAppOps).checkPackage(mUid, TEST_PKG_NAME); in setupMocks() 154 mUid = OTHER_USER_UID; in initTestVars() 167 Binder.restoreCallingIdentity((((long) mUid) << 32) | Binder.getCallingPid()); in setupMockInterface() 173 when(mMockContext.checkPermission(mManifestStringCoarse, -1, mUid)) in setupMockInterface() 175 when(mMockContext.checkPermission(mManifestStringFine, -1, mUid)) in setupMockInterface() [all …]
|
/packages/modules/StatsD/statsd/src/config/ |
D | ConfigKey.h | 41 return mUid; in GetUid() 48 if (mUid < that.mUid) { 51 if (mUid > that.mUid) { 58 return mUid == that.mUid && mId == that.mId; 65 int mUid; variable
|
D | ConfigKey.cpp | 26 ConfigKey::ConfigKey(const ConfigKey& that) : mId(that.mId), mUid(that.mUid) { in ConfigKey() 29 ConfigKey::ConfigKey(int uid, const int64_t id) : mId(id), mUid(uid) { in ConfigKey() 37 s += "(" + std::to_string(mUid) + " " + std::to_string(mId) + ")"; in ToString()
|
/packages/modules/Uwb/framework/java/android/uwb/ |
D | SessionHandle.java | 31 private final int mUid; field in SessionHandle 41 mUid = uid; in SessionHandle() 48 mUid = in.readInt(); in SessionHandle() 73 return mUid; in getUid() 89 dest.writeInt(mUid); in writeToParcel() 103 && mUid == other.mUid in equals() 111 return Objects.hash(mId, mPackageName, mUid, mPid); in hashCode() 117 + ", uid: " + mUid + ", pid: " + mPid + "]"; in toString()
|
/packages/modules/AdServices/sdksandbox/service/java/com/android/server/sdksandbox/ |
D | CallingInfo.java | 35 private final int mUid; field in CallingInfo 57 mUid = uid; in CallingInfo() 60 mIsCallFromSdkSandbox = Process.isSdkSandboxUid(mUid); in CallingInfo() 89 return mUid; in getUid() 108 + mUid in toString() 123 return mUid == that.mUid && mPackageName.equals(that.mPackageName); in equals() 128 return mUid ^ mPackageName.hashCode(); in hashCode()
|
D | SandboxesStorageMetrics.java | 99 public int mUid; field in SandboxesStorageMetrics.StorageStatsEvent 104 mUid = uid; in StorageStatsEvent() 112 return mShared == that.mShared && mStorageKb == that.mStorageKb && mUid == that.mUid; in equals() 117 return Objects.hash(mShared, mStorageKb, mUid); in hashCode()
|
/packages/modules/Connectivity/nearby/service/java/com/android/server/nearby/util/identity/ |
D | CallerIdentity.java | 71 private final int mUid; field in CallerIdentity 82 this.mUid = uid; in CallerIdentity() 90 return mUid; in getUid() 110 return mUid == Process.SYSTEM_UID; in isSystemServer() 121 builder.append(mUid).append("/").append(mPackageName); in toString() 143 return mUid == that.mUid in equals() 151 return Objects.hash(mUid, mPid, mPackageName, mAttributionTag); in hashCode()
|
/packages/modules/Media/apex/framework/java/android/media/ |
D | Session2Token.java | 86 private final int mUid; field in Session2Token 119 mUid = uid; in Session2Token() 127 mUid = uid; in Session2Token() 137 mUid = in.readInt(); in Session2Token() 157 dest.writeInt(mUid); in writeToParcel() 173 return Objects.hash(mType, mUid, mPackageName, mServiceName, mSessionLink); in hashCode() 182 return mUid == other.mUid in equals() 199 return mUid; in getUid()
|
/packages/modules/Connectivity/service/src/com/android/server/connectivity/ |
D | CarrierPrivilegeAuthenticator.java | 182 final int mUid; field in CarrierPrivilegeAuthenticator.CarrierServiceUidWithSubId 186 mUid = uid; in CarrierServiceUidWithSubId() 196 return (mUid == compare.mUid && mSubId == compare.mSubId); in equals() 201 return mUid * 31 + mSubId; in hashCode() 242 && oldPair.mUid != Process.INVALID_UID in onCarrierServiceChanged() 245 mListener.accept(oldPair.mUid, oldPair.mSubId); in onCarrierServiceChanged() 272 && oldPair.mUid != Process.INVALID_UID in unregisterCarrierPrivilegesListeners() 274 mListener.accept(oldPair.mUid, oldPair.mSubId); in unregisterCarrierPrivilegesListeners() 386 if (oldPair.mUid != Process.INVALID_UID in updateCarrierServiceUid() 389 mListener.accept(oldPair.mUid, oldPair.mSubId); in updateCarrierServiceUid() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/testutils/ |
D | ShadowAppOpsManager.java | 71 PackageOps packageOp = new PackageOps(key.mPackageName, key.mUid, in getPackagesForOps() 80 private int mUid; field in ShadowAppOpsManager.InternalKey 84 mUid = uid; in InternalKey() 92 return mUid == that.mUid && mPackageName.equals(that.mPackageName); in equals() 99 return Objects.hash(mUid, mPackageName); in hashCode()
|
/packages/services/Car/service/src/com/android/car/stats/ |
D | VmsClientStats.java | 31 private final int mUid; field in VmsClientStats 59 mUid = uid; in VmsClientStats() 71 this.mUid = other.mUid; in VmsClientStats() 123 return mUid; in getUid()
|
D | VmsClientLogger.java | 58 private final int mUid; field in VmsClientLogger 68 mUid = clientUid; in VmsClientLogger() 73 return mUid; in getUid() 87 mUid, connectionState); in logConnectionState() 151 (k) -> new VmsClientStats(mUid, layer)); in getLayerEntry()
|
/packages/apps/Settings/src/com/android/settings/notification/app/ |
D | NotificationSettings.java | 73 protected int mUid; field in NotificationSettings 121 mUid = mArgs != null && mArgs.containsKey(AppInfoBase.ARG_PACKAGE_UID) in onAttach() 125 if (mUid < 0) { in onAttach() 127 mUid = mPm.getPackageUid(mPkg, 0); in onAttach() 132 mPkgInfo = findPackageInfo(mPkg, mUid); in onAttach() 135 mUserId = UserHandle.getUserId(mUid); in onAttach() 170 if (mUid < 0 || TextUtils.isEmpty(mPkg) || mPkgInfo == null) { in onCreate() 188 if (mUid < 0 || TextUtils.isEmpty(mPkg) || mPkgInfo == null || mAppRow == null) { in onResume() 269 mChannel = mBackend.getChannel(mPkg, mUid, channelId, conversationId); in loadChannel() 271 mBackend.getChannel(mPkg, mUid, channelId, null); in loadChannel() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/ |
D | BatteryUtilsTest.java | 102 @Mock private BatteryStats.Uid mUid; field in BatteryUtilsTest 131 .when(mUid) in setUp() 134 .when(mUid) in setUp() 137 .when(mUid) in setUp() 140 .when(mUid) in setUp() 143 .when(mUid) in setUp() 173 .getForegroundActivityTotalTimeUs(eq(mUid), anyLong()); in testGetProcessTimeMs_typeForeground_timeCorrect() 177 BatteryUtils.StatusType.FOREGROUND, mUid, BatteryStats.STATS_SINCE_CHARGED); in testGetProcessTimeMs_typeForeground_timeCorrect() 186 BatteryUtils.StatusType.BACKGROUND, mUid, BatteryStats.STATS_SINCE_CHARGED); in testGetProcessTimeMs_typeBackground_timeCorrect() 195 .getForegroundActivityTotalTimeUs(eq(mUid), anyLong()); in testGetProcessTimeMs_typeAll_timeCorrect() [all …]
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
D | BatteryOptimizeUtils.java | 62 private final int mUid; field in BatteryOptimizeUtils 91 mUid = uid; in BatteryOptimizeUtils() 97 mMode = getMode(mAppOpsManager, mUid, mPackageName); in BatteryOptimizeUtils() 98 mAllowListed = mPowerAllowListBackend.isAllowlisted(mPackageName, mUid); in BatteryOptimizeUtils() 121 mAllowListed = mPowerAllowListBackend.isAllowlisted(mPackageName, mUid); in getAppOptimizationMode() 124 AppOpsManager.OP_RUN_ANY_IN_BACKGROUND, mUid, mPackageName); in getAppOptimizationMode() 158 mContext, mode, mUid, mPackageName, mBatteryUtils, mPowerAllowListBackend, action); in setAppUsageState() 170 return isSystemOrDefaultApp(mContext, mPowerAllowListBackend, mPackageName, mUid); in isSystemOrDefaultApp() 192 return mUid; in getUid()
|
/packages/apps/Car/Settings/src/com/android/car/settings/applications/ |
D | NotificationsPreferenceController.java | 39 private int mUid; field in NotificationsPreferenceController 52 mUid = packageInfo.applicationInfo.uid; in setPackageInfo() 63 preference.setChecked(areNotificationsEnabled(mPackageName, mUid)); in updateState() 70 return toggleNotificationsSetting(mPackageName, mUid, enabled); in handlePreferenceChanged()
|
/packages/modules/Connectivity/tests/unit/java/com/android/server/ |
D | IpSecServiceParameterizedTest.java | 219 int mUid = Os.getuid(); field in IpSecServiceParameterizedTest 291 eq(mUid), in testReleaseSecurityParameterIndex() 300 IpSecService.UserRecord userRecord = mIpSecService.mUserResourceTracker.getUserRecord(mUid); in testReleaseSecurityParameterIndex() 319 IpSecService.UserRecord userRecord = mIpSecService.mUserResourceTracker.getUserRecord(mUid); in testSecurityParameterIndexBinderDeath() 327 eq(mUid), in testSecurityParameterIndexBinderDeath() 387 eq(mUid), in verifyTransformNetdCalledForCreatingSA() 549 IpSecService.UserRecord userRecord = mIpSecService.mUserResourceTracker.getUserRecord(mUid); in testReleaseOwnedSpi() 554 eq(mUid), in testReleaseOwnedSpi() 577 eq(mUid), in testDeleteTransform() 586 IpSecService.UserRecord userRecord = mIpSecService.mUserResourceTracker.getUserRecord(mUid); in testDeleteTransform() [all …]
|
/packages/modules/ExtServices/java/tests/src/android/ext/services/notification/ |
D | NotificationEntryTest.java | 61 private int mUid = 2018; field in NotificationEntryTest 80 return new StatusBarNotification(mPkg, mPkg, 0, "tag", mUid, mUid, 0, n, in generateSbn() 89 return new StatusBarNotification(packageName, packageName, 0, "tag", mUid, mUid, 0, n, in generateSbn() 94 return new StatusBarNotification(mPkg, mPkg, 0, "tag", mUid, mUid, 0, n, in generateSbn() 102 mUid = Process.myUid(); in setUp()
|