Merge "Remove wtf." into tm-dev am: 2998b5aaa7

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17943049

Change-Id: Idd7b1c7f5a5a0edecea7e2b4c3ab8c8effc1bbaa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Kweku Adams
2022-04-27 21:20:30 +00:00
committed by Automerger Merge Worker

View File

@@ -1749,8 +1749,13 @@ public class JobSchedulerService extends com.android.server.SystemService
if (!removed) {
// We never create JobStatus objects for the express purpose of removing them, and this
// method is only ever called for jobs that were saved in the JobStore at some point,
// so if we can't find it, something went seriously wrong.
Slog.wtfStack(TAG, "Job didn't exist in JobStore");
// so if we can't find it, something may be wrong. As of Android T, there is a
// legitimate code path where removed is false --- when an actively running job is
// cancelled (eg. via JobScheduler.cancel() or the app scheduling a new job with the
// same job ID), we remove it from the JobStore and tell the JobServiceContext to stop
// running the job. Once the job stops running, we then call this method again.
// TODO: rework code so we don't intentionally call this method twice for the same job
Slog.w(TAG, "Job didn't exist in JobStore");
}
if (mReadyToRock) {
for (int i = 0; i < mControllers.size(); i++) {