Merge "Check permission for FLAG_WILL_BE_FOREGROUND." into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
564915c58e
@@ -1339,6 +1339,11 @@ public final class JobSchedulerService extends com.android.server.SystemService
|
|||||||
+ " not permitted to schedule jobs for other apps");
|
+ " 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();
|
long ident = Binder.clearCallingIdentity();
|
||||||
try {
|
try {
|
||||||
return JobSchedulerService.this.scheduleAsPackage(job, callerUid,
|
return JobSchedulerService.this.scheduleAsPackage(job, callerUid,
|
||||||
|
|||||||
Reference in New Issue
Block a user