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

Commit 838611ee authored by Jack Yu's avatar Jack Yu
Browse files

Cleaned up the flag vonr_enabled_metric

Cleaned up the 24Q3 flag vonr_enabled_metric

Test: atest VoiceCallSessionStatsTest VonrHelperTest
Test: Basic telephony functionality tests
Bug: 288449751
Flag: EXEMPT flag clean up
Change-Id: I27bd0ad6a60580432e22d49802b796a28fe363f0
parent e41480ed
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -41,14 +41,6 @@ flag {
  bug:"286171724"
}

# OWNER=qingqi TARGET=24Q3
flag {
  name: "vonr_enabled_metric"
  namespace: "telephony"
  description: "Collect vonr status in voice call metric"
  bug:"288449751"
}

# OWNER=apsankar TARGET=24Q3
flag {
  name: "data_call_session_stats_captures_cross_sim_calling"
+2 −6
Original line number Diff line number Diff line
@@ -478,9 +478,7 @@ public class VoiceCallSessionStats {
        @VideoState int videoState = conn.getVideoState();
        VoiceCallSession proto = new VoiceCallSession();

        if (mFlags.vonrEnabledMetric()) {
        mVonrHelper.updateVonrEnabledState();
        }

        proto.bearerAtStart = bearer;
        proto.bearerAtEnd = bearer;
@@ -582,9 +580,7 @@ public class VoiceCallSessionStats {
        // Set device fold state
        proto.foldState = mDeviceStateHelper.getFoldState();

        if (mFlags.vonrEnabledMetric()) {
        proto.vonrEnabled = mVonrHelper.getVonrEnabled(mPhone.getSubId());
        }

        proto.supportsBusinessCallComposer = isBusinessCallSupported();
        // 0 is defined as UNKNOWN in Enum
+8 −16
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@ public class VonrHelper {

    public VonrHelper(@NonNull FeatureFlags featureFlags) {
        this.mFlags = featureFlags;
        if (mFlags.vonrEnabledMetric()) {
        if (mFlags.threadShred()) {
            mHandler = new Handler(BackgroundThread.get().getLooper());
        } else {
@@ -54,14 +53,11 @@ public class VonrHelper {
            mHandler = new Handler(mHandlerThread.getLooper());
        }
    }
    }

    /** Update vonr_enabled state */
    public void updateVonrEnabledState() {
        if (mFlags.vonrEnabledMetric()) {
        mHandler.post(mVonrRunnable);
    }
    }

    @VisibleForTesting
    protected Runnable mVonrRunnable =
@@ -77,10 +73,6 @@ public class VonrHelper {

    /** Get vonr_enabled per subId */
    public boolean getVonrEnabled(int subId) {
        if (mFlags.vonrEnabledMetric()) {
        return mPhoneVonrState.getOrDefault(subId, false);
        } else {
            return false;
        }
    }
}
+0 −2
Original line number Diff line number Diff line
@@ -235,8 +235,6 @@ public class VoiceCallSessionStatsTest extends TelephonyTest {
        mVoiceCallSessionStats1 = new TestableVoiceCallSessionStats(
                1, mSecondPhone, mFeatureFlags);
        mVoiceCallSessionStats1.onServiceStateChanged(mSecondServiceState);

        doReturn(true).when(mFeatureFlags).vonrEnabledMetric();
    }

    @After
+0 −1
Original line number Diff line number Diff line
@@ -53,7 +53,6 @@ public class VonrHelperTest extends TelephonyTest {
        doReturn(SUBID).when(mPhone).getSubId();
        doReturn(false).when(mTelephonyManager).isVoNrEnabled();
        mVonrHelper = new TestableVonrHelper(mFeatureFlags);
        doReturn(true).when(mFeatureFlags).vonrEnabledMetric();
    }

    @After