summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Chu <evanchu@broadcom.com>2012-09-25 18:46:01 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-09-25 18:46:01 -0700
commitc15561c2be87dec34f6b5df8db2e497c7b3f2604 (patch)
treef18598f98a90c5649479597d25c51e30dc1089d3
parent7314bbedd6b1964f2082133f4c5dedc48cb8f986 (diff)
parent5b26e322575a1c32595ec77cde3542a88065b2be (diff)
downloadpackages_apps_nfc-c15561c2be87dec34f6b5df8db2e497c7b3f2604.zip
packages_apps_nfc-c15561c2be87dec34f6b5df8db2e497c7b3f2604.tar.gz
packages_apps_nfc-c15561c2be87dec34f6b5df8db2e497c7b3f2604.tar.bz2
am 5b26e322: Don\'t try to set low-power mode if NFA_enable fails.
* commit '5b26e322575a1c32595ec77cde3542a88065b2be': Don't try to set low-power mode if NFA_enable fails.
-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;
}