summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Roshan Pius <rpius@google.com> 2024-11-04 18:39:53 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-11-04 18:39:53 +0000
commitca38f9f1feb506e682385fadbce12bb94f39c4f8 (patch)
tree6e1e9ec97be6dee879fb473d303f39c68b6e3b19
parent6f770c6ce89951f12d527b8a0bc79814bd412cab (diff)
parenta8e68369afd2c0bca8ef27907c176e3736b4cee3 (diff)
Merge "nfc(api): Remove Tag from onTagConnected callback" into main
-rw-r--r--nfc/api/system-current.txt2
-rw-r--r--nfc/java/android/nfc/INfcOemExtensionCallback.aidl2
-rw-r--r--nfc/java/android/nfc/NfcOemExtension.java7
3 files changed, 5 insertions, 6 deletions
diff --git a/nfc/api/system-current.txt b/nfc/api/system-current.txt
index 24e14e69637b..80aa7d765085 100644
--- a/nfc/api/system-current.txt
+++ b/nfc/api/system-current.txt
@@ -105,7 +105,7 @@ package android.nfc {
method public void onRfFieldActivated(boolean);
method public void onRoutingChanged();
method public void onStateUpdated(int);
- method public void onTagConnected(boolean, @NonNull android.nfc.Tag);
+ method public void onTagConnected(boolean);
method public void onTagDispatch(@NonNull java.util.function.Consumer<java.lang.Boolean>);
}
diff --git a/nfc/java/android/nfc/INfcOemExtensionCallback.aidl b/nfc/java/android/nfc/INfcOemExtensionCallback.aidl
index 48c7ee659266..7d0837a9b096 100644
--- a/nfc/java/android/nfc/INfcOemExtensionCallback.aidl
+++ b/nfc/java/android/nfc/INfcOemExtensionCallback.aidl
@@ -27,7 +27,7 @@ import java.util.List;
* @hide
*/
interface INfcOemExtensionCallback {
- void onTagConnected(boolean connected, in Tag tag);
+ void onTagConnected(boolean connected);
void onStateUpdated(int state);
void onApplyRouting(in ResultReceiver isSkipped);
void onNdefRead(in ResultReceiver isSkipped);
diff --git a/nfc/java/android/nfc/NfcOemExtension.java b/nfc/java/android/nfc/NfcOemExtension.java
index 474ff8c663e6..0a4c488f6b47 100644
--- a/nfc/java/android/nfc/NfcOemExtension.java
+++ b/nfc/java/android/nfc/NfcOemExtension.java
@@ -195,9 +195,8 @@ public final class NfcOemExtension {
* ex - if tag is connected notify cover and Nfctest app if app is in testing mode
*
* @param connected status of the tag true if tag is connected otherwise false
- * @param tag Tag details
*/
- void onTagConnected(boolean connected, @NonNull Tag tag);
+ void onTagConnected(boolean connected);
/**
* Update the Nfc Adapter State
@@ -684,9 +683,9 @@ public final class NfcOemExtension {
private final class NfcOemExtensionCallback extends INfcOemExtensionCallback.Stub {
@Override
- public void onTagConnected(boolean connected, Tag tag) throws RemoteException {
+ public void onTagConnected(boolean connected) throws RemoteException {
mCallbackMap.forEach((cb, ex) ->
- handleVoid2ArgCallback(connected, tag, cb::onTagConnected, ex));
+ handleVoidCallback(connected, cb::onTagConnected, ex));
}
@Override