Lines Matching refs:uid

41 void BatteryNotifier::noteStartVideo(uid_t uid) {  in noteStartVideo()  argument
44 if (mVideoRefCounts[uid] == 0 && batteryService != nullptr) { in noteStartVideo()
45 batteryService->noteStartVideo(uid); in noteStartVideo()
47 mVideoRefCounts[uid]++; in noteStartVideo()
50 void BatteryNotifier::noteStopVideo(uid_t uid) { in noteStopVideo() argument
52 if (mVideoRefCounts.find(uid) == mVideoRefCounts.end()) { in noteStopVideo()
53 ALOGW("%s: video refcount is broken for uid(%d).", __FUNCTION__, (int)uid); in noteStopVideo()
59 mVideoRefCounts[uid]--; in noteStopVideo()
60 if (mVideoRefCounts[uid] == 0) { in noteStopVideo()
62 batteryService->noteStopVideo(uid); in noteStopVideo()
64 mVideoRefCounts.erase(uid); in noteStopVideo()
77 void BatteryNotifier::noteStartAudio(uid_t uid) { in noteStartAudio() argument
80 if (mAudioRefCounts[uid] == 0 && batteryService != nullptr) { in noteStartAudio()
81 batteryService->noteStartAudio(uid); in noteStartAudio()
83 mAudioRefCounts[uid]++; in noteStartAudio()
86 void BatteryNotifier::noteStopAudio(uid_t uid) { in noteStopAudio() argument
88 if (mAudioRefCounts.find(uid) == mAudioRefCounts.end()) { in noteStopAudio()
89 ALOGW("%s: audio refcount is broken for uid(%d).", __FUNCTION__, (int)uid); in noteStopAudio()
95 mAudioRefCounts[uid]--; in noteStopAudio()
96 if (mAudioRefCounts[uid] == 0) { in noteStopAudio()
98 batteryService->noteStopAudio(uid); in noteStopAudio()
100 mAudioRefCounts.erase(uid); in noteStopAudio()
113 void BatteryNotifier::noteFlashlightOn(const String8& id, uid_t uid) { in noteFlashlightOn() argument
117 std::pair<String8, uid_t> k = std::make_pair(id, uid); in noteFlashlightOn()
121 batteryService->noteFlashlightOn(uid); in noteFlashlightOn()
126 void BatteryNotifier::noteFlashlightOff(const String8& id, uid_t uid) { in noteFlashlightOff() argument
130 std::pair<String8, uid_t> k = std::make_pair(id, uid); in noteFlashlightOff()
134 batteryService->noteFlashlightOff(uid); in noteFlashlightOff()
148 void BatteryNotifier::noteStartCamera(const String8& id, uid_t uid) { in noteStartCamera() argument
151 std::pair<String8, uid_t> k = std::make_pair(id, uid); in noteStartCamera()
155 batteryService->noteStartCamera(uid); in noteStartCamera()
160 void BatteryNotifier::noteStopCamera(const String8& id, uid_t uid) { in noteStopCamera() argument
163 std::pair<String8, uid_t> k = std::make_pair(id, uid); in noteStopCamera()
167 batteryService->noteStopCamera(uid); in noteStopCamera()