diff options
author | Matthew Williams <mjwilliams@google.com> | 2014-07-25 11:30:40 -0700 |
---|---|---|
committer | Matthew Williams <mjwilliams@google.com> | 2014-07-29 11:11:41 -0700 |
commit | ee410da42b6b8352213f03f7725fd041f703b035 (patch) | |
tree | d79add63a7762d26f9d8396876fc8cc47ce0cb75 /core/java/android/app/job | |
parent | c503896a4d0cab029bca56cf7ac18ae182729a0a (diff) | |
download | frameworks_base-ee410da42b6b8352213f03f7725fd041f703b035.zip frameworks_base-ee410da42b6b8352213f03f7725fd041f703b035.tar.gz frameworks_base-ee410da42b6b8352213f03f7725fd041f703b035.tar.bz2 |
remove possible JobScheduler race in cancel()
Client can jobFinished() before getting a cancel msg.
1) Do better clean up of JobServiceContext after client jobFinished()
to remove superfluous MSG_CANCELs
2) When processing MSG_CANCEL check whether the context is still active
3) Do JobServiceContext cleanup before calling back to JobSchedulerService
Client can get a cancel msg even after calling jobFinished() (opposite to above)
1) explicitly check whether there are any MSG_CALLBACKs in the queue before
processing a MSG_CANCEL. If there are we can throw away the cancel.
Bug: 16547638
Change-Id: I90644586c7895a9ce97de752a5d657faf7f74b78
Diffstat (limited to 'core/java/android/app/job')
-rw-r--r-- | core/java/android/app/job/JobInfo.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/app/job/JobInfo.java b/core/java/android/app/job/JobInfo.java index 70f6966..936e205 100644 --- a/core/java/android/app/job/JobInfo.java +++ b/core/java/android/app/job/JobInfo.java @@ -266,6 +266,11 @@ public class JobInfo implements Parcelable { } }; + @Override + public String toString() { + return "(job:" + jobId + "/" + service.flattenToShortString() + ")"; + } + /** Builder class for constructing {@link JobInfo} objects. */ public static final class Builder { private int mJobId; |