OSDN Git Service

Network switch notifications: rate & daily limits
authorLorenzo Colitti <lorenzo@google.com>
Mon, 29 Aug 2016 05:03:11 +0000 (14:03 +0900)
committerHugo Benichi <hugobenichi@google.com>
Tue, 30 Aug 2016 15:36:11 +0000 (00:36 +0900)
commit84e6f1232c92988617a1155fd7356f90e6c84b4e
treeb36cb7fad6f44d67d8073632beb77ef457a63d86
parenta43a095106ae71842574115ed69fed2171b4c48c
Network switch notifications: rate & daily limits

This patch adds a daily limit to the maximum number of notifications
shown when switching networks.

It also adds a rate limit to prevent rapid successive notifications in
flapping scenarios.

Bug: 31132499
Change-Id: Iccb6d0899646ea6df3cfad32a421922263e0eb85
core/java/android/provider/Settings.java
services/core/java/com/android/server/ConnectivityService.java
services/core/java/com/android/server/connectivity/LingerMonitor.java
services/tests/servicestests/src/com/android/server/connectivity/LingerMonitorTest.java