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

Commit b73ea9df authored by Jack Nudelman's avatar Jack Nudelman
Browse files

Populate recently added sim_mccmnc into ActiveSubscriptionInfo.

Bug: 155424352
Test: make
Change-Id: I06fa7edcc0099fa4e2335eca358261f7273b03c1
parent 5dda74b4
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1841,6 +1841,14 @@ message ActiveSubscriptionInfo {

  /** whether subscription is opportunistic (0 - false, 1 - true, -1 - unknown). */
  optional int32 is_opportunistic = 3;

  /** The mccmnc associated with the subscription. Useful for differentiating
   * between subscriptions with different mccmnc but same carrier_id (eg. Fi
   * Sprint vs. Fi T-Mobile).*/
  optional string sim_mccmnc = 4 /*[
    (datapol.semantic_type) = ST_LOCATION,
    (datapol.location_qualifier) = { precise_location: false }
  ]*/;
};

enum SimState {
+3 −0
Original line number Diff line number Diff line
@@ -806,6 +806,9 @@ public class TelephonyMetrics {
            activeSubscriptionInfo.slotIndex = phoneId;
            activeSubscriptionInfo.isOpportunistic = info.isOpportunistic() ? 1 : 0;
            activeSubscriptionInfo.carrierId = info.getCarrierId();
            if (info.getMccString() != null && info.getMncString() != null) {
                activeSubscriptionInfo.simMccmnc = info.getMccString() + info.getMncString();
            }
            if (!MessageNano.messageNanoEquals(
                    mLastActiveSubscriptionInfos.get(phoneId), activeSubscriptionInfo)) {
                addTelephonyEvent(new TelephonyEventBuilder(phoneId)