commit | 267419ff8b6a0458c098a1787e11df2bc9ddb38a | [log] [tgz] |
---|---|---|
author | Nick Pelly <npelly@google.com> | Thu Dec 09 19:39:58 2010 -0800 |
committer | Nick Pelly <npelly@google.com> | Thu Dec 09 19:39:58 2010 -0800 |
tree | d0a1eb8d130f51b5c3bf59f272127d1ab4c381f9 | |
parent | 2a7c542594e37f61e25fec7f441eb0a8dc14fd62 [diff] |
Update Settings for new NfcAdapter.getDefaultAdapter(Context) Change-Id: I3321d9ebd90313f98664d66b53bb36690808911a
diff --git a/src/com/android/settings/WirelessSettings.java b/src/com/android/settings/WirelessSettings.java index 85cd546..04faa0f 100644 --- a/src/com/android/settings/WirelessSettings.java +++ b/src/com/android/settings/WirelessSettings.java
@@ -123,7 +123,7 @@ } // Remove NFC if its not available - if (NfcAdapter.getDefaultAdapter() == null) { + if (NfcAdapter.getDefaultAdapter(this) == null) { getPreferenceScreen().removePreference(nfc); }
diff --git a/src/com/android/settings/nfc/NfcEnabler.java b/src/com/android/settings/nfc/NfcEnabler.java index e3a44b7..d1cec13 100644 --- a/src/com/android/settings/nfc/NfcEnabler.java +++ b/src/com/android/settings/nfc/NfcEnabler.java
@@ -60,7 +60,7 @@ public NfcEnabler(Context context, CheckBoxPreference checkBoxPreference) { mContext = context; mCheckbox = checkBoxPreference; - mNfcAdapter = NfcAdapter.getDefaultAdapter(); + mNfcAdapter = NfcAdapter.getDefaultAdapter(context); if (mNfcAdapter == null) { // NFC is not supported