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

Commit 1f7c2457 authored by Eino-Ville Talvala's avatar Eino-Ville Talvala Committed by Android Git Automerger
Browse files

am 52aad856: CameraService: Treat TOP_SLEEPING same as TOP for priority.

* commit '52aad856':
  CameraService: Treat TOP_SLEEPING same as TOP for priority.
parents abd74de6 52aad856
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -602,6 +602,11 @@ int CameraService::getCameraPriorityFromProcState(int procState) {
                procState);
        return -1;
    }
    // Treat sleeping TOP processes the same as regular TOP processes, for
    // access priority.  This is important for lock-screen camera launch scenarios
    if (procState == PROCESS_STATE_TOP_SLEEPING) {
        procState = PROCESS_STATE_TOP;
    }
    return INT_MAX - procState;
}

+2 −0
Original line number Diff line number Diff line
@@ -75,6 +75,8 @@ public:

    // Process state (mirrors frameworks/base/core/java/android/app/ActivityManager.java)
    static const int PROCESS_STATE_NONEXISTENT = -1;
    static const int PROCESS_STATE_TOP = 2;
    static const int PROCESS_STATE_TOP_SLEEPING = 5;

    // 3 second busy timeout when other clients are connecting
    static const nsecs_t DEFAULT_CONNECT_TIMEOUT_NS = 3000000000;