OSDN Git Service

Finish impl of job queue: handle URI permissions.
authorDianne Hackborn <hackbod@google.com>
Fri, 14 Apr 2017 01:04:31 +0000 (18:04 -0700)
committerDianne Hackborn <hackbod@google.com>
Mon, 17 Apr 2017 23:14:58 +0000 (16:14 -0700)
commit342e6037109a53830277d8de6ecf0e39578c143c
tree6d8aff8af82a831906df8b295048d747e34e1c8c
parentd8837b6fca23847fcd4dd295ccbb33ef9d4edcec
Finish impl of job queue: handle URI permissions.

The job queue now handles URI permissions associated with
the Intent of each job.  Just (kind-of) like Service!

Also do the second pass of locking in job scheduler, getting
rid of all the async dispatching on a handler, and just executing
calls right in line with simple locking.  This probably fixes
a few other race issues, and allows us to make sure that we
always finish a job correctly when dequeuing the last work (we
will always atomically dequeue and finish, so no new work can
slip in between).

And fix a little debug output in IntentFilter.

Test: ran CtsJobSchedulerTestCases, added new test for URI perms.

Change-Id: I52f700ef0cd5be3ff70050f9c0f5fe3e8a5ccac1
core/java/android/app/job/JobWorkItem.java
core/java/android/content/IntentFilter.java
services/core/java/com/android/server/job/GrantedUriPermissions.java [new file with mode: 0644]
services/core/java/com/android/server/job/JobSchedulerService.java
services/core/java/com/android/server/job/JobServiceContext.java
services/core/java/com/android/server/job/controllers/JobStatus.java