Merge "Use NfcAdapter#getDefaultAdapter in NfcTile"
This commit is contained in:
committed by
Android (Google) Code Review
commit
118612037b
@@ -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