Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 87f7b335 authored by Kweku Adams's avatar Kweku Adams
Browse files

Update callback delay when constant changes.

Update the delay of the ACTION_CHARGING/DISCHARGING broadcast whenever
the delay constant is updated to ensure that tests can run smoothly.

Bug: 214599394
Test: atest --rerun-until-failure 25 CtsJobSchedulerTestCases:BatteryConstraintTest
Test: atest --rerun-until-failure 25 CtsJobSchedulerTestCases:JobThrottlingTest
Change-Id: Ic664fa58edb3cab9980759baf356457158f66ead
parent 4ab2c3c6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -16109,6 +16109,11 @@ public class BatteryStatsImpl extends BatteryStats {
            BATTERY_CHARGED_DELAY_MS = delay >= 0 ? delay : mParser.getInt(
                    KEY_BATTERY_CHARGED_DELAY_MS,
                    DEFAULT_BATTERY_CHARGED_DELAY_MS);
            if (mHandler.hasCallbacks(mDeferSetCharging)) {
                mHandler.removeCallbacks(mDeferSetCharging);
                mHandler.postDelayed(mDeferSetCharging, BATTERY_CHARGED_DELAY_MS);
            }
        }
        private void updateKernelUidReadersThrottleTime(long oldTimeMs, long newTimeMs) {