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

am: 9c7d3987ff

* commit '9c7d3987ff20d474a68b22d0274c026b4eb45f88':
  Build JobStatus objects outside the lock

Change-Id: I9773852423969eb1f9148d10e8bec2790cdac99d
This commit is contained in:
Christopher Tate
2016-05-31 18:54:09 +00:00
committed by android-build-merger

View File

@@ -224,10 +224,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. */