summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/ThrottleService.java
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2010-04-16 16:53:20 -0700
committerIrfan Sheriff <isheriff@google.com>2010-04-16 16:53:20 -0700
commitcf28236b3784e285632e272b99cf1f8fc01f016b (patch)
tree3e7a2c993cdc46172504275d28c1ba1292d7e698 /services/java/com/android/server/ThrottleService.java
parentd5a873fbe8df67e86990969b6729db0079bbc278 (diff)
Dont check on interface value on API
The interface check in API could be used in future. Bug: 2576057 Change-Id: Icfb78a88be44d1e6a8350c4b65efe70970e658d8
Diffstat (limited to 'services/java/com/android/server/ThrottleService.java')
-rw-r--r--services/java/com/android/server/ThrottleService.java25
1 files changed, 13 insertions, 12 deletions
diff --git a/services/java/com/android/server/ThrottleService.java b/services/java/com/android/server/ThrottleService.java
index dcc053d254d8..7bc222e18b23 100644
--- a/services/java/com/android/server/ThrottleService.java
+++ b/services/java/com/android/server/ThrottleService.java
@@ -168,36 +168,37 @@ public class ThrottleService extends IThrottleManager.Stub {
"ThrottleService");
}
+ // TODO - fetch for the iface
public synchronized long getResetTime(String iface) {
enforceAccessPermission();
- if ((iface != null) &&
- iface.equals(mIface) &&
- (mRecorder != null)) {
+ if (mRecorder != null) {
mRecorder.getPeriodEnd();
}
return 0;
}
+
+ // TODO - fetch for the iface
public synchronized long getPeriodStartTime(String iface) {
enforceAccessPermission();
- if ((iface != null) &&
- iface.equals(mIface) &&
- (mRecorder != null)) {
+ if (mRecorder != null) {
mRecorder.getPeriodStart();
}
return 0;
}
//TODO - a better name? getCliffByteCountThreshold?
+ // TODO - fetch for the iface
public synchronized long getCliffThreshold(String iface, int cliff) {
enforceAccessPermission();
- if ((iface != null) && (cliff == 1) && iface.equals(mIface)) {
+ if (cliff == 1) {
return mPolicyThreshold;
}
return 0;
}
// TODO - a better name? getThrottleRate?
+ // TODO - fetch for the iface
public synchronized int getCliffLevel(String iface, int cliff) {
enforceAccessPermission();
- if ((iface != null) && (cliff == 1) && iface.equals(mIface)) {
+ if (cliff == 1) {
return mPolicyThrottleValue;
}
return 0;
@@ -209,11 +210,10 @@ public class ThrottleService extends IThrottleManager.Stub {
Settings.Secure.THROTTLE_HELP_URI);
}
+ // TODO - fetch for the iface
public synchronized long getByteCount(String iface, int dir, int period, int ago) {
enforceAccessPermission();
- if ((iface != null) &&
- iface.equals(mIface) &&
- (period == ThrottleManager.PERIOD_CYCLE) &&
+ if ((period == ThrottleManager.PERIOD_CYCLE) &&
(mRecorder != null)) {
if (dir == ThrottleManager.DIRECTION_TX) return mRecorder.getPeriodTx(ago);
if (dir == ThrottleManager.DIRECTION_RX) return mRecorder.getPeriodRx(ago);
@@ -222,9 +222,10 @@ public class ThrottleService extends IThrottleManager.Stub {
}
// TODO - a better name - getCurrentThrottleRate?
+ // TODO - fetch for the iface
public synchronized int getThrottle(String iface) {
enforceAccessPermission();
- if ((iface != null) && iface.equals(mIface) && (mThrottleIndex == 1)) {
+ if (mThrottleIndex == 1) {
return mPolicyThrottleValue;
}
return 0;