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

Commit 1d9d5901 authored by Roman Birg's avatar Roman Birg Committed by Gerrit Code Review
Browse files

SettingsProvider: fix data_enabled default lookup



We shouldn't set the MOBILE_DATA + phoneId keys because it will cause
collisions with other parts of the system that actually query
MOBILE_DATA + subId - leading to incorrect defaults.

TelephonyManager.getIntWithSubId() actually falls back to just
MOBILE_DATA for a specific sub id query, so we do not need to touch
these values, since it applies the same default to all sub ids anyways.

Ticket: CYNGNOS-3171

Change-Id: I38405000b3d641029080fb630eae4d128bd44719
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent d5534900
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -2880,16 +2880,6 @@ class DatabaseHelper extends SQLiteOpenHelper {
                    R.bool.def_enable_mobile_data);

            int phoneCount = TelephonyManager.getDefault().getPhoneCount();
            // SUB specific flags for Multisim devices
            for (int phoneId = 0; phoneId < MAX_PHONE_COUNT; phoneId++) {
                // Mobile Data default, based on build
                loadRegionLockedBooleanSetting(stmt, Settings.Global.MOBILE_DATA + phoneId,
                        R.bool.def_enable_mobile_data);

                // Data roaming default, based on build
                loadRegionLockedBooleanSetting(stmt, Settings.Global.DATA_ROAMING + phoneId,
                        R.bool.def_enable_data_roaming);
            }

            loadBooleanSetting(stmt, Settings.Global.NETSTATS_ENABLED,
                    R.bool.def_netstats_enabled);