/frameworks/native/libs/binder/ |
D | IBatteryStats.cpp | 37 virtual void noteStartSensor(int uid, int sensor) { in noteStartSensor() argument 40 data.writeInt32(uid); in noteStartSensor() 45 virtual void noteStopSensor(int uid, int sensor) { in noteStopSensor() argument 48 data.writeInt32(uid); in noteStopSensor() 53 virtual void noteStartVideo(int uid) { in noteStartVideo() argument 56 data.writeInt32(uid); in noteStartVideo() 60 virtual void noteStopVideo(int uid) { in noteStopVideo() argument 63 data.writeInt32(uid); in noteStopVideo() 67 virtual void noteStartAudio(int uid) { in noteStartAudio() argument 70 data.writeInt32(uid); in noteStartAudio() [all …]
|
D | PermissionCache.cpp | 38 const String16& permission, uid_t uid) const { in check() 42 e.uid = uid; in check() 52 uid_t uid, bool granted) { in cache() argument 64 e.uid = uid; in cache() 85 uid_t uid = ipcState->getCallingUid(); in checkCallingPermission() local 87 if (outUid) *outUid = uid; in checkCallingPermission() 88 return PermissionCache::checkPermission(permission, pid, uid); in checkCallingPermission() 92 const String16& permission, pid_t pid, uid_t uid) { in checkPermission() argument 93 if ((uid == 0) || (pid == getpid())) { in checkPermission() 100 if (pc.check(&granted, permission, uid) != NO_ERROR) { in checkPermission() [all …]
|
/frameworks/native/services/sensorservice/ |
D | BatteryService.h | 33 void enableSensorImpl(uid_t uid, int handle); 34 void disableSensorImpl(uid_t uid, int handle); 35 void cleanupImpl(uid_t uid); 38 uid_t uid; member 41 Info() : uid(0), handle(0), count(0) { } in Info() 42 Info(uid_t uid, int handle) : uid(uid), handle(handle), count(0) { } in Info() 44 return (uid == rhs.uid) ? (handle < rhs.handle) : (uid < rhs.uid); 50 bool addSensor(uid_t uid, int handle); 51 bool removeSensor(uid_t uid, int handle); 54 static void enableSensor(uid_t uid, int handle) { in enableSensor() argument [all …]
|
D | BatteryService.cpp | 41 bool BatteryService::addSensor(uid_t uid, int handle) { in addSensor() argument 43 Info key(uid, handle); in addSensor() 53 bool BatteryService::removeSensor(uid_t uid, int handle) { in removeSensor() argument 55 ssize_t index = mActivations.indexOf(Info(uid, handle)); in removeSensor() 63 void BatteryService::enableSensorImpl(uid_t uid, int handle) { in enableSensorImpl() argument 65 if (addSensor(uid, handle)) { in enableSensorImpl() 67 mBatteryStatService->noteStartSensor(uid, handle); in enableSensorImpl() 72 void BatteryService::disableSensorImpl(uid_t uid, int handle) { in disableSensorImpl() argument 74 if (removeSensor(uid, handle)) { in disableSensorImpl() 76 mBatteryStatService->noteStopSensor(uid, handle); in disableSensorImpl() [all …]
|
/frameworks/base/core/java/com/android/internal/app/ |
D | IBatteryStats.aidl | 33 void noteStartSensor(int uid, int sensor); in noteStartSensor() argument 34 void noteStopSensor(int uid, int sensor); in noteStopSensor() argument 35 void noteStartVideo(int uid); in noteStartVideo() argument 36 void noteStopVideo(int uid); in noteStopVideo() argument 37 void noteStartAudio(int uid); in noteStartAudio() argument 38 void noteStopAudio(int uid); in noteStopAudio() argument 41 void noteFlashlightOn(int uid); in noteFlashlightOn() argument 42 void noteFlashlightOff(int uid); in noteFlashlightOff() argument 43 void noteStartCamera(int uid); in noteStartCamera() argument 44 void noteStopCamera(int uid); in noteStopCamera() argument [all …]
|
D | IAppOpsService.aidl | 26 int checkOperation(int code, int uid, String packageName); in checkOperation() argument 27 int noteOperation(int code, int uid, String packageName); in noteOperation() argument 28 int startOperation(IBinder token, int code, int uid, String packageName); in startOperation() argument 29 void finishOperation(IBinder token, int code, int uid, String packageName); in finishOperation() argument 38 int checkPackage(int uid, String packageName); in checkPackage() argument 40 List<AppOpsManager.PackageOps> getOpsForPackage(int uid, String packageName, in int[] ops); in getOpsForPackage() argument 41 void setUidMode(int code, int uid, int mode); in setUidMode() argument 42 void setMode(int code, int uid, String packageName, int mode); in setMode() argument 44 int checkAudioOperation(int code, int usage, int uid, String packageName); in checkAudioOperation() argument 45 void setAudioRestriction(int code, int usage, int uid, int mode, in String[] exceptionPackages); in setAudioRestriction() argument
|
/frameworks/base/services/core/java/com/android/server/net/ |
D | NetworkPolicyManagerService.java | 434 for (int uid : whitelist) { in updatePowerSaveWhitelistLocked() 435 mPowerSaveWhitelistExceptIdleAppIds.put(uid, true); in updatePowerSaveWhitelistLocked() 441 for (int uid : whitelist) { in updatePowerSaveWhitelistLocked() 442 mPowerSaveWhitelistAppIds.put(uid, true); in updatePowerSaveWhitelistLocked() 489 final int uid = UserHandle.getUid(userId, app.uid); in addDefaultRestrictBackgroundWhitelistUidsLocked() local 490 mDefaultRestrictBackgroundWhitelistUids.append(uid, true); in addDefaultRestrictBackgroundWhitelistUidsLocked() 492 Slog.d(TAG, "Adding uid " + uid + " (user " + userId + ") to default restricted " in addDefaultRestrictBackgroundWhitelistUidsLocked() 494 + mRestrictBackgroundWhitelistRevokedUids.get(uid)); in addDefaultRestrictBackgroundWhitelistUidsLocked() 495 if (!mRestrictBackgroundWhitelistRevokedUids.get(uid)) { in addDefaultRestrictBackgroundWhitelistUidsLocked() 496 Slog.i(TAG, "adding default package " + pkg + " (uid " + uid + " for user " in addDefaultRestrictBackgroundWhitelistUidsLocked() [all …]
|
D | NetworkStatsCollection.java | 146 if (NetworkStatsAccess.isAccessibleToUser(key.uid, callerUid, accessLevel)) { in getRelevantUids() 147 int j = uids.binarySearch(key.uid); in getRelevantUids() 151 uids.add(j, key.uid); in getRelevantUids() 163 NetworkTemplate template, int uid, int set, int tag, int fields, in getHistory() argument 165 return getHistory(template, uid, set, tag, fields, Long.MIN_VALUE, Long.MAX_VALUE, in getHistory() 174 NetworkTemplate template, int uid, int set, int tag, int fields, long start, long end, in getHistory() argument 176 return getHistory(template, uid, set, tag, fields, start, end, accessLevel, in getHistory() 185 NetworkTemplate template, int uid, int set, int tag, int fields, long start, long end, in getHistory() argument 187 if (!NetworkStatsAccess.isAccessibleToUser(uid, callerUid, accessLevel)) { in getHistory() 188 throw new SecurityException("Network stats history of uid " + uid in getHistory() [all …]
|
/frameworks/base/services/core/java/com/android/server/am/ |
D | HealthStatsBatteryStatsWriter.java | 49 public void writeUid(HealthStatsWriter uidWriter, BatteryStats bs, BatteryStats.Uid uid) { in writeUid() argument 85 uid.getWakelockStats().entrySet()) { in writeUid() 108 uid.getSyncStats().entrySet()) { in writeUid() 114 uid.getJobStats().entrySet()) { in writeUid() 119 sensors = uid.getSensorStats(); in writeUid() 135 pids = uid.getPidStats(); in writeUid() 145 uid.getProcessStats().entrySet()) { in writeUid() 153 uid.getPackageStats().entrySet()) { in writeUid() 159 controller = uid.getWifiControllerActivity(); in writeUid() 178 controller = uid.getBluetoothControllerActivity(); in writeUid() [all …]
|
D | BatteryStatsService.java | 165 public void scheduleCpuSyncDueToRemovedUid(int uid) { in scheduleCpuSyncDueToRemovedUid() argument 168 mUidsToRemove.add(uid); in scheduleCpuSyncDueToRemovedUid() 289 void removeUid(int uid) { in removeUid() argument 291 mStats.removeUidStatsLocked(uid); in removeUid() 307 void noteProcessStart(String name, int uid) { in noteProcessStart() argument 309 mStats.noteProcessStartLocked(name, uid); in noteProcessStart() 313 void noteProcessCrash(String name, int uid) { in noteProcessCrash() argument 315 mStats.noteProcessCrashLocked(name, uid); in noteProcessCrash() 319 void noteProcessAnr(String name, int uid) { in noteProcessAnr() argument 321 mStats.noteProcessAnrLocked(name, uid); in noteProcessAnr() [all …]
|
/frameworks/base/core/java/android/net/ |
D | TrafficStats.java | 208 public static void setThreadStatsUid(int uid) { in setThreadStatsUid() argument 209 NetworkManagementSocketTagger.setThreadSocketStatsUid(uid); in setThreadStatsUid() 322 final int uid = android.os.Process.myUid(); in incrementOperationCount() local 324 getStatsService().incrementOperationCount(uid, tag, operationCount); in incrementOperationCount() 525 public static long getUidTxBytes(int uid) { in getUidTxBytes() argument 529 if (callingUid == android.os.Process.SYSTEM_UID || callingUid == uid) { in getUidTxBytes() 530 return nativeGetUidStat(uid, TYPE_TX_BYTES); in getUidTxBytes() 554 public static long getUidRxBytes(int uid) { in getUidRxBytes() argument 558 if (callingUid == android.os.Process.SYSTEM_UID || callingUid == uid) { in getUidRxBytes() 559 return nativeGetUidStat(uid, TYPE_RX_BYTES); in getUidRxBytes() [all …]
|
/frameworks/base/core/java/android/os/ |
D | UserHandle.java | 113 public static boolean isIsolated(int uid) { in isIsolated() argument 114 if (uid > 0) { in isIsolated() 115 final int appId = getAppId(uid); in isIsolated() 123 public static boolean isApp(int uid) { in isApp() argument 124 if (uid > 0) { in isApp() 125 final int appId = getAppId(uid); in isApp() 137 public static UserHandle getUserHandleForUid(int uid) { in getUserHandleForUid() argument 138 return of(getUserId(uid)); in getUserHandleForUid() 145 public static @UserIdInt int getUserId(int uid) { in getUserId() argument 147 return uid / PER_USER_RANGE; in getUserId() [all …]
|
/frameworks/base/core/java/android/app/ |
D | AppImportanceMonitor.java | 37 final int uid; field in AppImportanceMonitor.AppEntry 42 uid = _uid; in AppEntry() 48 public void onForegroundActivitiesChanged(int pid, int uid, boolean foregroundActivities) { 52 public void onProcessStateChanged(int pid, int uid, int procState) { 54 updateImportanceLocked(pid, uid, 61 public void onProcessDied(int pid, int uid) { 63 updateImportanceLocked(pid, uid, 96 updateImportanceLocked(app.uid, app.pid, app.importance, false); in AppImportanceMonitor() 101 public int getImportance(int uid) { in getImportance() argument 102 AppEntry ent = mApps.get(uid); in getImportance() [all …]
|
D | AppOpsManager.java | 1099 public PackageOps(String packageName, int uid, List<OpEntry> entries) { in PackageOps() argument 1101 mUid = uid; in PackageOps() 1290 public List<AppOpsManager.PackageOps> getOpsForPackage(int uid, String packageName, int[] ops) { in getOpsForPackage() argument 1292 return mService.getOpsForPackage(uid, packageName, ops); in getOpsForPackage() 1308 public void setUidMode(int code, int uid, int mode) { in setUidMode() argument 1310 mService.setUidMode(code, uid, mode); in setUidMode() 1327 public void setUidMode(String appOp, int uid, int mode) { in setUidMode() argument 1329 mService.setUidMode(AppOpsManager.strOpToOp(appOp), uid, mode); in setUidMode() local 1357 public void setMode(int code, int uid, String packageName, int mode) { in setMode() argument 1359 mService.setMode(code, uid, packageName, mode); in setMode() [all …]
|
/frameworks/base/core/java/com/android/server/ |
D | NetworkManagementSocketTagger.java | 61 public static void setThreadSocketStatsUid(int uid) { in setThreadSocketStatsUid() argument 62 threadSocketTags.get().statsUid = uid; in setThreadSocketStatsUid() 76 private void tagSocketFd(FileDescriptor fd, int tag, int uid) { in tagSocketFd() argument 77 if (tag == -1 && uid == -1) return; in tagSocketFd() 80 final int errno = native_tagSocketFd(fd, tag, uid); in tagSocketFd() 84 + uid + ") failed with errno" + errno); in tagSocketFd() 114 public static void setKernelCounterSet(int uid, int counterSet) { in setKernelCounterSet() argument 116 final int errno = native_setCounterSet(counterSet, uid); in setKernelCounterSet() 118 Log.w(TAG, "setKernelCountSet(" + uid + ", " + counterSet + ") failed with errno " in setKernelCounterSet() 124 public static void resetKernelUidStats(int uid) { in resetKernelUidStats() argument [all …]
|
/frameworks/native/include/binder/ |
D | IBatteryStats.h | 31 virtual void noteStartSensor(int uid, int sensor) = 0; 32 virtual void noteStopSensor(int uid, int sensor) = 0; 33 virtual void noteStartVideo(int uid) = 0; 34 virtual void noteStopVideo(int uid) = 0; 35 virtual void noteStartAudio(int uid) = 0; 36 virtual void noteStopAudio(int uid) = 0; 39 virtual void noteFlashlightOn(int uid) = 0; 40 virtual void noteFlashlightOff(int uid) = 0; 41 virtual void noteStartCamera(int uid) = 0; 42 virtual void noteStopCamera(int uid) = 0;
|
D | PermissionCache.h | 44 uid_t uid; member 47 return (uid == e.uid) ? (name < e.name) : (uid < e.uid); 61 const String16& permission, uid_t uid) const; 63 void cache(const String16& permission, uid_t uid, bool granted); 74 pid_t pid, uid_t uid);
|
/frameworks/base/core/java/android/security/ |
D | IKeystoreService.aidl | 35 byte[] get(String name, int uid); in get() argument 36 int insert(String name, in byte[] item, int uid, int flags); in insert() argument 37 int del(String name, int uid); in del() argument 38 int exist(String name, int uid); in exist() argument 39 String[] list(String namePrefix, int uid); in list() argument 45 int generate(String name, int uid, int keyType, int keySize, int flags, in generate() argument 47 int import_key(String name, in byte[] data, int uid, int flags); in import_key() argument 53 long getmtime(String name, int uid); in getmtime() argument 56 int clear_uid(long uid); in clear_uid() argument 60 int generateKey(String alias, in KeymasterArguments arguments, in byte[] entropy, int uid, in generateKey() argument [all …]
|
/frameworks/native/cmds/servicemanager/ |
D | service_manager.c | 28 uid_t uid; member 65 static bool check_mac_perms(pid_t spid, uid_t uid, const char *tctx, const char *perm, const char *… in check_mac_perms() argument 78 ad.uid = uid; in check_mac_perms() 88 static bool check_mac_perms_from_getcon(pid_t spid, uid_t uid, const char *perm) in check_mac_perms_from_getcon() argument 94 return check_mac_perms(spid, uid, service_manager_context, perm, NULL); in check_mac_perms_from_getcon() 97 static bool check_mac_perms_from_lookup(pid_t spid, uid_t uid, const char *perm, const char *name) in check_mac_perms_from_lookup() argument 116 allowed = check_mac_perms(spid, uid, tctx, perm, name); in check_mac_perms_from_lookup() 121 static int svc_can_register(const uint16_t *name, size_t name_len, pid_t spid, uid_t uid) in svc_can_register() argument 124 return check_mac_perms_from_lookup(spid, uid, perm, str8(name, name_len)) ? 1 : 0; in svc_can_register() 127 static int svc_can_list(pid_t spid, uid_t uid) in svc_can_list() argument [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | MockKeyStore.java | 91 private KeyBlob access(int uid, String key, boolean createIfNotExist) { in access() argument 92 if (mStore.get(uid) == null) { in access() 93 mStore.put(uid, new HashMap<String, KeyBlob>()); in access() 95 HashMap<String, KeyBlob> map = mStore.get(uid); in access() 109 public KeyBlob getKeyBlob(int uid, String key) { in getKeyBlob() argument 110 return access(uid, key, false); in getKeyBlob() 113 private boolean put(String key, byte[] value, int uid, int flags) { in put() argument 114 access(uid, key, true).update(value, flags); in put() 118 private boolean importKey(String keyName, byte[] key, int uid, int flags) { in importKey() argument 119 return put(keyName, key, uid, flags); in importKey() [all …]
|
/frameworks/base/keystore/java/android/security/ |
D | KeyStore.java | 158 public byte[] get(String key, int uid) { in get() argument 160 return mBinder.get(key, uid); in get() 171 public boolean put(String key, byte[] value, int uid, int flags) { in put() argument 172 return insert(key, value, uid, flags) == NO_ERROR; in put() 175 public int insert(String key, byte[] value, int uid, int flags) { in insert() argument 177 return mBinder.insert(key, value, uid, flags); in insert() 184 public boolean delete(String key, int uid) { in delete() argument 186 int ret = mBinder.del(key, uid); in delete() 198 public boolean contains(String key, int uid) { in contains() argument 200 return mBinder.exist(key, uid) == NO_ERROR; in contains() [all …]
|
/frameworks/base/services/core/java/com/android/server/ |
D | AppOpsService.java | 117 public final int uid; field in AppOpsService.UidState 121 public UidState(int uid) { in UidState() argument 122 this.uid = uid; in UidState() 149 public final int uid; field in AppOpsService.Op 161 uid = _uid; in Op() 256 String[] packageNames = getPackagesForUid(uidState.uid); in systemReady() 276 UserHandle.getUserId(ops.uidState.uid)); in systemReady() 279 if (curUid != ops.uidState.uid) { in systemReady() 301 public int getMountMode(int uid, String packageName) { in systemReady() 302 if (Process.isIsolated(uid)) { in systemReady() [all …]
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/nan/ |
D | WifiNanStateManager.java | 119 public void connect(int uid, IWifiNanEventListener listener, int events) { in connect() argument 121 msg.arg1 = uid; in connect() 127 public void disconnect(int uid) { in disconnect() argument 129 msg.arg1 = uid; in disconnect() 133 public void requestConfig(int uid, ConfigRequest configRequest) { in requestConfig() argument 135 msg.arg1 = uid; in requestConfig() 140 public void stopSession(int uid, int sessionId) { in stopSession() argument 142 msg.arg1 = uid; in stopSession() 147 public void destroySession(int uid, int sessionId) { in destroySession() argument 149 msg.arg1 = uid; in destroySession() [all …]
|
/frameworks/base/services/core/java/com/android/server/notification/ |
D | RankingHelper.java | 144 int uid = safeInt(parser, ATT_UID, Record.UNKNOWN_UID); in readXml() local 151 uid = pm.getPackageUidAsUser(name, UserHandle.USER_SYSTEM); in readXml() 157 if (uid == Record.UNKNOWN_UID) { in readXml() 164 r = getOrCreateRecord(name, uid); in readXml() 176 private static String recordKey(String pkg, int uid) { in recordKey() argument 177 return pkg + "|" + uid; in recordKey() 180 private Record getOrCreateRecord(String pkg, int uid) { in getOrCreateRecord() argument 181 final String key = recordKey(pkg, uid); in getOrCreateRecord() 186 r.uid = uid; in getOrCreateRecord() 200 if (forBackup && UserHandle.getUserId(r.uid) != UserHandle.USER_SYSTEM) { in writeXml() [all …]
|
/frameworks/av/services/audioflinger/ |
D | ServiceUtilities.cpp | 41 bool isTrustedCallingUid(uid_t uid) { in isTrustedCallingUid() argument 42 switch (uid) { in isTrustedCallingUid() 51 bool recordingAllowed(const String16& opPackageName, pid_t pid, uid_t uid) { in recordingAllowed() argument 60 const bool ok = checkPermission(sRecordAudio, pid, uid); in recordingAllowed() 67 if (uid == AID_ROOT) return true; in recordingAllowed() 89 permCtrl->getPackagesForUid(uid, packages); in recordingAllowed() 99 if (appOps.noteOp(AppOpsManager::OP_RECORD_AUDIO, uid, checkedOpPackageName) in recordingAllowed() 108 bool captureAudioOutputAllowed(pid_t pid, uid_t uid) { in captureAudioOutputAllowed() argument 111 bool ok = checkPermission(sCaptureAudioOutput, pid, uid); in captureAudioOutputAllowed()
|