Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1286804 authored by Nick Pelly's avatar Nick Pelly Committed by Android (Google) Code Review
Browse files

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

parents 99d2471d 267419ff
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
        }

+1 −1
Original line number Diff line number Diff line
@@ -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