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

Commit 956d6951 authored by Chaitanya Saggurthi's avatar Chaitanya Saggurthi Committed by Linux Build Service Account
Browse files

Fix issue of data activation on SUB2, when disabled in UI

Issue is due to mobile_data1 entry is not available
in settings database, create entry for mobile_data1
in settings database

Change-Id: I537ecc347bd5b141bfedcbfa190336855a5f6fc1
CRs-Fixed: 735040
parent 059f3dde
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -82,6 +82,9 @@ public class DatabaseHelper extends SQLiteOpenHelper {
    private static final String TABLE_SECURE = "secure";
    private static final String TABLE_GLOBAL = "global";

    //Maximum number of phones
    private static final int MAX_PHONE_COUNT = 3;

    static {
        mValidTables.add(TABLE_SYSTEM);
        mValidTables.add(TABLE_SECURE);
@@ -2500,9 +2503,8 @@ public class DatabaseHelper extends SQLiteOpenHelper {
                            SystemProperties.get("ro.com.android.mobiledata",
                                    "true")) ? 1 : 0);

            int phoneCount = TelephonyManager.getDefault().getPhoneCount();
            // SUB specific flags for Multisim devices
            for (int phoneId = 0; phoneId < phoneCount; phoneId++) {
            for (int phoneId = 0; phoneId < MAX_PHONE_COUNT; phoneId++) {
                // Mobile Data default, based on build
                loadSetting(stmt, Settings.Global.MOBILE_DATA + phoneId,
                        "true".equalsIgnoreCase(
@@ -2565,6 +2567,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
            // Set the preferred network mode to target desired value or Default
            // value defined in RILConstants
            int type;
            int phoneCount = TelephonyManager.getDefault().getPhoneCount();
            type = SystemProperties.getInt("ro.telephony.default_network",
                        RILConstants.PREFERRED_NETWORK_MODE);
            String val = Integer.toString(type);