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

Commit 8fcb7178 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Adding Anamoly report to detect invalid portIndex" into udc-dev

parents ab710cf4 238f50b0
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ import android.service.euicc.EuiccService;
import android.service.euicc.GetEuiccProfileInfoListResult;
import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
import android.telephony.AnomalyReporter;
import android.telephony.CarrierConfigManager;
import android.telephony.RadioAccessFamily;
import android.telephony.SubscriptionInfo;
@@ -1131,6 +1132,19 @@ public class SubscriptionManagerService extends ISub.Stub {
                        mSubscriptionDatabaseManager.setEmbedded(
                                subInfo.getSubscriptionId(), false);
                    });
            if (mSubscriptionDatabaseManager.getAllSubscriptions().stream()
                    .anyMatch(subInfo -> subInfo.isEmbedded()
                            && subInfo.isActive()
                            && subInfo.getPortIndex()
                            == TelephonyManager.INVALID_PORT_INDEX
                            && mSimState[subInfo.getSimSlotIndex()]
                            == TelephonyManager.SIM_STATE_LOADED)) {
                //Report Anomaly if invalid portIndex is updated in Active subscriptions
                AnomalyReporter.reportAnomaly(
                        UUID.fromString("38fdf63c-3bd9-4fc2-ad33-a20246a32fa7"),
                        "SubscriptionManagerService: Found Invalid portIndex"
                                + " in active subscriptions");
            }
        });
        log("updateEmbeddedSubscriptions: Finished embedded subscription update.");
        if (callback != null) {