Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a8e68369 authored by Roshan Pius's avatar Roshan Pius
Browse files

nfc(api): Remove Tag from onTagConnected callback

The Tag object is not needed by the OEM extension.

Bug: 375992221
Change-Id: I042eb55e0fde09c23ed18afd0cb4981e9c4ab488
Test: TH
parent 2e758c40
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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>);
  }

+1 −1
Original line number Diff line number Diff line
@@ -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);
+3 −4
Original line number Diff line number Diff line
@@ -188,9 +188,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
@@ -677,9 +676,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