Update Settings for new NfcAdapter.getDefaultAdapter(Context)
Change-Id: I3321d9ebd90313f98664d66b53bb36690808911a
This commit is contained in:
@@ -123,7 +123,7 @@ public class WirelessSettings extends PreferenceActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove NFC if its not available
|
// Remove NFC if its not available
|
||||||
if (NfcAdapter.getDefaultAdapter() == null) {
|
if (NfcAdapter.getDefaultAdapter(this) == null) {
|
||||||
getPreferenceScreen().removePreference(nfc);
|
getPreferenceScreen().removePreference(nfc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -60,7 +60,7 @@ public class NfcEnabler implements Preference.OnPreferenceChangeListener {
|
|||||||
public NfcEnabler(Context context, CheckBoxPreference checkBoxPreference) {
|
public NfcEnabler(Context context, CheckBoxPreference checkBoxPreference) {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
mCheckbox = checkBoxPreference;
|
mCheckbox = checkBoxPreference;
|
||||||
mNfcAdapter = NfcAdapter.getDefaultAdapter();
|
mNfcAdapter = NfcAdapter.getDefaultAdapter(context);
|
||||||
|
|
||||||
if (mNfcAdapter == null) {
|
if (mNfcAdapter == null) {
|
||||||
// NFC is not supported
|
// NFC is not supported
|
||||||
|
Reference in New Issue
Block a user