Fix bug #17624121 Settings crash while launching on wiped device
- check for non null reference returned by NfcAdapter.getDefaultAdapter(this) Change-Id: I88776dbefd351ce1c77cfed6d14b8b2143294488
This commit is contained in:
@@ -1177,7 +1177,8 @@ public class SettingsActivity extends Activity
|
|||||||
} else {
|
} else {
|
||||||
// Only show if NFC is on and we have the HCE feature
|
// Only show if NFC is on and we have the HCE feature
|
||||||
NfcAdapter adapter = NfcAdapter.getDefaultAdapter(this);
|
NfcAdapter adapter = NfcAdapter.getDefaultAdapter(this);
|
||||||
if (!adapter.isEnabled() || !getPackageManager().hasSystemFeature(
|
if (adapter == null || !adapter.isEnabled() ||
|
||||||
|
!getPackageManager().hasSystemFeature(
|
||||||
PackageManager.FEATURE_NFC_HOST_CARD_EMULATION)) {
|
PackageManager.FEATURE_NFC_HOST_CARD_EMULATION)) {
|
||||||
removeTile = true;
|
removeTile = true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user