Home
last modified time | relevance | path

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

12345678910>>...17

/packages/apps/Settings/src/com/android/settings/datausage/
DDataSaverBackend.java83 public void setIsWhitelisted(int uid, String packageName, boolean whitelisted) { in setIsWhitelisted() argument
85 mPolicyManager.setUidPolicy(uid, policy); in setIsWhitelisted()
86 mUidPolicies.put(uid, policy); in setIsWhitelisted()
93 public boolean isWhitelisted(int uid) { in isWhitelisted() argument
95 return mUidPolicies.get(uid, POLICY_NONE) == POLICY_ALLOW_METERED_BACKGROUND; in isWhitelisted()
103 for (int uid : mPolicyManager.getUidsWithPolicy(POLICY_ALLOW_METERED_BACKGROUND)) { in loadWhitelist()
104 mUidPolicies.put(uid, POLICY_ALLOW_METERED_BACKGROUND); in loadWhitelist()
113 public void setIsBlacklisted(int uid, String packageName, boolean blacklisted) { in setIsBlacklisted() argument
115 mPolicyManager.setUidPolicy(uid, policy); in setIsBlacklisted()
116 mUidPolicies.put(uid, policy); in setIsBlacklisted()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/datausage/
DDataSaverBackend.java83 public void setIsWhitelisted(int uid, String packageName, boolean whitelisted) { in setIsWhitelisted() argument
85 mPolicyManager.setUidPolicy(uid, policy); in setIsWhitelisted()
86 mUidPolicies.put(uid, policy); in setIsWhitelisted()
93 public boolean isWhitelisted(int uid) { in isWhitelisted() argument
95 return mUidPolicies.get(uid, POLICY_NONE) == POLICY_ALLOW_METERED_BACKGROUND; in isWhitelisted()
103 for (int uid : mPolicyManager.getUidsWithPolicy(POLICY_ALLOW_METERED_BACKGROUND)) { in loadWhitelist()
104 mUidPolicies.put(uid, POLICY_ALLOW_METERED_BACKGROUND); in loadWhitelist()
113 public void setIsBlacklisted(int uid, String packageName, boolean blacklisted) { in setIsBlacklisted() argument
115 mPolicyManager.setUidPolicy(uid, policy); in setIsBlacklisted()
116 mUidPolicies.put(uid, policy); in setIsBlacklisted()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/notification/
DNotificationBackend.java64 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/notification/
DNotificationBackend.java66 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/
DBatteryUtils.java109 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/Settings/src/com/android/settings/fuelgauge/
DBatteryUtils.java114 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/apps/Nfc/src/com/android/nfc/
DForegroundUtils.java58 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 return mForegroundUidPids.get(uid) != null; in isInForegroundLocked()
118 private void handleUidToBackground(int uid) { in handleUidToBackground() argument
[all …]
/packages/services/Car/tools/ioanalyze/
Danalyzer.py11 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/
DLocalCallingIdentity.java44 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/services/Car/car-lib/src/android/car/storagemonitoring/
DIoStatsEntry.java58 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 …]
DUidIoRecord.java28 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/services/Car/service/src/com/android/car/trust/
DCarBleTrustAgent.java100 int uid = ActivityManager.getCurrentUser(); in onDeviceLocked() local
102 Log.d(TAG, "onDeviceLocked Current user: " + uid); in onDeviceLocked()
112 if (!hasTrustedDevice(uid)) { in onDeviceLocked()
115 + uid + "has no trusted device"); in onDeviceLocked()
201 private boolean hasTrustedDevice(int uid) { in hasTrustedDevice() argument
203 .getEnrolledDeviceInfosForUser(uid); in hasTrustedDevice()
207 private void unlockUserInternally(int uid, byte[] token, long handle) { in unlockUserInternally() argument
209 Log.d(TAG, "About to unlock user: " + uid); in unlockUserInternally()
211 if (um.isUserUnlocked(UserHandle.of(uid))) { in unlockUserInternally()
217 unlockUserWithToken(handle, token, UserHandle.of(uid)); in unlockUserInternally()
[all …]
DCarTrustAgentEnrollmentService.java240 int uid = mTrustedDeviceService.getSharedPrefs().getInt(String.valueOf(handle), -1); in terminateEnrollmentHandshake() local
241 removeEscrowToken(handle, uid); in terminateEnrollmentHandshake()
255 public boolean isEscrowTokenActive(long handle, int uid) { in isEscrowTokenActive() argument
269 public void removeEscrowToken(long handle, int uid) { in removeEscrowToken() argument
270 mEnrollmentDelegate.removeEscrowToken(handle, uid); in removeEscrowToken()
271 addEnrollmentServiceLog("removeEscrowToken (handle:" + handle + " uid:" + uid + ")"); in removeEscrowToken()
280 public void removeAllTrustedDevices(int uid) { in removeAllTrustedDevices() argument
281 for (TrustedDeviceInfo device : getEnrolledDeviceInfosForUser(uid)) { in removeAllTrustedDevices()
282 removeEscrowToken(device.getHandle(), uid); in removeAllTrustedDevices() local
325 public List<TrustedDeviceInfo> getEnrolledDeviceInfosForUser(int uid) { in getEnrolledDeviceInfosForUser() argument
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/datausage/
DAppDataUsagePreferenceController.java97 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/
DAppStateAppOpsBridgeTest.java98 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/
DSystemActivityMonitoringService.java193 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/apps/Nfc/src/com/android/nfc/cardemulation/
DRegisteredNfcFServicesCache.java83 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 …]
DRegisteredServicesCache.java89 public final int uid; field in RegisteredServicesCache.DynamicSettings
93 DynamicSettings(int uid) { in DynamicSettings() argument
94 this.uid = uid; in DynamicSettings()
124 final int uid = intent.getIntExtra(Intent.EXTRA_UID, -1); in RegisteredServicesCache()
127 if (uid != -1) { in RegisteredServicesCache()
133 if (currentUser == UserHandle.getUserId(uid)) { in RegisteredServicesCache()
134 invalidateCache(UserHandle.getUserId(uid)); in RegisteredServicesCache()
305 if (serviceInfo == null || (serviceInfo.getUid() != dynamicSettings.uid)) { in invalidateCache()
431 out.attribute(null, "uid", Integer.toString(service.getValue().uid)); in writeDynamicSettingsLocked()
454 public boolean setOffHostSecureElement(int userId, int uid, ComponentName componentName, in setOffHostSecureElement() argument
[all …]
/packages/services/Car/procfs-inspector/client/src/com/android/car/procfsinspector/
DProcessInfo.java35 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/Settings/src/com/android/settings/fuelgauge/batterytip/
DBatteryDatabaseManager.java84 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/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/batterytip/
DBatteryDatabaseManager.java84 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/
DInstrumentClusterService.java167 public void onFocusAcquired(int appType, int uid, int pid) { in onFocusAcquired() argument
168 changeNavContextOwner(appType, uid, pid, true); in onFocusAcquired()
172 public void onFocusAbandoned(int appType, int uid, int pid) { in onFocusAbandoned() argument
173 changeNavContextOwner(appType, uid, pid, false); in onFocusAbandoned()
176 private void changeNavContextOwner(int appType, int uid, int pid, boolean acquire) { in changeNavContextOwner() argument
182 ContextOwner requester = new ContextOwner(uid, pid); in changeNavContextOwner()
207 service.setNavigationContextOwner(owner.uid, owner.pid); in notifyNavContextOwnerChanged()
272 final int uid; field in InstrumentClusterService.ContextOwner
275 ContextOwner(int uid, int pid) { in ContextOwner() argument
276 this.uid = uid; in ContextOwner()
[all …]
/packages/services/Telephony/testapps/EmbmsServiceTestApp/src/com/android/phone/testapps/embmsmw/
DFrontendAppIdentifier.java20 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/
DCarAudioService.java782 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 …]
/packages/apps/KeyChain/src/com/android/keychain/internal/
DGrantsDatabase.java157 boolean hasGrantInternal(final SQLiteDatabase db, final int uid, final String alias) { in hasGrantInternal() argument
162 new String[] {String.valueOf(uid), alias}); in hasGrantInternal()
166 public boolean hasGrant(final int uid, final String alias) { in hasGrant() argument
168 return hasGrantInternal(db, uid, alias); in hasGrant()
171 public void setGrant(final int uid, final String alias, final boolean value) { in setGrant() argument
174 if (!hasGrantInternal(db, uid, alias)) { in setGrant()
177 values.put(GRANTS_GRANTEE_UID, uid); in setGrant()
184 new String[] {String.valueOf(uid), alias}); in setGrant()
207 final int uid = cursor.getInt(0); in purgeOldGrants() local
208 final boolean packageExists = pm.getPackagesForUid(uid) != null; in purgeOldGrants()
[all …]

12345678910>>...17