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

Commit 26d6e470 authored by Nick Pelly's avatar Nick Pelly Committed by Android Git Automerger
Browse files

am 781c0aa2: Merge "NFC Settings cleanup." into gingerbread

Merge commit '781c0aa2' into gingerbread-plus-aosp

* commit '781c0aa2':
  NFC Settings cleanup.
parents 149fec6a 781c0aa2
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -77,8 +77,7 @@ public class NfcEnabler implements Preference.OnPreferenceChangeListener {
        }
        mContext.registerReceiver(mReceiver, mIntentFilter);
        mCheckbox.setOnPreferenceChangeListener(this);
        mNfcState = Settings.System.getInt(mContext.getContentResolver(),
                Settings.System.NFC_ON, 0) != 0;
        mNfcState = mNfcAdapter.isEnabled();
        mCheckbox.setChecked(mNfcState);
    }

@@ -103,9 +102,9 @@ public class NfcEnabler implements Preference.OnPreferenceChangeListener {
                Log.d(TAG, "Setting NFC enabled state to: " + desiredState);
                boolean success = false;
                if (desiredState) {
                    success = mNfcAdapter.enableTagDiscovery();
                    success = mNfcAdapter.enable();
                } else {
                    success = mNfcAdapter.disableTagDiscovery();
                    success = mNfcAdapter.disable();
                }
                if (success) {
                    Log.d(TAG, "Successfully changed NFC enabled state to " + desiredState);