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

Commit 7fd1f110 authored by Brad Ebinger's avatar Brad Ebinger
Browse files

Ensure create/destroy is called properly for Capability Exchange API

We were mistakenly not calling the destroy API properly for Capability
Exchange API when the listener passed in was null. Instead we were calling
destroy -> create. This was causing us to call destroy -> create
over 4 times when switching SIMs.

Bug: 228278638
Test: manual PUBLISH verification on TMO, atest FrameworksTelephonyTests
Change-Id: If374f8306add45e60f64fa4031af31c8f448bb22
parent ddb4ee44
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -118,8 +118,10 @@ public class RcsFeature extends ImsFeature {
        @Override
        public void setCapabilityExchangeEventListener(
                @Nullable ICapabilityExchangeEventListener listener) throws RemoteException {
            CapabilityExchangeEventListener listenerWrapper =
                    new CapabilityExchangeAidlWrapper(listener);
            // Set the listener wrapper to null if the listener passed in is null. This will notify
            // the RcsFeature to trigger the destruction of active capability exchange interface.
            CapabilityExchangeEventListener listenerWrapper = listener != null
                    ? new CapabilityExchangeAidlWrapper(listener) : null;
            executeMethodAsync(() -> mReference.setCapabilityExchangeEventListener(listenerWrapper),
                    "setCapabilityExchangeEventListener");
        }