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

Commit c7956f0d authored by Hui Yu's avatar Hui Yu
Browse files

Change isProcStateBackground() cutoff to PROCESS_STATE_BOUND_FOREGROUND_SERVICE

isProcStateBackground() mostly is used to determinte when to call registered IUidObserver's
onUidActive() and onUidIdle() callbacks. CameraServer and AudioServer
are the two most notable IUidObserver.

Since AppOps uses PROCESS_STATE_BOUND_FOREGROUND_SERVICE as foreground state cutoff. It is
better we consolidate other part of code use the same proc state as
foreground cutoff.

Bug: 149500958
Test: NA.
Change-Id: I8206ef4c8cad210547204117c2fe8eb0550d459f
parent c0324f3a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -694,7 +694,7 @@ public class ActivityManager {


    /** @hide Should this process state be considered a background state? */
    /** @hide Should this process state be considered a background state? */
    public static final boolean isProcStateBackground(int procState) {
    public static final boolean isProcStateBackground(int procState) {
        return procState >= PROCESS_STATE_TRANSIENT_BACKGROUND;
        return procState > PROCESS_STATE_BOUND_FOREGROUND_SERVICE;
    }
    }


    /** @hide Is this a foreground service type? */
    /** @hide Is this a foreground service type? */