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

Commit cbe0de99 authored by Chen Xu's avatar Chen Xu Committed by Gerrit Code Review
Browse files

Merge "log latest carrier id info perodically"

parents 80c72b56 455c4080
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -165,6 +165,11 @@ public class TelephonyMetrics {
     */
    private final SparseArray<TelephonySettings> mLastSettings = new SparseArray<>();

    /**
     * Last carrier id matching.
     */
    private final SparseArray<CarrierIdMatching> mLastCarrierId = new SparseArray<>();

    /** The start system time of the TelephonyLog in milliseconds*/
    private long mStartSystemTimeMs;

@@ -516,6 +521,13 @@ public class TelephonyMetrics {
                    .setImsConnectionState(mLastImsConnectionState.get(key)).build();
            addTelephonyEvent(event);
        }

        for (int i = 0; i < mLastCarrierId.size(); i++) {
            final int key = mLastCarrierId.keyAt(i);
            TelephonyEvent event = new TelephonyEventBuilder(mStartElapsedTimeMs, key)
                    .setCarrierIdMatching(mLastCarrierId.get(key)).build();
            addTelephonyEvent(event);
        }
    }

    /**
@@ -2006,6 +2018,7 @@ public class TelephonyMetrics {

        TelephonyEvent event = new TelephonyEventBuilder(phoneId).setCarrierIdMatching(
                carrierIdMatching).build();
        mLastCarrierId.put(phoneId, carrierIdMatching);
        addTelephonyEvent(event);
    }