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

Commit 70d0d0c9 authored by Chen Xu's avatar Chen Xu Committed by android-build-merger
Browse files

Merge "log latest carrier id info perodically" am: cbe0de99

am: 8f70a73a

Change-Id: I992d75047b38b19bb37bda7ad04647e437e5637c
parents 94ddffc0 8f70a73a
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);
    }