Home
last modified time | relevance | path

Searched refs:ALLOWED_ALERT_INTERVAL (Results 1 – 2 of 2) sorted by relevance

/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DAlertRateLimiterTest.java18 import static com.android.server.notification.AlertRateLimiter.ALLOWED_ALERT_INTERVAL;
54 assertFalse(mLimiter.shouldRateLimitAlert(mTestStartTime + ALLOWED_ALERT_INTERVAL)); in testAllowedAfterSecond()
60 assertTrue(mLimiter.shouldRateLimitAlert(mTestStartTime + ALLOWED_ALERT_INTERVAL - 1)); in testAllowedAfterSecondEvenWithBlockedEntries()
61 assertFalse(mLimiter.shouldRateLimitAlert(mTestStartTime + ALLOWED_ALERT_INTERVAL)); in testAllowedAfterSecondEvenWithBlockedEntries()
67 assertTrue(mLimiter.shouldRateLimitAlert(mTestStartTime + ALLOWED_ALERT_INTERVAL - 1)); in testAllowedDisallowedBeforeSecond()
73 assertTrue(mLimiter.shouldRateLimitAlert(mTestStartTime - ALLOWED_ALERT_INTERVAL)); in testDisallowedTimePast()
/frameworks/base/services/core/java/com/android/server/notification/
DAlertRateLimiter.java24 static final long ALLOWED_ALERT_INTERVAL = 1000; field in AlertRateLimiter
29 if (millisSinceLast < 0 || millisSinceLast < ALLOWED_ALERT_INTERVAL) { in shouldRateLimitAlert()