Use NfcAdapter#getDefaultAdapter in NfcTile

This uses the default adapter to match the one used by Settings.

Fixes: 143194158
Test: manual, add tile
Change-Id: If4534cd33adb2c031e1f2f3e1f83995d1b10844c
This commit is contained in:
Fabian Kozynski
2019-11-22 13:19:48 -05:00
parent dbaa215753
commit 19dac3d925

View File

@@ -132,7 +132,7 @@ public class NfcTile extends QSTileImpl<BooleanState> {
private NfcAdapter getAdapter() {
if (mAdapter == null) {
try {
mAdapter = NfcAdapter.getNfcAdapter(mContext);
mAdapter = NfcAdapter.getDefaultAdapter(mContext);
} catch (UnsupportedOperationException e) {
mAdapter = null;
}