Merge "Revert NFC adapter user context change." into main
diff --git a/nfc/java/android/nfc/NfcAdapter.java b/nfc/java/android/nfc/NfcAdapter.java
index 75f5491..8219d2f 100644
--- a/nfc/java/android/nfc/NfcAdapter.java
+++ b/nfc/java/android/nfc/NfcAdapter.java
@@ -812,8 +812,8 @@
if (context == null) {
throw new IllegalArgumentException("context cannot be null");
}
- Context applicationContext = context.getApplicationContext();
- if (applicationContext == null) {
+ context = context.getApplicationContext();
+ if (context == null) {
throw new IllegalArgumentException(
"context not associated with any application (using a mock context?)");
}