summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2013-05-20 09:28:08 -0700
committerRobert Greenwalt <rgreenwalt@google.com>2013-05-20 09:28:08 -0700
commit5c11e8ee5463b88907814e3e8716af292f90fb86 (patch)
tree913874135d823ca0b05f40e0f1933de5b4bc4e05
parent30c798d58772efd595fffebd9d0d54f717e34ed6 (diff)
downloadframeworks_base-5c11e8ee5463b88907814e3e8716af292f90fb86.zip
frameworks_base-5c11e8ee5463b88907814e3e8716af292f90fb86.tar.gz
frameworks_base-5c11e8ee5463b88907814e3e8716af292f90fb86.tar.bz2
Fix off-by-1 error in timing
If deferred action msg was delivered promptly it would end up looking like it too needed to be deferred and then nothing would end up getting done. bug:9014777 Change-Id: I243df70463ebb9333efd6df510f71f9d8d9bdf91
-rw-r--r--services/java/com/android/server/wifi/WifiController.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/java/com/android/server/wifi/WifiController.java b/services/java/com/android/server/wifi/WifiController.java
index 10f7f5a..8e2bdaa 100644
--- a/services/java/com/android/server/wifi/WifiController.java
+++ b/services/java/com/android/server/wifi/WifiController.java
@@ -426,7 +426,7 @@ class WifiController extends StateMachine {
private boolean doDeferEnable(Message msg) {
long delaySoFar = SystemClock.elapsedRealtime() - mDisabledTimestamp;
- if (delaySoFar > mReEnableDelayMillis) {
+ if (delaySoFar >= mReEnableDelayMillis) {
return false;
}
@@ -550,7 +550,7 @@ class WifiController extends StateMachine {
private boolean doDeferEnable(Message msg) {
long delaySoFar = SystemClock.elapsedRealtime() - mDisabledTimestamp;
- if (delaySoFar > mReEnableDelayMillis) {
+ if (delaySoFar >= mReEnableDelayMillis) {
return false;
}