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

Commit 7d391dde authored by Parvathy Shanmugam's avatar Parvathy Shanmugam Committed by Automerger Merge Worker
Browse files

Merge changes from topic "IMS Threading Refactoring" am: ba3f276e am: cdfa9cde

Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/net/ims/+/1965462

Change-Id: Iabad0cc57e9152fa6a441814a84033117e8ecc16
parents fa8a5ff0 cdfa9cde
Loading
Loading
Loading
Loading
+31 −5
Original line number Diff line number Diff line
@@ -29,6 +29,8 @@

package com.android.ims;

import java.util.concurrent.Executor;

/**
 * Listener for receiving notifications about changes to the IMS connection.
 * It provides a state of IMS registration between UE and IMS network, the service
@@ -36,18 +38,42 @@ package com.android.ims;
 *
 * @hide
 */
public class ImsEcbmStateListener {
public abstract class ImsEcbmStateListener {
    protected Executor mListenerExecutor = Runnable::run;
    /**
     * constructor.
     *
     * @param executor the executor that will execute callbacks.
     */
    public ImsEcbmStateListener(Executor executor) {
        if (executor != null)
            mListenerExecutor = executor;
    }
    /**
     * Called when the device enters Emergency Callback Mode
     */
    public void onECBMEntered() {
        // no-op
    public final void onECBMEntered() {
        onECBMEntered(mListenerExecutor);
    }

    /**
     * Called when the device enters Emergency Callback Mode
     *
     * @param executor the executor that will execute callbacks.
     */
    public abstract void onECBMEntered(Executor executor);

    /**
     * Called when the device exits Emergency Callback Mode
     */
    public void onECBMExited() {
        // no-op
    public final void onECBMExited() {
        onECBMExited(mListenerExecutor);
    }

    /**
     * Called when the device exits Emergency Callback Mode
     *
     * @param executor the executor that will execute callbacks.
     */
    public abstract void onECBMExited(Executor executor);
}
+23 −3
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.ims;
import android.telephony.ims.ImsExternalCallState;

import java.util.List;
import java.util.concurrent.Executor;

/**
 * Listener for receiving notifications about {@link ImsExternalCallState} information received
@@ -26,13 +27,32 @@ import java.util.List;
 *
 * @hide
 */
public class ImsExternalCallStateListener {
public abstract class ImsExternalCallStateListener {
    protected Executor mListenerExecutor = Runnable::run;
    /**
     * constructor.
     *
     * @param executor the executor that will execute callbacks.
     */
    public ImsExternalCallStateListener(Executor executor) {
        if (executor != null)
            mListenerExecutor = executor;
    }
    /**
     * Notifies client when Dialog Event Package update is received
     *
     * @param externalCallState the external call state.
     */
    public void onImsExternalCallStateUpdate(List<ImsExternalCallState> externalCallState) {
        // no-op
    public final void onImsExternalCallStateUpdate(List<ImsExternalCallState> externalCallState) {
        onImsExternalCallStateUpdate(externalCallState, mListenerExecutor);
    }
    /**
     * Notifies client when Dialog Event Package update is received
     *
     * @param externalCallState the external call state.
     *
     * @param executor the executor that will execute callbacks.
     */
    public abstract void onImsExternalCallStateUpdate(
        List<ImsExternalCallState> externalCallState, Executor executor);
}