Merge "Use NfcAdapter.getDefaultAdapter() to check for NFC prescence." into gingerbread

This commit is contained in:
Nick Pelly
2010-10-15 10:56:05 -07:00
committed by Android (Google) Code Review

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