Home
last modified time | relevance | path

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

12345678910>>...14

/frameworks/native/services/sensorservice/
DBatteryService.h33 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 …]
DBatteryService.cpp41 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/native/libs/binder/
DIBatteryStats.cpp37 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 …]
DPermissionCache.cpp38 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 …]
DIAppOpsService.cpp39 virtual int32_t checkOperation(int32_t code, int32_t uid, const String16& packageName) { in checkOperation() argument
43 data.writeInt32(uid); in checkOperation()
51 virtual int32_t noteOperation(int32_t code, int32_t uid, const String16& packageName) { in noteOperation() argument
55 data.writeInt32(uid); in noteOperation()
63 virtual int32_t startOperation(const sp<IBinder>& token, int32_t code, int32_t uid, in startOperation() argument
69 data.writeInt32(uid); in startOperation()
77 virtual void finishOperation(const sp<IBinder>& token, int32_t code, int32_t uid, in finishOperation() argument
83 data.writeInt32(uid); in finishOperation()
139 int32_t uid = data.readInt32(); in onTransact() local
141 int32_t res = checkOperation(code, uid, packageName); in onTransact()
[all …]
/frameworks/base/core/java/com/android/internal/app/
DIBatteryStats.aidl29 void noteStartSensor(int uid, int sensor); in noteStartSensor() argument
30 void noteStopSensor(int uid, int sensor); in noteStopSensor() argument
31 void noteStartVideo(int uid); in noteStartVideo() argument
32 void noteStopVideo(int uid); in noteStopVideo() argument
33 void noteStartAudio(int uid); in noteStartAudio() argument
34 void noteStopAudio(int uid); in noteStopAudio() argument
37 void noteFlashlightOn(int uid); in noteFlashlightOn() argument
38 void noteFlashlightOff(int uid); in noteFlashlightOff() argument
39 void noteStartCamera(int uid); in noteStartCamera() argument
40 void noteStopCamera(int uid); in noteStopCamera() argument
[all …]
DIAppOpsService.aidl26 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/core/java/android/net/
DTrafficStats.java179 public static void setThreadStatsUid(int uid) { in setThreadStatsUid() argument
180 NetworkManagementSocketTagger.setThreadSocketStatsUid(uid); in setThreadStatsUid()
268 final int uid = android.os.Process.myUid(); in incrementOperationCount() local
270 getStatsService().incrementOperationCount(uid, tag, operationCount); in incrementOperationCount()
465 public static long getUidTxBytes(int uid) { in getUidTxBytes() argument
466 return nativeGetUidStat(uid, TYPE_TX_BYTES); in getUidTxBytes()
481 public static long getUidRxBytes(int uid) { in getUidRxBytes() argument
482 return nativeGetUidStat(uid, TYPE_RX_BYTES); in getUidRxBytes()
497 public static long getUidTxPackets(int uid) { in getUidTxPackets() argument
498 return nativeGetUidStat(uid, TYPE_TX_PACKETS); in getUidTxPackets()
[all …]
DNetworkStats.java79 private int[] uid; field in NetworkStats
90 public int uid; field in NetworkStats.Entry
108 public Entry(String iface, int uid, int set, int tag, long rxBytes, long rxPackets, in Entry() argument
111 this.uid = uid; in Entry()
142 builder.append(" uid=").append(uid); in toString()
157 return uid == e.uid && set == e.set && tag == e.tag && rxBytes == e.rxBytes in equals()
172 this.uid = new int[initialSize]; in NetworkStats()
184 this.uid = EmptyArray.INT; in NetworkStats()
200 uid = parcel.createIntArray(); in NetworkStats()
216 dest.writeIntArray(uid); in writeToParcel()
[all …]
/frameworks/base/core/java/android/os/
DUserHandle.java96 public static final boolean isIsolated(int uid) { in isIsolated() argument
97 if (uid > 0) { in isIsolated()
98 final int appId = getAppId(uid); in isIsolated()
106 public static boolean isApp(int uid) { in isApp() argument
107 if (uid > 0) { in isApp()
108 final int appId = getAppId(uid); in isApp()
119 public static final int getUserId(int uid) { in getUserId() argument
121 return uid / PER_USER_RANGE; in getUserId()
160 public static final int getAppId(int uid) { in getAppId() argument
161 return uid % PER_USER_RANGE; in getAppId()
[all …]
DWorkSource.java62 public WorkSource(int uid) { in WorkSource() argument
64 mUids = new int[] { uid, 0 }; in WorkSource()
69 public WorkSource(int uid, String name) { in WorkSource() argument
74 mUids = new int[] { uid, 0 }; in WorkSource()
207 public void set(int uid) { in set() argument
210 mUids[0] = uid; in set()
215 public void set(int uid, String name) { in set() argument
224 mUids[0] = uid; in set()
266 public boolean add(int uid) { in add() argument
269 insert(0, uid); in add()
[all …]
/frameworks/base/core/java/android/app/
DAppImportanceMonitor.java37 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 …]
DAppOpsManager.java1050 public PackageOps(String packageName, int uid, List<OpEntry> entries) { in PackageOps() argument
1052 mUid = uid; in PackageOps()
1241 public List<AppOpsManager.PackageOps> getOpsForPackage(int uid, String packageName, int[] ops) { in getOpsForPackage() argument
1243 return mService.getOpsForPackage(uid, packageName, ops); in getOpsForPackage()
1250 public void setUidMode(int code, int uid, int mode) { in setUidMode() argument
1252 mService.setUidMode(code, uid, mode); in setUidMode()
1258 public void setMode(int code, int uid, String packageName, int mode) { in setMode() argument
1260 mService.setMode(code, uid, packageName, mode); in setMode()
1279 final int uid = Binder.getCallingUid(); in setRestriction() local
1280 mService.setAudioRestriction(code, usage, uid, mode, exceptionPackages); in setRestriction()
[all …]
/frameworks/base/core/java/com/android/server/
DNetworkManagementSocketTagger.java61 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/
DIBatteryStats.h31 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;
DPermissionCache.h44 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/services/core/java/com/android/server/am/
DBatteryStatsService.java148 public void scheduleCpuSyncDueToRemovedUid(int uid) { in scheduleCpuSyncDueToRemovedUid() argument
151 mUidsToRemove.add(uid); in scheduleCpuSyncDueToRemovedUid()
240 void removeUid(int uid) { in removeUid() argument
242 mStats.removeUidStatsLocked(uid); in removeUid()
258 void noteProcessStart(String name, int uid) { in noteProcessStart() argument
260 mStats.noteProcessStartLocked(name, uid); in noteProcessStart()
264 void noteProcessCrash(String name, int uid) { in noteProcessCrash() argument
266 mStats.noteProcessCrashLocked(name, uid); in noteProcessCrash()
270 void noteProcessAnr(String name, int uid) { in noteProcessAnr() argument
272 mStats.noteProcessAnrLocked(name, uid); in noteProcessAnr()
[all …]
/frameworks/base/services/core/java/com/android/server/net/
DNetworkPolicyManagerService.java375 for (int uid : whitelist) { in updatePowerSaveWhitelistLocked()
376 mPowerSaveWhitelistExceptIdleAppIds.put(uid, true); in updatePowerSaveWhitelistLocked()
382 for (int uid : whitelist) { in updatePowerSaveWhitelistLocked()
383 mPowerSaveWhitelistAppIds.put(uid, true); in updatePowerSaveWhitelistLocked()
400 for (int uid : whitelist) { in updatePowerSaveTempWhitelistLocked()
401 mPowerSaveTempWhitelistAppIds.put(uid, true); in updatePowerSaveTempWhitelistLocked()
533 @Override public void onUidStateChanged(int uid, int procState) throws RemoteException {
535 updateUidStateLocked(uid, procState);
539 @Override public void onUidGone(int uid) throws RemoteException {
541 removeUidStateLocked(uid);
[all …]
DNetworkStatsCollection.java144 if (isAccessibleToUser(key.uid, callerUid)) { in getRelevantUids()
145 int j = uids.binarySearch(key.uid); in getRelevantUids()
149 uids.add(j, key.uid); in getRelevantUids()
161 NetworkTemplate template, int uid, int set, int tag, int fields) { in getHistory() argument
162 return getHistory(template, uid, set, tag, fields, Long.MIN_VALUE, Long.MAX_VALUE); in getHistory()
170 NetworkTemplate template, int uid, int set, int tag, int fields, long start, long end) { in getHistory() argument
172 if (!isAccessibleToUser(uid, callerUid)) { in getHistory()
173 throw new SecurityException("Network stats history of uid " + uid in getHistory()
185 if (key.uid == uid && NetworkStats.setMatches(set, key.set) && key.tag == tag in getHistory()
211 if (templateMatches(template, key.ident) && isAccessibleToUser(key.uid, callerUid) in getSummary()
[all …]
/frameworks/base/services/core/java/com/android/server/
DGraphicsStatsService.java79 private boolean isValid(int uid, String packageName) { in isValid() argument
82 return info.applicationInfo.uid == uid; in isValid()
91 int uid = Binder.getCallingUid(); in requestBufferForProcess() local
96 if (!isValid(uid, packageName)) { in requestBufferForProcess()
100 pfd = requestBufferForProcessLocked(token, uid, pid, packageName); in requestBufferForProcess()
117 int uid, int pid, String packageName) throws RemoteException { in requestBufferForProcessLocked() argument
118 ActiveBuffer buffer = fetchActiveBuffersLocked(token, uid, pid, packageName); in requestBufferForProcessLocked()
142 private ActiveBuffer fetchActiveBuffersLocked(IBinder token, int uid, int pid, in fetchActiveBuffersLocked() argument
148 && buffers.mUid == uid) { in fetchActiveBuffersLocked()
154 ActiveBuffer buffers = new ActiveBuffer(token, uid, pid, packageName); in fetchActiveBuffersLocked()
[all …]
DAppOpsService.java111 public final int uid; field in AppOpsService.UidState
115 public UidState(int uid) { in UidState() argument
116 this.uid = uid; in UidState()
143 public final int uid; field in AppOpsService.Op
155 uid = _uid; in Op()
250 String[] packageNames = getPackagesForUid(uidState.uid); in systemReady()
269 UserHandle.getUserId(ops.uidState.uid)); in systemReady()
273 if (curUid != ops.uidState.uid) { in systemReady()
295 public int getMountMode(int uid, String packageName) { in systemReady()
296 if (Process.isIsolated(uid)) { in systemReady()
[all …]
/frameworks/base/services/core/java/com/android/server/notification/
DRankingHelper.java142 int uid = safeInt(parser, ATT_UID, Record.UNKNOWN_UID); in readXml() local
151 uid = pm.getPackageUid(name, UserHandle.USER_OWNER); in readXml()
157 if (uid == Record.UNKNOWN_UID) { in readXml()
164 r = getOrCreateRecord(name, uid); in readXml()
182 private static String recordKey(String pkg, int uid) { in recordKey() argument
183 return pkg + "|" + uid; in recordKey()
186 private Record getOrCreateRecord(String pkg, int uid) { in getOrCreateRecord() argument
187 final String key = recordKey(pkg, uid); in getOrCreateRecord()
192 r.uid = uid; in getOrCreateRecord()
216 if (forBackup && UserHandle.getUserId(r.uid) != UserHandle.USER_OWNER) { in writeXml()
[all …]
DRankingConfig.java19 int getPackagePriority(String packageName, int uid); in getPackagePriority() argument
21 void setPackagePriority(String packageName, int uid, int priority); in setPackagePriority() argument
23 boolean getPackagePeekable(String packageName, int uid); in getPackagePeekable() argument
25 void setPackagePeekable(String packageName, int uid, boolean peekable); in setPackagePeekable() argument
27 int getPackageVisibilityOverride(String packageName, int uid); in getPackageVisibilityOverride() argument
29 void setPackageVisibilityOverride(String packageName, int uid, int visibility); in setPackageVisibilityOverride() argument
/frameworks/base/core/java/com/android/internal/os/
DKernelUidCpuTimeReader.java55 void onUidCpuTime(int uid, long userTimeUs, long systemTimeUs, long powerMaUs); in onUidCpuTime() argument
77 final int uid = Integer.parseInt(uidStr.substring(0, uidStr.length() - 1), 10); in readDelta() local
91 int index = mLastUserTimeUs.indexOfKey(uid); in readDelta()
100 sb.append(uid).append("!\n"); in readDelta()
131 callback.onUidCpuTime(uid, userTimeDeltaUs, systemTimeDeltaUs, in readDelta()
135 mLastUserTimeUs.put(uid, userTimeUs); in readDelta()
136 mLastSystemTimeUs.put(uid, systemTimeUs); in readDelta()
137 mLastPowerMaUs.put(uid, powerMaUs); in readDelta()
149 public void removeUid(int uid) { in removeUid() argument
150 int index = mLastUserTimeUs.indexOfKey(uid); in removeUid()
[all …]
/frameworks/av/media/utils/
DBatteryNotifier.cpp104 void BatteryNotifier::noteFlashlightOn(const String8& id, int uid) { in noteFlashlightOn() argument
108 std::pair<String8, int> k = std::make_pair(id, uid); in noteFlashlightOn()
112 batteryService->noteFlashlightOn(uid); in noteFlashlightOn()
117 void BatteryNotifier::noteFlashlightOff(const String8& id, int uid) { in noteFlashlightOff() argument
121 std::pair<String8, int> k = std::make_pair(id, uid); in noteFlashlightOff()
125 batteryService->noteFlashlightOff(uid); in noteFlashlightOff()
139 void BatteryNotifier::noteStartCamera(const String8& id, int uid) { in noteStartCamera() argument
142 std::pair<String8, int> k = std::make_pair(id, uid); in noteStartCamera()
146 batteryService->noteStartCamera(uid); in noteStartCamera()
151 void BatteryNotifier::noteStopCamera(const String8& id, int uid) { in noteStopCamera() argument
[all …]

12345678910>>...14