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

Commit 4fbc92df authored by Alisher Alikhodjaev's avatar Alisher Alikhodjaev
Browse files

Rename onRfFieldActivated to onRfFieldDetected per API review

Bug: 364735914
Test: atest
Change-Id: Ide63d58e1289c970d58cdd362f539c405eb13278
parent 19adfc0f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ package android.nfc {
    method public void onNdefRead(@NonNull java.util.function.Consumer<java.lang.Boolean>);
    method public void onReaderOptionChanged(boolean);
    method public void onRfDiscoveryStarted(boolean);
    method public void onRfFieldActivated(boolean);
    method public void onRfFieldDetected(boolean);
    method public void onRoutingChanged(@NonNull java.util.function.Consumer<java.lang.Boolean>);
    method public void onRoutingTableFull();
    method public void onStateUpdated(int);
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ interface INfcOemExtensionCallback {
   void onHceEventReceived(int action);
   void onReaderOptionChanged(boolean enabled);
   void onCardEmulationActivated(boolean isActivated);
   void onRfFieldActivated(boolean isActivated);
   void onRfFieldDetected(boolean isActive);
   void onRfDiscoveryStarted(boolean isDiscoveryStarted);
   void onEeListenActivated(boolean isActivated);
   void onEeUpdated();
+7 −7
Original line number Diff line number Diff line
@@ -408,12 +408,12 @@ public final class NfcOemExtension {
        void onCardEmulationActivated(boolean isActivated);

        /**
        * Notifies the Remote NFC Endpoint RF Field is activated.
        * Notifies the Remote NFC Endpoint RF Field is detected.
        * NFC Forum NCI-2.3 ch.5.3 specification
        *
        * @param isActivated true, if RF Field is ON, else RF Field is OFF.
        * @param isActive true, if RF Field is ON, else RF Field is OFF.
        */
        void onRfFieldActivated(boolean isActivated);
        void onRfFieldDetected(boolean isActive);

        /**
        * Notifies the NFC RF discovery is started or in the IDLE state.
@@ -596,7 +596,7 @@ public final class NfcOemExtension {
            Log.i(TAG, "updateNfCState");
            executor.execute(() -> {
                callback.onCardEmulationActivated(mCardEmulationActivated);
                callback.onRfFieldActivated(mRfFieldActivated);
                callback.onRfFieldDetected(mRfFieldActivated);
                callback.onRfDiscoveryStarted(mRfDiscoveryStarted);
                callback.onEeListenActivated(mEeListenActivated);
            });
@@ -936,10 +936,10 @@ public final class NfcOemExtension {
        }

        @Override
        public void onRfFieldActivated(boolean isActivated) throws RemoteException {
            mRfFieldActivated = isActivated;
        public void onRfFieldDetected(boolean isActive) throws RemoteException {
            mRfFieldActivated = isActive;
            mCallbackMap.forEach((cb, ex) ->
                    handleVoidCallback(isActivated, cb::onRfFieldActivated, ex));
                    handleVoidCallback(isActive, cb::onRfFieldDetected, ex));
        }

        @Override