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

Commit 742bba0d authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "nfc(api): Add a callback for onEeUpdated" into main

parents eaba7be2 91caa0ed
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@ package android.nfc {
    method public void onDisableRequested(@NonNull java.util.function.Consumer<java.lang.Boolean>);
    method public void onDisableStarted();
    method public void onEeListenActivated(boolean);
    method public void onEeUpdated();
    method public void onEnableFinished(int);
    method public void onEnableRequested(@NonNull java.util.function.Consumer<java.lang.Boolean>);
    method public void onEnableStarted();
+1 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ interface INfcOemExtensionCallback {
   void onRfFieldActivated(boolean isActivated);
   void onRfDiscoveryStarted(boolean isDiscoveryStarted);
   void onEeListenActivated(boolean isActivated);
   void onEeUpdated();
   void onGetOemAppSearchIntent(in List<String> firstPackage, in ResultReceiver intentConsumer);
   void onNdefMessage(in Tag tag, in NdefMessage message, in ResultReceiver hasOemExecutableContent);
   void onLaunchHceAppChooserActivity(in String selectedAid, in List<ApduServiceInfo> services, in ComponentName failedComponent, in String category);
+15 −0
Original line number Diff line number Diff line
@@ -366,6 +366,15 @@ public final class NfcOemExtension {
        */
        void onEeListenActivated(boolean isActivated);

        /**
        * Notifies that some NFCEE (NFC Execution Environment) has been updated.
        *
        * <p> This indicates that some applet has been installed/updated/removed in
        * one of the NFCEE's.
        * </p>
        */
        void onEeUpdated();

        /**
         * Gets the intent to find the OEM package in the OEM App market. If the consumer returns
         * {@code null} or a timeout occurs, the intent from the first available package will be
@@ -829,6 +838,12 @@ public final class NfcOemExtension {
                    handleVoidCallback(isActivated, cb::onEeListenActivated, ex));
        }

        @Override
        public void onEeUpdated() throws RemoteException {
            mCallbackMap.forEach((cb, ex) ->
                    handleVoidCallback(null, (Object input) -> cb.onEeUpdated(), ex));
        }

        @Override
        public void onStateUpdated(int state) throws RemoteException {
            mCallbackMap.forEach((cb, ex) ->