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

Commit a57eacef authored by Nick Pelly's avatar Nick Pelly
Browse files

Use NfcAdapter.getDefaultAdapter() to check for NFC prescence.



Change-Id: I518389a317a4e9ab9009fd33330a91f7c35edc2a
Signed-off-by: default avatarNick Pelly <npelly@google.com>
parent d3abea0d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.bluetooth.BluetoothAdapter;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.nfc.NfcAdapter;
import android.os.Bundle;
import android.os.ServiceManager;
import android.os.SystemProperties;
@@ -122,7 +123,7 @@ public class WirelessSettings extends PreferenceActivity {
        }

        // Remove NFC if its not available
        if (ServiceManager.getService(Context.NFC_SERVICE) == null) {
        if (NfcAdapter.getDefaultAdapter() == null) {
            getPreferenceScreen().removePreference(nfc);
        }