Searched refs:shouldRateLimitAlert (Results 1 – 3 of 3) sorted by relevance
48 assertFalse(mLimiter.shouldRateLimitAlert(mTestStartTime)); in testFirstAlertAllowed()53 assertFalse(mLimiter.shouldRateLimitAlert(mTestStartTime)); in testAllowedAfterSecond()54 assertFalse(mLimiter.shouldRateLimitAlert(mTestStartTime + ALLOWED_ALERT_INTERVAL)); in testAllowedAfterSecond()59 assertFalse(mLimiter.shouldRateLimitAlert(mTestStartTime)); in testAllowedAfterSecondEvenWithBlockedEntries()60 assertTrue(mLimiter.shouldRateLimitAlert(mTestStartTime + ALLOWED_ALERT_INTERVAL - 1)); in testAllowedAfterSecondEvenWithBlockedEntries()61 assertFalse(mLimiter.shouldRateLimitAlert(mTestStartTime + ALLOWED_ALERT_INTERVAL)); in testAllowedAfterSecondEvenWithBlockedEntries()66 assertFalse(mLimiter.shouldRateLimitAlert(mTestStartTime)); in testAllowedDisallowedBeforeSecond()67 assertTrue(mLimiter.shouldRateLimitAlert(mTestStartTime + ALLOWED_ALERT_INTERVAL - 1)); in testAllowedDisallowedBeforeSecond()72 assertFalse(mLimiter.shouldRateLimitAlert(mTestStartTime)); in testDisallowedTimePast()73 assertTrue(mLimiter.shouldRateLimitAlert(mTestStartTime - ALLOWED_ALERT_INTERVAL)); in testDisallowedTimePast()
27 boolean shouldRateLimitAlert(long now) { in shouldRateLimitAlert() method in AlertRateLimiter
618 boolean limited = alertRate.shouldRateLimitAlert(SystemClock.elapsedRealtime()); in isAlertRateLimited()