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

Change-Id: I518389a317a4e9ab9009fd33330a91f7c35edc2a
Signed-off-by: Nick Pelly <npelly@google.com>
This commit is contained in:
Nick Pelly
2010-10-15 01:19:43 -07:00
parent d3abea0d70
commit a57eacef3c

View File

@@ -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);
}