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

Commit bf371a94 authored by Priyanka Advani's avatar Priyanka Advani Committed by Android (Google) Code Review
Browse files

Revert "Add SimultaneousCallingTracker"

Revert submission 25956237-simultaneous-calling-tracker

Reason for revert: Probable culprit for b/326212561. Will be verifying through ABTD for confirmation and before submitting the revert.

Reverted changes: /q/submissionid:25956237-simultaneous-calling-tracker

Change-Id: If95751c2e95afed5f551ec018cd65aca21d5524b
parent 8bd529a8
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
package com.android.internal.telephony;

import static android.telephony.TelephonyManager.HAL_SERVICE_RADIO;
import static android.telephony.ims.ImsService.CAPABILITY_SUPPORTS_SIMULTANEOUS_CALLING;

import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -4621,20 +4620,6 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        }
    }

    public boolean isImsServiceSimultaneousCallingSupportCapable(Context context) {
        if (!mFeatureFlags.simultaneousCallingIndications()) return false;
        boolean capable = false;
        ImsManager imsManager = ImsManager.getInstance(context, mPhoneId);
        if (imsManager != null) {
            try {
                capable = imsManager.isCapable(CAPABILITY_SUPPORTS_SIMULTANEOUS_CALLING);
            } catch (ImsException e) {
                loge("initializeTerminalBasedCallWaiting : exception " + e);
            }
        }
        return capable;
    }

    public void startRingbackTone() {
    }

+1 −58
Original line number Diff line number Diff line
@@ -49,7 +49,6 @@ import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.function.Consumer;
import java.util.stream.Collectors;

@@ -75,25 +74,6 @@ public class PhoneConfigurationManager {
    private static final int EVENT_GET_SIMULTANEOUS_CALLING_SUPPORT_DONE = 105;
    private static final int EVENT_SIMULTANEOUS_CALLING_SUPPORT_CHANGED = 106;

    /**
     * Listener interface for events related to the {@link PhoneConfigurationManager} which should
     * be reported to the {@link SimultaneousCallingTracker}.
     */
    public interface Listener {
        public void onPhoneCapabilityChanged();
        public void onDeviceConfigChanged();
    }

    /**
     * Base listener implementation.
     */
    public abstract static class ListenerBase implements Listener {
        @Override
        public void onPhoneCapabilityChanged() {}
        @Override
        public void onDeviceConfigChanged() {}
    }


    private static PhoneConfigurationManager sInstance = null;
    private final Context mContext;
@@ -115,8 +95,6 @@ public class PhoneConfigurationManager {
    @NonNull
    private final FeatureFlags mFeatureFlags;
    private final DefaultPhoneNotifier mNotifier;
    public Set<Listener> mListeners = new CopyOnWriteArraySet<>();

    /**
     * True if 'Virtual DSDA' i.e., in-call IMS connectivity on both subs with only single logical
     * modem, is enabled.
@@ -177,24 +155,6 @@ public class PhoneConfigurationManager {
        }
    }

    /**
     * Assign a listener to be notified of state changes.
     *
     * @param listener A listener.
     */
    public void addListener(Listener listener) {
        mListeners.add(listener);
    }

    /**
     * Removes a listener.
     *
     * @param listener A listener.
     */
    public final void removeListener(Listener listener) {
        mListeners.remove(listener);
    }

    /**
     * Updates the mapping between the slot IDs that support simultaneous calling and the
     * associated sub IDs as well as notifies listeners.
@@ -345,9 +305,6 @@ public class PhoneConfigurationManager {
                    if (ar != null && ar.exception == null) {
                        mStaticCapability = (PhoneCapability) ar.result;
                        notifyCapabilityChanged();
                        for (Listener l : mListeners) {
                            l.onPhoneCapabilityChanged();
                        }
                        maybeEnableCellularDSDASupport();
                    } else {
                        log(msg.what + " failure. Not getting phone capability." + ar.exception);
@@ -360,9 +317,6 @@ public class PhoneConfigurationManager {
                        log("EVENT_DEVICE_CONFIG_CHANGED: from " + mVirtualDsdaEnabled + " to "
                                + isVirtualDsdaEnabled);
                        mVirtualDsdaEnabled = isVirtualDsdaEnabled;
                        for (Listener l : mListeners) {
                            l.onDeviceConfigChanged();
                        }
                    }
                    break;
                case EVENT_SIMULTANEOUS_CALLING_SUPPORT_CHANGED:
@@ -509,10 +463,7 @@ public class PhoneConfigurationManager {
        return mTelephonyManager.getActiveModemCount();
    }

    /**
     * @return The updated list of logical slots that support simultaneous cellular calling from the
     * modem based on current network conditions.
     */
    @VisibleForTesting
    public Set<Integer> getSlotsSupportingSimultaneousCellularCalls() {
        return mSlotsSupportingSimultaneousCellularCalls;
    }
@@ -559,14 +510,6 @@ public class PhoneConfigurationManager {
        return mStaticCapability.getMaxActiveDataSubscriptions();
    }

    public int getNumberOfModemsWithSimultaneousVoiceConnections() {
        return getStaticPhoneCapability().getMaxActiveVoiceSubscriptions();
    }

    public boolean isVirtualDsdaEnabled() {
        return mVirtualDsdaEnabled;
    }

    /**
     * Register to listen to changes in the Phone slots that support simultaneous calling.
     * @param consumer A consumer that will be used to consume the new slots supporting simultaneous
+0 −5
Original line number Diff line number Diff line
@@ -98,7 +98,6 @@ public class PhoneFactory {
    @UnsupportedAppUsage
    static private Context sContext;
    static private PhoneConfigurationManager sPhoneConfigurationManager;
    static private SimultaneousCallingTracker sSimultaneousCallingTracker;
    static private PhoneSwitcher sPhoneSwitcher;
    static private TelephonyNetworkFactory[] sTelephonyNetworkFactories;
    static private NotificationChannelController sNotificationChannelController;
@@ -258,10 +257,6 @@ public class PhoneFactory {
                }

                sPhoneConfigurationManager = PhoneConfigurationManager.init(sContext, featureFlags);
                if (featureFlags.simultaneousCallingIndications()) {
                    sSimultaneousCallingTracker =
                            SimultaneousCallingTracker.init(sContext, featureFlags);
                }

                sCellularNetworkValidator = CellularNetworkValidator.make(sContext);

Loading