From 7d53d8d0c5903ec8c7da0ace4528a1ad5c2764cf Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Thu, 20 Sep 2012 20:42:52 -0700 Subject: 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 --- src/com/android/nfc/NfcService.java | 8 ++++++-- 1 file 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 { -- cgit v1.1