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

Commit 2c70debd authored by Jeff Sharkey's avatar Jeff Sharkey Committed by android-build-merger
Browse files

Merge "Check permission for FLAG_WILL_BE_FOREGROUND." into nyc-dev am: 564915c5 am: 383e2d6d

am: 7ba75265

* commit '7ba75265':
  Check permission for FLAG_WILL_BE_FOREGROUND.

Change-Id: I5c77c25164f582fac180c784c32c36bbb91bd013
parents d4b50bf2 7ba75265
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1339,6 +1339,11 @@ public final class JobSchedulerService extends com.android.server.SystemService
                        + " not permitted to schedule jobs for other apps");
            }

            if ((job.getFlags() & JobInfo.FLAG_WILL_BE_FOREGROUND) != 0) {
                getContext().enforceCallingOrSelfPermission(
                        android.Manifest.permission.CONNECTIVITY_INTERNAL, TAG);
            }

            long ident = Binder.clearCallingIdentity();
            try {
                return JobSchedulerService.this.scheduleAsPackage(job, callerUid,