Merge "Build JobStatus objects outside the lock" into nyc-dev am: 87ad1fce25
am: 6dd6046b8a
* commit '6dd6046b8aa33e249cd087bcf693a0112eea5f40':
Build JobStatus objects outside the lock
Change-Id: I185a6e0b21c95ffddef692818eb72b86d1125f78
This commit is contained in:
@@ -223,10 +223,11 @@ public class JobServiceContext extends IJobCallback.Stub implements ServiceConne
|
|||||||
* stop executing.
|
* stop executing.
|
||||||
*/
|
*/
|
||||||
JobStatus getRunningJob() {
|
JobStatus getRunningJob() {
|
||||||
|
final JobStatus job;
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
return mRunningJob == null ?
|
job = mRunningJob;
|
||||||
null : new JobStatus(mRunningJob);
|
|
||||||
}
|
}
|
||||||
|
return job == null ? null : new JobStatus(job);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Called externally when a job that was scheduled for execution should be cancelled. */
|
/** Called externally when a job that was scheduled for execution should be cancelled. */
|
||||||
|
|||||||
Reference in New Issue
Block a user