Merge "Build JobStatus objects outside the lock" into nyc-dev am: 87ad1fce25

am: 4d628b86e4

* commit '4d628b86e407747ee641253fbdc723a41fa380d7':
  Build JobStatus objects outside the lock

Change-Id: I288ab060fdd5f831a9363d66c8f2220439e00eae
This commit is contained in:
Chris Tate
2016-05-31 18:48:27 +00:00
committed by android-build-merger

View File

@@ -223,10 +223,11 @@ public class JobServiceContext extends IJobCallback.Stub implements ServiceConne
* stop executing.
*/
JobStatus getRunningJob() {
final JobStatus job;
synchronized (mLock) {
return mRunningJob == null ?
null : new JobStatus(mRunningJob);
job = mRunningJob;
}
return job == null ? null : new JobStatus(job);
}
/** Called externally when a job that was scheduled for execution should be cancelled. */