ee410da42b
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