Merge "Avoid unnecessary work." into sc-dev am: 6fc657d10f am: bfcc83c70c

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

Change-Id: I707ec813ada6a84d69c5ef7cc839519379a30610
This commit is contained in:
TreeHugger Robot
2021-06-28 16:48:10 +00:00
committed by Automerger Merge Worker

View File

@@ -82,7 +82,11 @@ public final class BackgroundJobsController extends StateController {
@Override
public void evaluateStateLocked(JobStatus jobStatus) {
updateSingleJobRestrictionLocked(jobStatus, sElapsedRealtimeClock.millis(), UNKNOWN);
if (jobStatus.isRequestedExpeditedJob()) {
// Only requested-EJs could have their run-in-bg constraint change outside of something
// coming through the ForceAppStandbyListener.
updateSingleJobRestrictionLocked(jobStatus, sElapsedRealtimeClock.millis(), UNKNOWN);
}
}
@Override