am c1286804: Merge "Update Settings for new NfcAdapter.getDefaultAdapter(Context)" into gingerbread

* commit 'c1286804cc839ec7006d6e9651c73ec7b3180157':
  Update Settings for new NfcAdapter.getDefaultAdapter(Context)
This commit is contained in:
Nick Pelly
2010-12-10 17:22:30 -08:00
committed by Android Git Automerger
2 changed files with 2 additions and 2 deletions

View File

@@ -123,7 +123,7 @@ public class WirelessSettings extends PreferenceActivity {
}
// Remove NFC if its not available
if (NfcAdapter.getDefaultAdapter() == null) {
if (NfcAdapter.getDefaultAdapter(this) == null) {
getPreferenceScreen().removePreference(nfc);
}

View File

@@ -60,7 +60,7 @@ public class NfcEnabler implements Preference.OnPreferenceChangeListener {
public NfcEnabler(Context context, CheckBoxPreference checkBoxPreference) {
mContext = context;
mCheckbox = checkBoxPreference;
mNfcAdapter = NfcAdapter.getDefaultAdapter();
mNfcAdapter = NfcAdapter.getDefaultAdapter(context);
if (mNfcAdapter == null) {
// NFC is not supported