summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorSunil Jogi <sunil.jogi@nxp.com>2012-04-10 12:55:29 -0700
committerMartijn Coenen <maco@google.com>2012-04-20 12:18:25 -0700
commit290a6967a04f49dc3969dced9f82c1636a7e7902 (patch)
treeb213b43eac2f18e82cc97af94ed5647be30226bc /src/com
parent16c9bd97838d7004f39269290b8a3c147d90d1c7 (diff)
downloadpackages_apps_nfc-290a6967a04f49dc3969dced9f82c1636a7e7902.zip
packages_apps_nfc-290a6967a04f49dc3969dced9f82c1636a7e7902.tar.gz
packages_apps_nfc-290a6967a04f49dc3969dced9f82c1636a7e7902.tar.bz2
Updated disable method
Updated disable method so it can be used for phone shutdown and also can retain the state of NFC Adapter. Change-Id: I216e68b1d08d3e6d97cb82ad13cd3366c480d757
Diffstat (limited to 'src/com')
-rwxr-xr-xsrc/com/android/nfc/NfcService.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java
index aff7e78..ecff25c 100755
--- a/src/com/android/nfc/NfcService.java
+++ b/src/com/android/nfc/NfcService.java
@@ -684,10 +684,13 @@ public class NfcService extends Application implements DeviceHostListener {
}
@Override
- public boolean disable() throws RemoteException {
+ public boolean disable(boolean saveState) throws RemoteException {
NfcService.enforceAdminPerm(mContext);
- saveNfcOnSetting(false);
+ if (saveState) {
+ saveNfcOnSetting(false);
+ }
+
new EnableDisableTask().execute(TASK_DISABLE);
return true;