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

Commit 9b5fe909 authored by Chi Zhang's avatar Chi Zhang
Browse files

Handle invalid carrier ID in voice call atoms.

Bug: 184980262
Test: build && atest FrameworksTelephonyTests
Change-Id: Ia70e4eec033f89a1200610c453d5b22302a96f57
parent a7719379
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -148,8 +148,8 @@ public class CarrierResolver extends Handler {
            int subId = intent.getIntExtra("sub_id",
                    SubscriptionManager.getDefaultSubscriptionId());

            if (carrierId == TelephonyManager.UNKNOWN_CARRIER_ID) {
                logd("Override carrier id can't be -1.", phoneId);
            if (carrierId <= 0) {
                logd("Override carrier id must be greater than 0.", phoneId);
                return;
            } else if (subId != mPhone.getSubId()) {
                logd("Override carrier id failed. The sub id doesn't same as phone's sub id.",
+5 −0
Original line number Diff line number Diff line
@@ -446,6 +446,11 @@ public class VoiceCallSessionStats {
            proto.disconnectExtraMessage = "";
        }

        // Retry populating carrier ID if it was invalid
        if (proto.carrierId <= 0) {
            proto.carrierId = mPhone.getCarrierId();
        }

        mAtomsStorage.addVoiceCallSession(proto);

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