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

Commit 8d8888f9 authored by Ling Ma's avatar Ling Ma
Browse files

Add flag for auto data switch rat and ss

Bug: 260928808
Test: voice call + data browsing
Change-Id: I17feaab599764eb8408997a9d422fe953ae49e2a
parent 8f973251
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -7,6 +7,13 @@ flag {
  bug: "306488039"
}

flag {
  name: "auto_data_switch_rat_ss"
  namespace: "telephony"
  description: "Whether switch for better rat and signal strength"
  bug:"260928808"
}

flag {
  name: "use_alarm_callback"
  namespace: "telephony"
+1 −1
Original line number Diff line number Diff line
@@ -811,7 +811,7 @@ public class AutoDataSwitchController extends Handler {
     * @return {@code true} If the feature of switching base on RAT and signal strength is enabled.
     */
    private boolean isRatSignalStrengthBasedSwitchEnabled() {
        return mScoreTolerance >= 0;
        return mFlags.autoDataSwitchRatSs() && mScoreTolerance >= 0;
    }

    /**
+2 −0
Original line number Diff line number Diff line
@@ -293,6 +293,7 @@ public class AutoDataSwitchControllerTest extends TelephonyTest {

    @Test
    public void testRoaming_same_roaming_condition_uses_rat_signalStrength() {
        doReturn(true).when(mFeatureFlags).autoDataSwitchRatSs();
        // On primary phone
        // 1. Both roaming, user allow roaming on both phone, uses RAT score to decide switch.
        prepareIdealUsesNonDdsCondition();
@@ -419,6 +420,7 @@ public class AutoDataSwitchControllerTest extends TelephonyTest {

    @Test
    public void testOnNonDdsSwitchBackToPrimary_rat_signalStrength() {
        doReturn(true).when(mFeatureFlags).autoDataSwitchRatSs();
        doReturn(PHONE_2).when(mPhoneSwitcher).getPreferredDataPhoneId();

        prepareIdealUsesNonDdsCondition();