OSDN Git Service

DO NOT MERGE Race condition in JobServiceContext
authorMatthew Williams <mjwilliams@google.com>
Sat, 17 Oct 2015 04:04:51 +0000 (21:04 -0700)
committerMatthew Williams <mjwilliams@google.com>
Tue, 20 Oct 2015 21:44:26 +0000 (21:44 +0000)
commitf5e045254a8638a9a52e9777ef990bfb275b491d
tree222ec30a2541dbf6f4e04933162c193c62144229
parent7d7a2254bc41d2dfc34fbb8693cb0dad2ccd528a
DO NOT MERGE Race condition in JobServiceContext

BUG: 23981171
JobServiceContext has a reference to the running job which
1) needs to be copied before providing access to outside callers
2) was not guarded by a lock in one case which might result in an NPE

Change-Id: I7eb04052f3fe63e7b386c564a6bdebf9144e976a
(cherry picked from commit 0cc7654e109d232e5d9a9de06482d8d349a21f28)
services/core/java/com/android/server/job/JobServiceContext.java
services/core/java/com/android/server/job/controllers/JobStatus.java