nfc(api): Restore behavior from Android T
When Nfc service is not ready, dont fetch NfcManager to avoid getting into a state where the app keeps getting a bad NfcManager. Restoring the fix from aosp/1498599. Bug: 286025476 Change-Id: I4aaa0a87c38eaddccc566c18b75cd1acedc29d75 Test: Manual tests
This commit is contained in:
@@ -711,6 +711,7 @@ public final class NfcAdapter {
|
||||
/* Stale sService pointer */
|
||||
if (sIsInitialized) sIsInitialized = false;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/* Try to initialize the service */
|
||||
NfcManager manager = (NfcManager) context.getSystemService(Context.NFC_SERVICE);
|
||||
|
||||
Reference in New Issue
Block a user