Fix LingerMonitor notification rate limiting
If time since boot is lower than the rate limit, notifications would not be shown. This is causing tests to fail on continuous testing. Test: atest FrameworksNetTests Bug: b/117516272 Change-Id: I03da28f2ca61119fa0ef9534bb4ce3f6406c1ff2
This commit is contained in:
parent
431d07e60a
commit
032dfe5ce5
1 changed files with 2 additions and 0 deletions
|
|
@ -90,6 +90,8 @@ public class LingerMonitor {
|
|||
mNotifier = notifier;
|
||||
mDailyLimit = dailyLimit;
|
||||
mRateLimitMillis = rateLimitMillis;
|
||||
// Ensure that (now - mFirstNotificationMillis) >= rateLimitMillis at first
|
||||
mFirstNotificationMillis = -rateLimitMillis;
|
||||
}
|
||||
|
||||
private static HashMap<String, Integer> makeTransportToNameMap() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue