diff options
author | Martijn Coenen <maco@google.com> | 2012-10-12 15:06:36 -0700 |
---|---|---|
committer | Martijn Coenen <maco@google.com> | 2012-10-12 15:10:01 -0700 |
commit | 81aa9898af2f99506cb025e9d8e37252d80c42fa (patch) | |
tree | 37171cee55fa4dd7f4da95bd2097ebae439690ba /src | |
parent | 59f43aefee220afd41baa97ce2043017c171be73 (diff) | |
download | packages_apps_nfc-81aa9898af2f99506cb025e9d8e37252d80c42fa.zip packages_apps_nfc-81aa9898af2f99506cb025e9d8e37252d80c42fa.tar.gz packages_apps_nfc-81aa9898af2f99506cb025e9d8e37252d80c42fa.tar.bz2 |
Don't hold a timed wakelock.
We used to acquire a timed wakelock when either resuming
or suspending. We don't want to take a timed wakelock
when suspending, since we want to suspend asap, but also
don't want to underlock the wakelock.
Instead of taking a timed wakelock, just abort
the process in case the NFC controller hangs.
Bug: 7341879
Change-Id: Ibd2f468264f60a39db3cb271a6f05c50dfb559bf
Diffstat (limited to 'src')
-rwxr-xr-x | src/com/android/nfc/NfcService.java | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java index 0514160..c7b0bba 100755 --- a/src/com/android/nfc/NfcService.java +++ b/src/com/android/nfc/NfcService.java @@ -1883,11 +1883,7 @@ public class NfcService implements DeviceHostListener { } mScreenState = params[0].intValue(); - // 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); + mRoutingWakeLock.acquire(); try { applyRouting(false); } finally { |