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

Commit 1ab5c58e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Make sure only the system uses BIND_ALMOST_PERCEPTIBLE." into tm-dev am: d336b9ba

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17355723

Change-Id: I360c3281822aecd0322ee8aaa177574a0c791263
parents 867e13a7 d336b9ba
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2789,6 +2789,11 @@ public final class ActiveServices {
                            + ") set BIND_ALLOW_INSTANT when binding service " + service);
        }

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

        if ((flags & Context.BIND_ALLOW_BACKGROUND_ACTIVITY_STARTS) != 0) {
            mAm.enforceCallingPermission(
                    android.Manifest.permission.START_ACTIVITIES_FROM_BACKGROUND,