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

Commit 5424961e authored by Sandeep Gutta's avatar Sandeep Gutta
Browse files

MSIM: Do not triger DDS after flex map

If "Switch DDS to Primary sub(FR 20891)" feature enabled,
Telephony application(PrimarySubSetting.java) will take
care of sending DDS request on multi mode sub so do not
send DDS request from framework layer.

Change-Id: I577a8e853c539da859a3231236308b0c3fb25ccf
parent dca77760
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) {