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

Commit ec0d7029 authored by joonhunshin's avatar joonhunshin Committed by Joonhun Shin
Browse files

Block PUBLISH execution when the MmTel registered to avoid multiple

PUBLISH triggers.

Block PUBLISH execution when the MmTel registered to avoid multiple
PUBLISH tiggers. But PUBLISH will perform when Capability changed callback
is called.

Bug: 243163530
Test: atest DeviceCapabilityListenerTest
Test: manually
1. MmTel registered
2. Airplan mode on - off
3. Check publish trigger

Change-Id: I6c0cb370a0eb0c587c8dea63338f6cc6eb9a0e77
parent 08b1a563
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -590,9 +590,9 @@ public class DeviceCapabilityListener {
     * This method is called when the MMTEL is registered.
     */
    private void handleImsMmtelRegistered(int imsTransportType) {
        // update capability, but not trigger PUBLISH message.
        // PUBLISH message will be sent when the Capability status changed callback is called.
        mCapabilityInfo.updateImsMmtelRegistered(imsTransportType);
        mHandler.sendTriggeringPublishMessage(
                PublishController.PUBLISH_TRIGGER_MMTEL_REGISTERED);
    }

    /*
+2 −1
Original line number Diff line number Diff line
@@ -154,7 +154,8 @@ public class DeviceCapabilityListenerTest extends ImsTestBase {
        waitForHandlerActionDelayed(handler, HANDLER_WAIT_TIMEOUT_MS, HANDLER_SENT_DELAY_MS);

        verify(mDeviceCapability).updateImsMmtelRegistered(1);
        verify(mCallback).requestPublishFromInternal(
        // update capability, but not trigger PUBLISH message when MmTel registered.
        verify(mCallback, never()).requestPublishFromInternal(
                PublishController.PUBLISH_TRIGGER_MMTEL_REGISTERED);
    }