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

Commit 4fa32929 authored by Thomas Stuart's avatar Thomas Stuart Committed by Android (Google) Code Review
Browse files

Merge "handle 2 calls from the same app case in VoipCallMonitor" into main

parents 2d221151 3ed1a692
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -46,5 +46,6 @@ aconfig_declarations {
        "telecom_headless_system_user_mode.aconfig",
        "telecom_session_flags.aconfig",
        "telecom_metrics_flags.aconfig",
        "telecom_voip_flags.aconfig",
    ],
}
+13 −0
Original line number Diff line number Diff line
package: "com.android.server.telecom.flags"
container: "system"

# OWNER=tjstuart TARGET=25Q2
flag {
  name: "voip_call_monitor_refactor"
  namespace: "telecom"
  description: "VoipCallMonitor reworked to handle multi calling scenarios for the same app"
  bug: "381129034"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}
 No newline at end of file
+0 −1
Original line number Diff line number Diff line
@@ -1883,7 +1883,6 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
        return mTargetPhoneAccountHandle;
    }

    @VisibleForTesting
    public PhoneAccountHandle getTargetPhoneAccount() {
        return mTargetPhoneAccountHandle;
    }
+16 −3
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@ import com.android.server.telecom.ui.IncomingCallNotifier;
import com.android.server.telecom.ui.ToastFactory;
import com.android.server.telecom.callsequencing.voip.VoipCallMonitor;
import com.android.server.telecom.callsequencing.TransactionManager;
import com.android.server.telecom.callsequencing.voip.VoipCallMonitorLegacy;

import java.util.ArrayList;
import java.util.Arrays;
@@ -488,6 +489,7 @@ public class CallsManager extends Call.ListenerBase
    private final EmergencyCallHelper mEmergencyCallHelper;
    private final RoleManagerAdapter mRoleManagerAdapter;
    private final VoipCallMonitor mVoipCallMonitor;
    private final VoipCallMonitorLegacy mVoipCallMonitorLegacy;
    private final CallEndpointController mCallEndpointController;
    private final CallAnomalyWatchdog mCallAnomalyWatchdog;

@@ -763,12 +765,18 @@ public class CallsManager extends Call.ListenerBase
        mClockProxy = clockProxy;
        mToastFactory = toastFactory;
        mRoleManagerAdapter = roleManagerAdapter;
        mVoipCallMonitor = new VoipCallMonitor(mContext, mLock);
        mTransactionManager = transactionManager;
        mBlockedNumbersAdapter = blockedNumbersAdapter;
        mCallStreamingController = new CallStreamingController(mContext, mLock);
        mCallStreamingNotification = callStreamingNotification;
        mFeatureFlags = featureFlags;
        if (mFeatureFlags.voipCallMonitorRefactor()) {
            mVoipCallMonitor = new VoipCallMonitor(mContext, mLock);
            mVoipCallMonitorLegacy = null;
        } else {
            mVoipCallMonitor = null;
            mVoipCallMonitorLegacy = new VoipCallMonitorLegacy(mContext, mLock);
        }
        mTelephonyFeatureFlags = telephonyFlags;
        mMetricsController = metricsController;
        mBlockedNumbersManager = mFeatureFlags.telecomMainlineBlockedNumbersManager()
@@ -804,13 +812,18 @@ public class CallsManager extends Call.ListenerBase

        // this needs to be after the mCallAudioManager
        mListeners.add(mPhoneStateBroadcaster);
        mListeners.add(mVoipCallMonitor);
        mListeners.add(mCallStreamingNotification);
        if (featureFlags.enableCallAudioWatchdog()) {
            mListeners.add(mCallAudioWatchDog);
        }

        mVoipCallMonitor.startMonitor();
        if (mFeatureFlags.voipCallMonitorRefactor()) {
            mVoipCallMonitor.registerNotificationListener();
            mListeners.add(mVoipCallMonitor);
        } else {
            mVoipCallMonitorLegacy.startMonitor();
            mListeners.add(mVoipCallMonitorLegacy);
        }

        // There is no USER_SWITCHED broadcast for user 0, handle it here explicitly.
        final UserManager userManager = mContext.getSystemService(UserManager.class);
+2 −0
Original line number Diff line number Diff line
@@ -226,6 +226,8 @@ public class LogUtils {
        public static final String FLASH_NOTIFICATION_START = "FLASH_NOTIFICATION_START";
        public static final String FLASH_NOTIFICATION_STOP = "FLASH_NOTIFICATION_STOP";
        public static final String GAINED_FGS_DELEGATION = "GAINED_FGS_DELEGATION";
        public static final String ALREADY_HAS_FGS_DELEGATION = "ALREADY_HAS_FGS_DELEGATION";
        public static final String MAINTAINING_FGS_DELEGATION = "MAINTAINING_FGS_DELEGATION";
        public static final String GAIN_FGS_DELEGATION_FAILED = "GAIN_FGS_DELEGATION_FAILED";
        public static final String LOST_FGS_DELEGATION = "LOST_FGS_DELEGATION";
        public static final String START_STREAMING = "START_STREAMING";
Loading