Merge "Build JobStatus objects outside the lock" into nyc-dev
am: 87ad1fce25
* commit '87ad1fce254bdb398c5a33753f0368a596fd81f0':
Build JobStatus objects outside the lock
Change-Id: I91f11f9de40e5d8cfa8c5619796dedd56c490eb5
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