summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2012-09-20 20:42:52 -0700
committerThe Android Automerger <android-build@android.com>2012-09-21 15:43:55 -0700
commit7d53d8d0c5903ec8c7da0ace4528a1ad5c2764cf (patch)
tree55cfb0dc55b781a3b9745f0a31389e99a1aa1453
parent435d7aa4012bded7b1b018843875ef2fbf7eaf2c (diff)
downloadpackages_apps_nfc-7d53d8d0c5903ec8c7da0ace4528a1ad5c2764cf.zip
packages_apps_nfc-7d53d8d0c5903ec8c7da0ace4528a1ad5c2764cf.tar.gz
packages_apps_nfc-7d53d8d0c5903ec8c7da0ace4528a1ad5c2764cf.tar.bz2
Don't hold the routing wakelock longer than a minute.
Until we figure out why routing gets stuck, don't hold the wakelock indefinitely. Bug: 7113095 Change-Id: If4d1ed8d8855e2b50ddae6d06e886faf0d58db6d
-rwxr-xr-xsrc/com/android/nfc/NfcService.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java
index e8fc9e4..ca1713d 100755
--- a/src/com/android/nfc/NfcService.java
+++ b/src/com/android/nfc/NfcService.java
@@ -1420,7 +1420,7 @@ public class NfcService extends Application implements DeviceHostListener {
synchronized (this) {
if (!mWatchDogCanceled) {
// Trigger watch-dog
- Log.e(TAG, "Watch dog triggered");
+ Log.e(TAG, "--- NFC controller stuck while applying routing ---");
mDeviceHost.doAbort();
}
}
@@ -1840,7 +1840,11 @@ public class NfcService extends Application implements DeviceHostListener {
}
mScreenState = params[0].intValue();
- mRoutingWakeLock.acquire();
+ // HACK: We've seen applying the routing configuration
+ // getting stuck. The operation should normally easily
+ // complete within a minute, so don't hold the wakelock
+ // any longer than that.
+ mRoutingWakeLock.acquire(60000);
try {
applyRouting(false);
} finally {