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

Commit 07d1029d authored by Xin Li's avatar Xin Li
Browse files

Merge tm-dev-plus-aosp-without-vendor@8763363

Bug: 236760014
Merged-In: I1c734eebd8135655752e646c5967e65cfe140c89
Change-Id: I8a8ce42fb40bdb9262d7ca81cca26773419d2da7
parents 8d93f876 79e321b9
Loading
Loading
Loading
Loading
+17 −2
Original line number Diff line number Diff line
@@ -1762,7 +1762,12 @@ public class ImsCall implements ICall {
    public void sendRttMessage(String rttMessage) {
        synchronized(mLockObj) {
            if (mSession == null) {
                loge("sendRttMessage::no session");
                loge("sendRttMessage::no session, ignoring");
                return;
            }
            if (mCallProfile == null || mCallProfile.mMediaProfile == null)  {
                loge("sendRttMessage:: no valid call profile, ignoring");
                return;
            }
            if (!mCallProfile.mMediaProfile.isRttCall()) {
                logi("sendRttMessage::Not an rtt call, ignoring");
@@ -1781,7 +1786,12 @@ public class ImsCall implements ICall {

        synchronized(mLockObj) {
            if (mSession == null) {
                loge("sendRttModifyRequest::no session");
                loge("sendRttModifyRequest::no session, ignoring");
                return;
            }
            if (mCallProfile == null || mCallProfile.mMediaProfile == null)  {
                loge("sendRttModifyRequest:: no valid call profile, ignoring");
                return;
            }
            if (rttOn && mCallProfile.mMediaProfile.isRttCall()) {
                logi("sendRttModifyRequest::Already RTT call, ignoring request to turn on.");
@@ -1815,6 +1825,11 @@ public class ImsCall implements ICall {
        synchronized(mLockObj) {
            if (mSession == null) {
                loge("sendRttModifyResponse::no session");
                return;
            }
            if (mCallProfile == null || mCallProfile.mMediaProfile == null)  {
                loge("sendRttModifyResponse:: no valid call profile, ignoring");
                return;
            }
            if (mCallProfile.mMediaProfile.isRttCall()) {
                logi("sendRttModifyResponse::Already RTT call, ignoring.");
+7 −6
Original line number Diff line number Diff line
@@ -18,14 +18,10 @@ package com.android.ims;

import android.content.Context;
import android.os.IInterface;
import android.os.Looper;
import android.os.RemoteCallbackList;
import android.telephony.SubscriptionManager;
import android.util.Log;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

public abstract class ImsCallbackAdapterManager<T extends IInterface> {
    private static final String TAG = "ImsCallbackAM";
@@ -67,10 +63,15 @@ public abstract class ImsCallbackAdapterManager<T extends IInterface> {
        }
        if (mSubId != subId) {
            // In some cases, telephony has changed sub id and IMS is still catching up to the
            // state change. Since some devices do not check for IMS READY state before adding
            // callbacks, still allow this condition.
            // state change. Ensure that the device does not try to register a callback on an
            // inactive subscription, because this can cause a condition where we remove the
            // callback invisibly when the new subscription loads. Instead, simulate the existing
            // IllegalStateException that happens when the ImsService is not ready/active for
            // backwards compatibility.
            Log.w(TAG + " [" + mSlotId + ", " + mSubId + "]", "add callback: inactive"
                    + " subID detected: " + subId);
            throw new IllegalStateException("ImsService is not available for the subscription "
                    + "specified.");
        }
        synchronized (mLock) {
            addCallback(localCallback);
+164 −113

File changed.

Preview size limit exceeded, changes collapsed.

+10 −8
Original line number Diff line number Diff line
@@ -87,9 +87,10 @@ public class MmTelFeatureConnection extends FeatureConnection {
            if (imsRegistration != null) {
                try {
                    imsRegistration.removeRegistrationCallback(localCallback);
                } catch (RemoteException e) {
                } catch (RemoteException | IllegalStateException e) {
                    Log.w(TAG + " [" + mSlotId + "]", "ImsRegistrationCallbackAdapter -"
                            + " unregisterCallback: couldn't remove registration callback");
                            + " unregisterCallback: couldn't remove registration callback"
                            + " Exception: " + e.getMessage());
                }
            } else {
                Log.e(TAG + " [" + mSlotId + "]", "ImsRegistrationCallbackAdapter: ImsRegistration"
@@ -145,9 +146,9 @@ public class MmTelFeatureConnection extends FeatureConnection {
            if (binder != null) {
                try {
                    binder.removeCapabilityCallback(localCallback);
                } catch (RemoteException e) {
                } catch (RemoteException | IllegalStateException e) {
                    Log.w(TAG + " [" + mSlotId + "]", "CapabilityCallbackManager, unregister:"
                            + " Binder is dead.");
                            + " Binder is dead. Exception: " + e.getMessage());
                }
            } else {
                Log.w(TAG + " [" + mSlotId + "]", "CapabilityCallbackManager, unregister:"
@@ -187,9 +188,9 @@ public class MmTelFeatureConnection extends FeatureConnection {
            }
            try {
                binder.removeImsConfigCallback(localCallback);
            } catch (RemoteException e) {
            } catch (RemoteException | IllegalStateException e) {
                Log.w(TAG + " [" + mSlotId + "]", "ProvisioningCallbackManager - couldn't"
                        + " unregister, binder is dead.");
                        + " unregister, binder is dead. Exception: " + e.getMessage());
            }
        }
    }
@@ -322,8 +323,9 @@ public class MmTelFeatureConnection extends FeatureConnection {
                    mMultiEndpoint.getInterface().setExternalCallStateListener(null);
                    mMultiEndpoint = new BinderAccessState<>(BinderAccessState.STATE_NOT_SET);
                }
            } catch (RemoteException e) {
                Log.w(TAG + " [" + mSlotId + "]", "closeConnection: couldn't remove listeners!");
            } catch (RemoteException | IllegalStateException e) {
                Log.w(TAG + " [" + mSlotId + "]", "closeConnection: couldn't remove listeners!" +
                        " Exception: " + e.getMessage());
            }
        }
    }
+5 −3

File changed.

Preview size limit exceeded, changes collapsed.

Loading