diff options
author | Sunil Jogi <sunil.jogi@nxp.com> | 2012-04-10 12:55:29 -0700 |
---|---|---|
committer | Martijn Coenen <maco@google.com> | 2012-04-20 12:18:25 -0700 |
commit | 290a6967a04f49dc3969dced9f82c1636a7e7902 (patch) | |
tree | b213b43eac2f18e82cc97af94ed5647be30226bc /src/com | |
parent | 16c9bd97838d7004f39269290b8a3c147d90d1c7 (diff) | |
download | packages_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-x | src/com/android/nfc/NfcService.java | 7 |
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; |