diff options
author | Robert Greenwalt <robdroid@android.com> | 2010-04-09 09:36:09 -0700 |
---|---|---|
committer | Robert Greenwalt <robdroid@android.com> | 2010-04-09 12:42:45 -0700 |
commit | 81aa0971d7a26ae16ed34fc7da97a55d97fb8e74 (patch) | |
tree | e387bb78e16021e70e7cf6d52b6e391515be60eb /core/java | |
parent | cb27041034343a6a15f0812d04f66fefbed30686 (diff) | |
download | frameworks_base-81aa0971d7a26ae16ed34fc7da97a55d97fb8e74.zip frameworks_base-81aa0971d7a26ae16ed34fc7da97a55d97fb8e74.tar.gz frameworks_base-81aa0971d7a26ae16ed34fc7da97a55d97fb8e74.tar.bz2 |
Make ThrottleService notice policy changes.
Added ContentObserver to watch relevant Secure Settings.
Also added new policy-change broadcast to let settings know.
Lastly reorged things a bit so that all of our broadcasts are sent at boot so the sticky ones
are populated.
bug:2576057
Change-Id: Ie11ffb057de9c801a5088612cd464ea062f3a666
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/net/ThrottleManager.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/core/java/android/net/ThrottleManager.java b/core/java/android/net/ThrottleManager.java index 79c2d6f..5fdac58 100644 --- a/core/java/android/net/ThrottleManager.java +++ b/core/java/android/net/ThrottleManager.java @@ -73,6 +73,12 @@ public class ThrottleManager */ public static final String EXTRA_THROTTLE_LEVEL = "level"; + /** + * Broadcast on boot and whenever the settings change. + * {@hide} + */ + public static final String POLICY_CHANGED_ACTION = "android.net.thrott.POLICY_CHANGED_ACTION"; + // {@hide} public static final int DIRECTION_TX = 0; // {@hide} @@ -103,6 +109,8 @@ public class ThrottleManager // @hide public static final int PERIOD_SECOND = 11; + + /** * returns a long of the ms from the epoch to the time the current cycle ends for the * named interface @@ -147,7 +155,7 @@ public class ThrottleManager /** * returns the number of bytes read+written after which a particular cliff - * takes effect on the named iface. Currently only cliff #0 is supported (1 step) + * takes effect on the named iface. Currently only cliff #1 is supported (1 step) * {@hide} */ public long getCliffThreshold(String iface, int cliff) { @@ -160,7 +168,7 @@ public class ThrottleManager /** * returns the thottling bandwidth (bps) for a given cliff # on the named iface. - * only cliff #0 is currently supported. + * only cliff #1 is currently supported. * {@hide} */ public int getCliffLevel(String iface, int cliff) { |