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

Commit bcc06e37 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add fold state to voice call session"

parents 1372a690 776a65c1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -274,6 +274,7 @@ message VoiceCallSession {
    optional bool is_multiparty = 31;
    optional int32 call_duration = 32;
    optional int32 last_known_rat = 33;
    optional int32 fold_state = 34;

    // Internal use only
    optional int64 setup_begin_millis = 10001;
+2 −1
Original line number Diff line number Diff line
@@ -983,7 +983,8 @@ public class MetricsCollector implements StatsManager.StatsPullAtomCallback {
                session.ratAtConnected,
                session.isMultiparty,
                session.callDuration,
                session.lastKnownRat);
                session.lastKnownRat,
                session.foldState);
    }

    private static StatsEvent buildStatsEvent(IncomingSms sms) {
+5 −0
Original line number Diff line number Diff line
@@ -157,6 +157,8 @@ public class VoiceCallSessionStats {
    private final PersistAtomsStorage mAtomsStorage =
            PhoneFactory.getMetricsCollector().getAtomsStorage();
    private final UiccController mUiccController = UiccController.getInstance();
    private final DeviceStateHelper mDeviceStateHelper =
            PhoneFactory.getMetricsCollector().getDeviceStateHelper();

    public VoiceCallSessionStats(int phoneId, Phone phone) {
        mPhoneId = phoneId;
@@ -514,6 +516,9 @@ public class VoiceCallSessionStats {
        // Update end RAT
        updateRatAtEnd(proto, getVoiceRatWithVoNRFix(mPhone, getServiceState(), proto.bearerAtEnd));

        // Set device fold state
        proto.foldState = mDeviceStateHelper.getFoldState();

        mAtomsStorage.addVoiceCallSession(proto);

        // merge RAT usages to PersistPullers when the call session ends (i.e. no more active calls)