summaryrefslogtreecommitdiffstats
path: root/nci
diff options
context:
space:
mode:
authorEvan Chu <evanchu@broadcom.com>2012-09-24 23:36:46 -0400
committerMartijn Coenen <maco@google.com>2012-09-25 18:22:21 -0700
commit5b26e322575a1c32595ec77cde3542a88065b2be (patch)
treea96ea8fd4c03b2965ea3d9e94a0c22e3d3abce18 /nci
parent46974c09ec89cea00242bb94fe8a3a356b239c18 (diff)
downloadpackages_apps_nfc-5b26e322575a1c32595ec77cde3542a88065b2be.zip
packages_apps_nfc-5b26e322575a1c32595ec77cde3542a88065b2be.tar.gz
packages_apps_nfc-5b26e322575a1c32595ec77cde3542a88065b2be.tar.bz2
Don't try to set low-power mode if NFA_enable fails.
Would otherwise cause stack hang. Bug: 7214014 Change-Id: I5a5373f389b06b873cee1c1fb694502d7ad598b3
Diffstat (limited to 'nci')
-rwxr-xr-xnci/jni/NativeNfcManager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/nci/jni/NativeNfcManager.cpp b/nci/jni/NativeNfcManager.cpp
index c3e76fa..eee8aae 100755
--- a/nci/jni/NativeNfcManager.cpp
+++ b/nci/jni/NativeNfcManager.cpp
@@ -720,7 +720,8 @@ static jboolean nfcManager_doInitialize (JNIEnv* e, jobject o)
}
TheEnd:
- PowerSwitch::getInstance ().setLevel (PowerSwitch::LOW_POWER);
+ if (sIsNfaEnabled)
+ PowerSwitch::getInstance ().setLevel (PowerSwitch::LOW_POWER);
ALOGD ("%s: exit", __FUNCTION__);
return sIsNfaEnabled ? JNI_TRUE : JNI_FALSE;
}