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

Commit 4308975f authored by Rafael Higuera Silva's avatar Rafael Higuera Silva Committed by Automerger Merge Worker
Browse files

Add fold state to voice call session am: 65debc1e am: 11d646ee

parents 891c7630 11d646ee
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
@@ -974,7 +974,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)