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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user