/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/notification/ |
D | NotificationBackend.java | 64 row.uid = app.uid; in loadAppRow() 72 row.banned = getNotificationsBanned(row.pkg, row.uid); in loadAppRow() 73 row.showBadge = canShowBadge(row.pkg, row.uid); in loadAppRow() 74 row.allowBubbles = canBubble(row.pkg, row.uid); in loadAppRow() 75 row.userId = UserHandle.getUserId(row.uid); in loadAppRow() 76 row.blockedChannelCount = getBlockedChannelCount(row.pkg, row.uid); in loadAppRow() 77 row.channelCount = getChannelCount(row.pkg, row.uid); in loadAppRow() 83 final boolean blocked = getNotificationsBanned(info.packageName, info.uid); in isBlockable() 134 public boolean getNotificationsBanned(String pkg, int uid) { in getNotificationsBanned() argument 136 final boolean enabled = sINM.areNotificationsEnabledForPackage(pkg, uid); in getNotificationsBanned() [all …]
|
/packages/apps/Settings/src/com/android/settings/datausage/ |
D | DataSaverBackend.java | 84 public void setIsWhitelisted(int uid, String packageName, boolean whitelisted) { in setIsWhitelisted() argument 86 mPolicyManager.setUidPolicy(uid, policy); in setIsWhitelisted() 87 mUidPolicies.put(uid, policy); in setIsWhitelisted() 94 public boolean isWhitelisted(int uid) { in isWhitelisted() argument 96 return mUidPolicies.get(uid, POLICY_NONE) == POLICY_ALLOW_METERED_BACKGROUND; in isWhitelisted() 104 for (int uid : mPolicyManager.getUidsWithPolicy(POLICY_ALLOW_METERED_BACKGROUND)) { in loadWhitelist() 105 mUidPolicies.put(uid, POLICY_ALLOW_METERED_BACKGROUND); in loadWhitelist() 114 public void setIsBlacklisted(int uid, String packageName, boolean blacklisted) { in setIsBlacklisted() argument 116 mPolicyManager.setUidPolicy(uid, policy); in setIsBlacklisted() 117 mUidPolicies.put(uid, policy); in setIsBlacklisted() [all …]
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/datausage/ |
D | DataSaverBackend.java | 84 public void setIsWhitelisted(int uid, String packageName, boolean whitelisted) { in setIsWhitelisted() argument 86 mPolicyManager.setUidPolicy(uid, policy); in setIsWhitelisted() 87 mUidPolicies.put(uid, policy); in setIsWhitelisted() 94 public boolean isWhitelisted(int uid) { in isWhitelisted() argument 96 return mUidPolicies.get(uid, POLICY_NONE) == POLICY_ALLOW_METERED_BACKGROUND; in isWhitelisted() 104 for (int uid : mPolicyManager.getUidsWithPolicy(POLICY_ALLOW_METERED_BACKGROUND)) { in loadWhitelist() 105 mUidPolicies.put(uid, POLICY_ALLOW_METERED_BACKGROUND); in loadWhitelist() 114 public void setIsBlacklisted(int uid, String packageName, boolean blacklisted) { in setIsBlacklisted() argument 116 mPolicyManager.setUidPolicy(uid, policy); in setIsBlacklisted() 117 mUidPolicies.put(uid, policy); in setIsBlacklisted() [all …]
|
/packages/apps/Settings/src/com/android/settings/notification/ |
D | NotificationBackend.java | 66 row.uid = app.uid; in loadAppRow() 74 row.banned = getNotificationsBanned(row.pkg, row.uid); in loadAppRow() 75 row.showBadge = canShowBadge(row.pkg, row.uid); in loadAppRow() 76 row.allowBubbles = canBubble(row.pkg, row.uid); in loadAppRow() 77 row.userId = UserHandle.getUserId(row.uid); in loadAppRow() 78 row.blockedChannelCount = getBlockedChannelCount(row.pkg, row.uid); in loadAppRow() 79 row.channelCount = getChannelCount(row.pkg, row.uid); in loadAppRow() 85 final boolean blocked = getNotificationsBanned(info.packageName, info.uid); in isBlockable() 142 public boolean getNotificationsBanned(String pkg, int uid) { in getNotificationsBanned() argument 144 final boolean enabled = sINM.areNotificationsEnabledForPackage(pkg, uid); in getNotificationsBanned() [all …]
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/ |
D | BatteryUtils.java | 109 public long getProcessTimeMs(@StatusType int type, @Nullable BatteryStats.Uid uid, in getProcessTimeMs() argument 111 if (uid == null) { in getProcessTimeMs() 117 return getScreenUsageTimeMs(uid, which); in getProcessTimeMs() 119 return getProcessForegroundTimeMs(uid, which); in getProcessTimeMs() 121 return getProcessBackgroundTimeMs(uid, which); in getProcessTimeMs() 123 return getProcessForegroundTimeMs(uid, which) in getProcessTimeMs() 124 + getProcessBackgroundTimeMs(uid, which); in getProcessTimeMs() 129 private long getScreenUsageTimeMs(BatteryStats.Uid uid, int which, long rawRealTimeUs) { in getScreenUsageTimeMs() argument 131 Log.v(TAG, "package: " + mPackageManager.getNameForUid(uid.getUid())); in getScreenUsageTimeMs() 135 final long localTime = uid.getProcessStateTime(type, rawRealTimeUs, which); in getScreenUsageTimeMs() [all …]
|
/packages/apps/Nfc/src/com/android/nfc/ |
D | ForegroundUtils.java | 58 void onUidToBackground(int uid); in onUidToBackground() argument 76 public boolean registerUidToBackgroundCallback(Callback callback, int uid) { in registerUidToBackgroundCallback() argument 78 if (!isInForegroundLocked(uid)) { in registerUidToBackgroundCallback() 83 List<Callback> callbacks = mBackgroundCallbacks.get(uid, new ArrayList<Callback>()); in registerUidToBackgroundCallback() 85 mBackgroundCallbacks.put(uid, callbacks); in registerUidToBackgroundCallback() 94 public boolean isInForeground(int uid) { in isInForeground() argument 96 return isInForegroundLocked(uid); in isInForeground() 114 private boolean isInForegroundLocked(int uid) { in isInForegroundLocked() argument 115 if (mForegroundUidPids.get(uid) != null) in isInForegroundLocked() 117 if (DBG) Log.d(TAG, "Checking UID:" + Integer.toString(uid)); in isInForegroundLocked() [all …]
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
D | BatteryUtils.java | 114 public long getProcessTimeMs(@StatusType int type, @Nullable BatteryStats.Uid uid, in getProcessTimeMs() argument 116 if (uid == null) { in getProcessTimeMs() 122 return getScreenUsageTimeMs(uid, which); in getProcessTimeMs() 124 return getProcessForegroundTimeMs(uid, which); in getProcessTimeMs() 126 return getProcessBackgroundTimeMs(uid, which); in getProcessTimeMs() 128 return getProcessForegroundTimeMs(uid, which) in getProcessTimeMs() 129 + getProcessBackgroundTimeMs(uid, which); in getProcessTimeMs() 134 private long getScreenUsageTimeMs(BatteryStats.Uid uid, int which, long rawRealTimeUs) { in getScreenUsageTimeMs() argument 136 Log.v(TAG, "package: " + mPackageManager.getNameForUid(uid.getUid())); in getScreenUsageTimeMs() 140 final long localTime = uid.getProcessStateTime(type, rawRealTimeUs, which); in getScreenUsageTimeMs() [all …]
|
/packages/services/Car/tools/ioanalyze/ |
D | analyzer.py | 11 self.uid = activity['uid'] 33 uid = entry['uid'] 41 self.uids[uid] = snapshot 99 def __init__(self, uid): argument 100 self.uid = uid 102 self.appPackages = wellKnownUids.get(uid, []) 111 assert snapshot.uid == self.uid 123 plt.title("I/O activity for UID %s" % (self.uid)) 172 for uid in snapshot.uids: 173 if uid not in self.uids: self.uids[uid] = UserActivity(uid) [all …]
|
/packages/providers/MediaProvider/src/com/android/providers/media/ |
D | LocalCallingIdentity.java | 44 public final int uid; field in LocalCallingIdentity 47 private LocalCallingIdentity(int pid, int uid, String packageNameUnchecked) { in LocalCallingIdentity() argument 49 this.uid = uid; in LocalCallingIdentity() 62 public static LocalCallingIdentity fromExternal(int uid, String packageName) { in fromExternal() argument 63 return new LocalCallingIdentity(-1, uid, packageName); in fromExternal() 100 .checkPackage(uid, packageNameUnchecked); in getPackageNameInternal() 116 return ArrayUtils.defeatNullable(getContext().getPackageManager().getPackagesForUid(uid)); in getSharedPackageNamesInternal() 175 .checkPermissionReadAudio(false, pid, uid, getPackageName()); in hasPermissionInternal() 178 .checkPermissionReadVideo(false, pid, uid, getPackageName()); in hasPermissionInternal() 181 .checkPermissionReadImages(false, pid, uid, getPackageName()); in hasPermissionInternal() [all …]
|
/packages/modules/DnsResolver/ |
D | DnsProxyListener.cpp | 130 bool hasPermissionToBypassPrivateDns(uid_t uid) { in hasPermissionToBypassPrivateDns() argument 133 if (uid >= 0 && uid < FIRST_APPLICATION_UID) { in hasPermissionToBypassPrivateDns() 148 if (requestingUseLocalNameservers(ctx->flags) && !hasPermissionToBypassPrivateDns(ctx->uid)) { in maybeFixupNetContext() 343 DnsQueryLog::Record record(netContext.dns_netid, netContext.uid, netContext.pid, in maybeLogQuery() 377 total_ip_addr_count, netContext.uid); 551 std::string makeThreadName(unsigned netId, uint32_t uid) { in makeThreadName() argument 553 return android::base::StringPrintf("Dns_%u_%u", netId, multiuser_get_app_id(uid)); in makeThreadName() 678 const uid_t uid = mClient->getUid(); in doDns64Synthesis() local 679 if (queryLimiter.start(uid)) { in doDns64Synthesis() 684 queryLimiter.finish(uid); in doDns64Synthesis() [all …]
|
/packages/services/Car/service/src/com/android/car/trust/ |
D | CarBleTrustAgent.java | 100 int uid = ActivityManager.getCurrentUser(); in onDeviceLocked() local 102 Log.d(TAG, "onDeviceLocked Current user: " + uid); in onDeviceLocked() 107 if (!hasTrustedDevice(uid)) { in onDeviceLocked() 110 + uid + "has no trusted device"); in onDeviceLocked() 207 private boolean hasTrustedDevice(int uid) { in hasTrustedDevice() argument 212 .getEnrolledDeviceInfosForUser(uid); in hasTrustedDevice() 216 private void unlockUserInternally(int uid, byte[] token, long handle) { in unlockUserInternally() argument 218 Log.d(TAG, "About to unlock user: " + uid); in unlockUserInternally() 220 if (um.isUserUnlocked(UserHandle.of(uid))) { in unlockUserInternally() 226 unlockUserWithToken(handle, token, UserHandle.of(uid)); in unlockUserInternally() [all …]
|
D | CarTrustAgentEnrollmentService.java | 251 int uid = mTrustedDeviceService.getSharedPrefs().getInt(String.valueOf(handle), -1); in terminateEnrollmentHandshake() local 252 removeEscrowToken(handle, uid); in terminateEnrollmentHandshake() 267 public boolean isEscrowTokenActive(long handle, int uid) { in isEscrowTokenActive() argument 283 public void removeEscrowToken(long handle, int uid) { in removeEscrowToken() argument 285 mEnrollmentDelegate.removeEscrowToken(handle, uid); in removeEscrowToken() 286 addEnrollmentServiceLog("removeEscrowToken (handle:" + handle + " uid:" + uid + ")"); in removeEscrowToken() 296 public void removeAllTrustedDevices(int uid) { in removeAllTrustedDevices() argument 298 for (TrustedDeviceInfo device : getEnrolledDeviceInfosForUser(uid)) { in removeAllTrustedDevices() 299 removeEscrowToken(device.getHandle(), uid); in removeAllTrustedDevices() local 347 public List<TrustedDeviceInfo> getEnrolledDeviceInfosForUser(int uid) { in getEnrolledDeviceInfosForUser() argument [all …]
|
/packages/services/Car/car-lib/src/android/car/storagemonitoring/ |
D | IoStatsEntry.java | 58 public final int uid; field in IoStatsEntry 78 public IoStatsEntry(int uid, in IoStatsEntry() argument 80 this.uid = uid; in IoStatsEntry() 87 uid = in.readInt(); in IoStatsEntry() 94 uid = record.uid; in IoStatsEntry() 115 dest.writeInt(uid); in writeToParcel() 126 jsonWriter.name("uid").value(uid); in writeToJson() 137 uid = in.getInt("uid"); in IoStatsEntry() 153 if (uid != other.uid) { in delta() 156 return new IoStatsEntry(uid, in delta() [all …]
|
D | UidIoRecord.java | 28 public final int uid; field in UidIoRecord 42 public UidIoRecord(int uid, in UidIoRecord() argument 53 this.uid = uid; in UidIoRecord() 70 if (uid != other.uid) { in delta() 74 return new UidIoRecord(uid, in delta() 89 if (uid != other.uid) { in delta() 93 return new UidIoRecord(uid, in delta()
|
/packages/apps/Car/Settings/src/com/android/car/settings/datausage/ |
D | AppDataUsagePreferenceController.java | 97 int uid = entry.uid; in aggregateDataUsage() local 101 int userId = UserHandle.getUserId(uid); in aggregateDataUsage() 103 if (isUidValid(uid)) { in aggregateDataUsage() 104 collapseKey = uid; in aggregateDataUsage() 109 if (!UserHandle.isApp(uid)) { in aggregateDataUsage() 117 collapseKey = uid; in aggregateDataUsage() 127 collapseKey = uid; in aggregateDataUsage() 152 private boolean isUidValid(int uid) { in isUidValid() argument 153 return !UserHandle.isApp(uid) && (uid == UID_REMOVED || uid == UID_TETHERING); in isUidValid() 167 int uid = restrictedUids[i]; in updateRestrictedState() local [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/applications/specialaccess/ |
D | AppStateAppOpsBridgeTest.java | 98 int uid = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 1); in androidPackagesIgnored() local 99 PackageInfo packageInfo = createPackageInfo(packageName, uid); in androidPackagesIgnored() 111 int uid = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 1); in selfPackageIgnored() local 112 PackageInfo packageInfo = createPackageInfo(packageName, uid); in selfPackageIgnored() 124 int uid = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 1); in packagesNotRequestingPermissionIgnored() local 125 PackageInfo packageInfo = createPackageInfo(packageName, uid); in packagesNotRequestingPermissionIgnored() 140 int uid = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 1); in unavailablePackageIgnored() local 141 PackageInfo packageInfo = createPackageInfo(packageName, uid); in unavailablePackageIgnored() 155 int uid = UserHandle.getUid(UserHandle.myUserId(), /* appId= */ 1); in loadsAppOpsExtraInfo_modeAllowed_isPermissible() local 156 PackageInfo packageInfo = createPackageInfo(packageName, uid); in loadsAppOpsExtraInfo_modeAllowed_isPermissible() [all …]
|
/packages/services/Car/service/src/com/android/car/ |
D | SystemActivityMonitoringService.java | 193 public boolean isInForeground(int pid, int uid) { in isInForeground() argument 195 Set<Integer> pids = mForegroundUidPids.get(uid); in isInForeground() 347 private void handleForegroundActivitiesChanged(int pid, int uid, boolean foregroundActivities) { in handleForegroundActivitiesChanged() argument 350 Set<Integer> pids = mForegroundUidPids.get(uid); in handleForegroundActivitiesChanged() 353 mForegroundUidPids.put(uid, pids); in handleForegroundActivitiesChanged() 357 doHandlePidGoneLocked(pid, uid); in handleForegroundActivitiesChanged() 362 private void handleProcessDied(int pid, int uid) { in handleProcessDied() argument 364 doHandlePidGoneLocked(pid, uid); in handleProcessDied() 368 private void doHandlePidGoneLocked(int pid, int uid) { in doHandlePidGoneLocked() argument 369 Set<Integer> pids = mForegroundUidPids.get(uid); in doHandlePidGoneLocked() [all …]
|
/packages/modules/NetworkStack/common/netlinkclient/src/android/net/netlink/ |
D | InetDiagMessage.java | 139 int uid; in lookupUid() local 148 uid = lookupUidByFamily(protocol, remote, local, family, NLM_F_REQUEST, fd); in lookupUid() 150 uid = lookupUidByFamily(protocol, local, remote, family, NLM_F_REQUEST, fd); in lookupUid() 152 if (uid != INVALID_UID) { in lookupUid() 153 return uid; in lookupUid() 168 uid = lookupUidByFamily(protocol, local, wildcard, AF_INET6, in lookupUid() 170 if (uid != INVALID_UID) { in lookupUid() 171 return uid; in lookupUid() 174 uid = lookupUidByFamily(protocol, local, wildcard, AF_INET, in lookupUid() 176 if (uid != INVALID_UID) { in lookupUid() [all …]
|
/packages/services/Car/procfs-inspector/client/src/com/android/car/procfsinspector/ |
D | ProcessInfo.java | 35 public final int uid; field in ProcessInfo 37 public ProcessInfo(int pid, int uid) { in ProcessInfo() argument 39 this.uid = uid; in ProcessInfo() 44 this.uid = in.readInt(); in ProcessInfo() 55 dest.writeInt(uid); in writeToParcel() 62 return processInfo.pid == pid && processInfo.uid == uid; in equals() 70 return Objects.hash(pid, uid); in hashCode() 75 return String.format("pid = %d, uid = %d", pid, uid); in toString()
|
/packages/apps/Nfc/src/com/android/nfc/cardemulation/ |
D | RegisteredNfcFServicesCache.java | 83 public final int uid; field in RegisteredNfcFServicesCache.DynamicSystemCode 86 DynamicSystemCode(int uid, String systemCode) { in DynamicSystemCode() argument 87 this.uid = uid; in DynamicSystemCode() 93 public final int uid; field in RegisteredNfcFServicesCache.DynamicNfcid2 96 DynamicNfcid2(int uid, String nfcid2) { in DynamicNfcid2() argument 97 this.uid = uid; in DynamicNfcid2() 130 final int uid = intent.getIntExtra(Intent.EXTRA_UID, -1); in RegisteredNfcFServicesCache() 133 if (uid != -1) { in RegisteredNfcFServicesCache() 139 if (currentUser == UserHandle.getUserId(uid)) { in RegisteredNfcFServicesCache() 140 invalidateCache(UserHandle.getUserId(uid)); in RegisteredNfcFServicesCache() [all …]
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/batterytip/ |
D | BatteryDatabaseManager.java | 84 public synchronized boolean insertAnomaly(int uid, String packageName, int type, in insertAnomaly() argument 89 values.put(UID, uid); in insertAnomaly() 114 final int uid = cursor.getInt(cursor.getColumnIndex(UID)); in queryAllAnomalies() local 115 if (!mAppInfoBuilders.containsKey(uid)) { in queryAllAnomalies() 117 .setUid(uid) in queryAllAnomalies() 120 mAppInfoBuilders.put(uid, builder); in queryAllAnomalies() 122 mAppInfoBuilders.get(uid).addAnomalyType( in queryAllAnomalies() 127 for (Integer uid : mAppInfoBuilders.keySet()) { in queryAllAnomalies() 128 appInfos.add(mAppInfoBuilders.get(uid).build()); in queryAllAnomalies() 182 final int uid = cursor.getInt(uidIndex); in queryActionTime() local [all …]
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/ |
D | BatteryDatabaseManager.java | 84 public synchronized boolean insertAnomaly(int uid, String packageName, int type, in insertAnomaly() argument 89 values.put(UID, uid); in insertAnomaly() 114 final int uid = cursor.getInt(cursor.getColumnIndex(UID)); in queryAllAnomalies() local 115 if (!mAppInfoBuilders.containsKey(uid)) { in queryAllAnomalies() 117 .setUid(uid) in queryAllAnomalies() 120 mAppInfoBuilders.put(uid, builder); in queryAllAnomalies() 122 mAppInfoBuilders.get(uid).addAnomalyType( in queryAllAnomalies() 127 for (Integer uid : mAppInfoBuilders.keySet()) { in queryAllAnomalies() 128 appInfos.add(mAppInfoBuilders.get(uid).build()); in queryAllAnomalies() 182 final int uid = cursor.getInt(uidIndex); in queryActionTime() local [all …]
|
/packages/services/Car/service/src/com/android/car/cluster/ |
D | InstrumentClusterService.java | 198 public void onFocusAcquired(int appType, int uid, int pid) { in onFocusAcquired() argument 199 changeNavContextOwner(appType, uid, pid, true); in onFocusAcquired() 203 public void onFocusAbandoned(int appType, int uid, int pid) { in onFocusAbandoned() argument 204 changeNavContextOwner(appType, uid, pid, false); in onFocusAbandoned() 207 private void changeNavContextOwner(int appType, int uid, int pid, boolean acquire) { in changeNavContextOwner() argument 213 ContextOwner requester = new ContextOwner(uid, pid); in changeNavContextOwner() 238 service.setNavigationContextOwner(owner.uid, owner.pid); in notifyNavContextOwnerChanged() 308 final int uid; field in InstrumentClusterService.ContextOwner 311 ContextOwner(int uid, int pid) { in ContextOwner() argument 312 this.uid = uid; in ContextOwner() [all …]
|
/packages/services/Telephony/testapps/EmbmsServiceTestApp/src/com/android/phone/testapps/embmsmw/ |
D | FrontendAppIdentifier.java | 20 private final int uid; field in FrontendAppIdentifier 23 public FrontendAppIdentifier(int uid, int subscriptionId) { in FrontendAppIdentifier() argument 24 this.uid = uid; in FrontendAppIdentifier() 29 return uid; in getUid() 47 if (uid != that.uid) { in equals() 55 int result = uid; in hashCode()
|
/packages/services/Car/service/src/com/android/car/audio/ |
D | CarAudioService.java | 782 public int getZoneIdForUid(int uid) { in getZoneIdForUid() argument 785 if (!mUidToZoneMap.containsKey(uid)) { in getZoneIdForUid() 787 + uid + " does not have a zone. Defaulting to PRIMARY_AUDIO_ZONE: " in getZoneIdForUid() 793 setZoneIdForUidNoCheckLocked(CarAudioManager.PRIMARY_AUDIO_ZONE, uid); in getZoneIdForUid() 796 return mUidToZoneMap.get(uid); in getZoneIdForUid() 807 public boolean setZoneIdForUid(int zoneId, int uid) { in setZoneIdForUid() argument 811 + uid + " mapped to : " in setZoneIdForUid() 816 Integer currentZoneId = mUidToZoneMap.get(uid); in setZoneIdForUid() 820 currentFocusHoldersForUid = mFocusHandler.getAudioFocusHoldersForUid(uid, in setZoneIdForUid() 822 currentFocusLosersForUid = mFocusHandler.getAudioFocusLosersForUid(uid, in setZoneIdForUid() [all …]
|