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

Commit 8a153ec2 authored by Brad Ebinger's avatar Brad Ebinger
Browse files

Adds implementation for the new TelephonyCallback

Adds the impl to pass the HAL state of cellular
simultaneous calling to TelephonyRegistry to notify
listeners.

Bug: 319904227
Test: atest FrameworksTelephonyTests
Change-Id: Iade7b8249b8e02ad8cff2ce92263ab3a3b420a66
parent c200ba47
Loading
Loading
Loading
Loading
+12 −11
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ aconfig_declarations {
    name: "telephony_flags",
    package: "com.android.internal.telephony.flags",
    srcs: [
        "calling.aconfig",
        "data.aconfig",
        "domainselection.aconfig",
        "ims.aconfig",

flags/calling.aconfig

0 → 100644
+8 −0
Original line number Diff line number Diff line
package: "com.android.internal.telephony.flags"

flag {
  name: "simultaneous_calling_indications"
  namespace: "telephony"
  description: "APIs that are used to notify simultaneous calling changes to other applications."
  bug: "297446980"
}
 No newline at end of file
+6 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ import com.android.internal.telephony.flags.FeatureFlags;
import com.android.telephony.Rlog;

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

/**
 * broadcast intents
@@ -300,6 +301,11 @@ public class DefaultPhoneNotifier implements PhoneNotifier {
                sender.getSubId(), linkCapacityEstimateList);
    }

    @Override
    public void notifySimultaneousCellularCallingSubscriptionsChanged(Set<Integer> subIds) {
        mTelephonyRegistryMgr.notifySimultaneousCellularCallingSubscriptionsChanged(subIds);
    }

    @Override
    public void notifyCallbackModeStarted(Phone sender, @EmergencyCallbackModeType int type) {
        mTelephonyRegistryMgr.notifyCallBackModeStarted(sender.getPhoneId(),
+8 −3
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ public class PhoneConfigurationManager {
    /** Feature flags */
    @NonNull
    private final FeatureFlags mFeatureFlags;
    private final DefaultPhoneNotifier mNotifier;
    /**
     * True if 'Virtual DSDA' i.e., in-call IMS connectivity on both subs with only single logical
     * modem, is enabled.
@@ -128,6 +129,7 @@ public class PhoneConfigurationManager {
        mPhoneStatusMap = new HashMap<>();
        mVirtualDsdaEnabled = DeviceConfig.getBoolean(
                DeviceConfig.NAMESPACE_TELEPHONY, KEY_ENABLE_VIRTUAL_DSDA, false);
        mNotifier = new DefaultPhoneNotifier(mContext, mFeatureFlags);
        DeviceConfig.addOnPropertiesChangedListener(
                DeviceConfig.NAMESPACE_TELEPHONY, Runnable::run,
                properties -> {
@@ -294,6 +296,11 @@ public class PhoneConfigurationManager {
                    } else {
                        log(msg.what + " failure. Not getting logical slots that support "
                                + "simultaneous calling." + ar.exception);
                        mSlotsSupportingSimultaneousCellularCalls.clear();
                    }
                    if (mFeatureFlags.simultaneousCallingIndications()) {
                        mNotifier.notifySimultaneousCellularCallingSubscriptionsChanged(
                                mSlotsSupportingSimultaneousCellularCalls);
                    }
                    break;
                default:
@@ -449,9 +456,7 @@ public class PhoneConfigurationManager {
    }

    private void notifyCapabilityChanged() {
        PhoneNotifier notifier = new DefaultPhoneNotifier(mContext, mFeatureFlags);

        notifier.notifyPhoneCapabilityChanged(mStaticCapability);
        mNotifier.notifyPhoneCapabilityChanged(mStaticCapability);
    }

    /**
+4 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ import android.telephony.ims.ImsReasonInfo;
import android.telephony.ims.MediaQualityStatus;

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

/**
 * {@hide}
@@ -149,4 +150,7 @@ public interface PhoneNotifier {
    /** Notify callback mode stopped. */
    void notifyCallbackModeStopped(Phone sender, @EmergencyCallbackModeType int type,
            @EmergencyCallbackModeStopReason int reason);

    /** Notify that simultaneous cellular calling subscriptions have changed */
    void notifySimultaneousCellularCallingSubscriptionsChanged(Set<Integer> subIds);
}
Loading