Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34eb60a1 authored by Austin Borger's avatar Austin Borger Committed by Android (Google) Code Review
Browse files

Merge "Remove redundant calls to onCameraAccessPrioritiesChanged." into tm-dev

parents 5008953a 03befa0c
Loading
Loading
Loading
Loading
+4 −15
Original line number Diff line number Diff line
@@ -3717,21 +3717,10 @@ void CameraService::UidPolicy::onUidIdle(uid_t uid, bool /* disabled */) {

void CameraService::UidPolicy::onUidStateChanged(uid_t uid, int32_t procState,
        int64_t procStateSeq __unused, int32_t capability __unused) {
    bool procStateChange = false;
    {
    Mutex::Autolock _l(mUidLock);
    if (mMonitoredUids.find(uid) != mMonitoredUids.end() &&
            mMonitoredUids[uid].procState != procState) {
        mMonitoredUids[uid].procState = procState;
            procStateChange = true;
        }
    }

    if (procStateChange) {
        sp<CameraService> service = mService.promote();
        if (service != nullptr) {
            service->notifyMonitoredUids();
        }
    }
}