diff options
3 files changed, 14 insertions, 3 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 0be4aea..3c12e06 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -6601,6 +6601,15 @@ public final class Settings { public static final String ENHANCED_4G_MODE_ENABLED = "volte_vt_enabled"; /** + * Whether user can enable/disable LTE as a preferred network. A carrier might control + * this via gservices, OMA-DM, carrier app, etc. + * <p> + * Type: int (0 for false, 1 for true) + * @hide + */ + public static final String LTE_SERVICE_FORCED = "lte_service_forced"; + + /** * Settings to backup. This is here so that it's in the same place as the settings * keys and easy to update. * diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index 1771eac..175b424 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -2620,8 +2620,7 @@ public class DatabaseHelper extends SQLiteOpenHelper { // Set the preferred network mode to target desired value or Default // value defined in RILConstants int type; - type = SystemProperties.getInt("ro.telephony.default_network", - RILConstants.PREFERRED_NETWORK_MODE); + type = RILConstants.PREFERRED_NETWORK_MODE; loadSetting(stmt, Settings.Global.PREFERRED_NETWORK_MODE, type); // Set the preferred cdma subscription source to target desired value or default diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java index a6d6daa..082e8bb 100644 --- a/telephony/java/com/android/internal/telephony/RILConstants.java +++ b/telephony/java/com/android/internal/telephony/RILConstants.java @@ -24,6 +24,8 @@ package com.android.internal.telephony; * Also they should all probably be static final. */ +import android.os.SystemProperties; + /** * {@hide} */ @@ -86,7 +88,8 @@ public interface RILConstants { int NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA = 10; /* LTE, CDMA, EvDo, GSM/WCDMA */ int NETWORK_MODE_LTE_ONLY = 11; /* LTE Only mode. */ int NETWORK_MODE_LTE_WCDMA = 12; /* LTE/WCDMA */ - int PREFERRED_NETWORK_MODE = NETWORK_MODE_WCDMA_PREF; + int PREFERRED_NETWORK_MODE = SystemProperties.getInt("ro.telephony.default_network", + NETWORK_MODE_WCDMA_PREF); int CDMA_CELL_BROADCAST_SMS_DISABLED = 1; int CDMA_CELL_BROADCAST_SMS_ENABLED = 0; |