commit | 3ff26d2739261a320c308d30cf4719979f49b314 | [log] [tgz] |
---|---|---|
author | Julia Reynolds <juliacr@google.com> | Mon Jun 19 08:16:04 2017 -0400 |
committer | Julia Reynolds <juliacr@google.com> | Mon Jul 10 12:46:53 2017 -0400 |
tree | de176163291af34f2a2accf0ac2347b2ea7b5142 | |
parent | 34149bad4eac7eca3793cb4859f6387fe5cee431 [diff] [blame] |
Rate limit notification sounds/vibrations 1 alert per second. Bug: 36662487 Test: runtest systemui-notification Change-Id: I42c2342c7ccb86f5912d729c7c2a0074f3000ad2
diff --git a/services/core/java/com/android/server/notification/AlertRateLimiter.java b/services/core/java/com/android/server/notification/AlertRateLimiter.java index e4a7934..2b01945 100644 --- a/services/core/java/com/android/server/notification/AlertRateLimiter.java +++ b/services/core/java/com/android/server/notification/AlertRateLimiter.java
@@ -24,7 +24,7 @@ static final long ALLOWED_ALERT_INTERVAL = 1000; private long mLastNotificationMillis = 0; - boolean isRateLimited(long now) { + boolean shouldRateLimitAlert(long now) { final long millisSinceLast = now - mLastNotificationMillis; if (millisSinceLast < 0 || millisSinceLast < ALLOWED_ALERT_INTERVAL) { return true;