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,8 +1177,9 @@ public class SettingsActivity extends Activity
|
||||
} else {
|
||||
// Only show if NFC is on and we have the HCE feature
|
||||
NfcAdapter adapter = NfcAdapter.getDefaultAdapter(this);
|
||||
if (!adapter.isEnabled() || !getPackageManager().hasSystemFeature(
|
||||
PackageManager.FEATURE_NFC_HOST_CARD_EMULATION)) {
|
||||
if (adapter == null || !adapter.isEnabled() ||
|
||||
!getPackageManager().hasSystemFeature(
|
||||
PackageManager.FEATURE_NFC_HOST_CARD_EMULATION)) {
|
||||
removeTile = true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user