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

Commit c5585dc3 authored by Austin Borger's avatar Austin Borger
Browse files

Revert "Remove redundant calls to onCameraAccessPrioritiesChanged."

This reverts commit 03befa0c.

Reason for revert: The assertion made that a uid state change implies a proc oom adj change is not true on GSI. There may be a more complex way of handling this, but it's low priority to implement it.

Change-Id: I0c08f810e574553d3d34f553f427a7b3fffdc326
parent 03befa0c
Loading
Loading
Loading
Loading
+15 −4
Original line number Diff line number Diff line
@@ -3717,10 +3717,21 @@ 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();
        }
    }
}