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

Commit c80ad9f6 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Pass START_ACTIVITIES_FROM_BACKGROUND permission to instrumentation...

Merge "Pass START_ACTIVITIES_FROM_BACKGROUND permission to instrumentation test." into rvc-dev am: 7afd9b9a am: a6baa496

Change-Id: Id69c0a2d9e0734369ca39c28de83234ca399e998
parents e9e4dba7 a6baa496
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -4869,6 +4869,19 @@ public final class ActiveServices {
            return true;
        }

        if (r.app != null) {
            ActiveInstrumentation instr = r.app.getActiveInstrumentation();
            if (instr != null && instr.mHasBackgroundActivityStartsPermission) {
                return true;
            }
        }

        final boolean hasAllowBackgroundActivityStartsToken = r.app != null
                ? !r.app.mAllowBackgroundActivityStartsTokens.isEmpty() : false;
        if (hasAllowBackgroundActivityStartsToken) {
            return true;
        }

        if (mAm.checkPermission(START_ACTIVITIES_FROM_BACKGROUND, callingPid, callingUid)
                == PERMISSION_GRANTED) {
            return true;