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

Commit ab21d428 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "MSIM: Do not triger DDS after flex map"

parents 66b7bccc 5424961e
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ import android.provider.Settings.SettingNotFoundException;
import android.os.AsyncResult;
import android.os.Handler;
import android.os.Message;
import android.os.SystemProperties;
import android.telephony.TelephonyManager;
import android.telephony.SubscriptionManager;
import android.util.Log;
@@ -60,7 +61,7 @@ class SubscriptionHelper extends Handler {
    private static int sNumPhones;
    // This flag is used to trigger Dds during boot-up
    // and when flex mapping performed
    private static boolean sTriggerDds = true;
    private static boolean sTriggerDds = false;

    private static final int EVENT_SET_UICC_SUBSCRIPTION_DONE = 1;

@@ -154,9 +155,13 @@ class SubscriptionHelper extends Handler {
    }

    public void updateSubActivation(int[] simStatus, boolean isStackReadyEvent) {
        boolean isPrimarySubFeatureEnable =
               SystemProperties.getBoolean("persist.radio.primarycard", false);
        SubscriptionController subCtrlr = SubscriptionController.getInstance();
        boolean setUiccSent = false;
        if (isStackReadyEvent) {
        // When isPrimarySubFeatureEnable is enabled apps will take care
        // of sending DDS on MMode SUB so no need of triggering DDS from here.
        if (isStackReadyEvent && !isPrimarySubFeatureEnable) {
            sTriggerDds = true;
        }

+13 −4
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import android.os.Handler;
import android.os.Message;
import android.os.Registrant;
import android.os.RegistrantList;
import android.os.SystemProperties;
import android.text.TextUtils;

import android.util.Log;
@@ -163,12 +164,20 @@ public class DcSwitchState extends StateMachine {
                            msg.what + ") type=" + type);
                    }

                    boolean isPrimarySubFeatureEnable =
                            SystemProperties.getBoolean("persist.radio.primarycard", false);
                    PhoneBase pb = (PhoneBase)((PhoneProxy)mPhone).getActivePhone();
                    long subId = pb.getSubId();
                    log("Setting default DDS on " + subId + " primary Sub feature"
                            + isPrimarySubFeatureEnable);

                    // When isPrimarySubFeatureEnable is enabled apps will take care
                    // of sending DDS request during device power-up.
                    if (!isPrimarySubFeatureEnable) {
                        SubscriptionController subscriptionController
                                = SubscriptionController.getInstance();
                    log("Setting default DDS on " + subId);
                        subscriptionController.setDefaultDataSubId(subId);
                    }

                    int result = setupConnection(type);
                    if (msg.what == DcSwitchAsyncChannel.REQ_CONNECT) {