Cancel previous cutoffs.
Make sure to cancel previously scheduled cutoffs to make sure we don't have duplicate and stale cutoffs in the queue. Bug: 218216817 Test: atest FrameworksMockingServicesTests:QuotaControllerTest Change-Id: I579d915adb0f00f8f6de73c39e65ac28b4246d76
This commit is contained in:
@@ -2169,7 +2169,7 @@ public final class QuotaController extends StateController {
|
||||
}
|
||||
scheduleCutoff();
|
||||
} else if (mRegularJobTimer && priorityLowered) {
|
||||
scheduleCutoff();
|
||||
rescheduleCutoff();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2205,7 +2205,7 @@ public final class QuotaController extends StateController {
|
||||
mRunningBgJobs.valueAt(i).getEffectivePriority());
|
||||
}
|
||||
if (mLowestPriority != oldPriority) {
|
||||
scheduleCutoff();
|
||||
rescheduleCutoff();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2705,7 +2705,7 @@ public final class QuotaController extends StateController {
|
||||
if (DEBUG) {
|
||||
Slog.d(TAG, pkg + " had early REACHED_QUOTA message");
|
||||
}
|
||||
mPkgTimers.get(pkg.userId, pkg.packageName).scheduleCutoff();
|
||||
mPkgTimers.get(pkg.userId, pkg.packageName).rescheduleCutoff();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2727,7 +2727,7 @@ public final class QuotaController extends StateController {
|
||||
if (DEBUG) {
|
||||
Slog.d(TAG, pkg + " had early REACHED_EJ_QUOTA message");
|
||||
}
|
||||
mEJPkgTimers.get(pkg.userId, pkg.packageName).scheduleCutoff();
|
||||
mEJPkgTimers.get(pkg.userId, pkg.packageName).rescheduleCutoff();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user