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

Commit b3791d74 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Minor updates to BIND_ALLOW_FREEZE" into main

parents 6d7cf8b2 0576398c
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -760,8 +760,7 @@ public abstract class Context {
     */
    public static final long BIND_REDUCTION_FLAGS =
            Context.BIND_ALLOW_OOM_MANAGEMENT | Context.BIND_WAIVE_PRIORITY
                    | Context.BIND_NOT_PERCEPTIBLE | Context.BIND_NOT_VISIBLE
                    | Context.BIND_ALLOW_FREEZE;
                    | Context.BIND_NOT_PERCEPTIBLE | Context.BIND_NOT_VISIBLE;

    /** @hide */
    @IntDef(flag = true, prefix = { "RECEIVER_VISIBLE" }, value = {
+5 −0
Original line number Diff line number Diff line
@@ -4162,6 +4162,11 @@ public final class ActiveServices {
                    "BIND_ALLOW_FOREGROUND_SERVICE_STARTS_FROM_BACKGROUND");
        }

        if ((flags & Context.BIND_ALLOW_FREEZE) != 0 && !isCallerSystem) {
            throw new SecurityException("Non-system caller (pid=" + callingPid
                    + ") set BIND_ALLOW_FREEZE when binding service " + service);
        }

        final boolean callerFg = callerApp.mState.getSetSchedGroup()
                != ProcessList.SCHED_GROUP_BACKGROUND;
        final boolean isBindExternal =