Merge "Customize the default value of Enhanced 4G LTE mode"
This commit is contained in:
3
core/java/android/provider/Settings.java
Executable file → Normal file
3
core/java/android/provider/Settings.java
Executable file → Normal file
@@ -9946,7 +9946,8 @@ public final class Settings {
|
|||||||
public static final String REQUIRE_PASSWORD_TO_DECRYPT = "require_password_to_decrypt";
|
public static final String REQUIRE_PASSWORD_TO_DECRYPT = "require_password_to_decrypt";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the Volte is enabled
|
* Whether the Volte is enabled. If this setting is not set then we use the Carrier Config
|
||||||
|
* value {@link CarrierConfigManager#KEY_ENHANCED_4G_LTE_ON_BY_DEFAULT_BOOL}.
|
||||||
* <p>
|
* <p>
|
||||||
* Type: int (0 for false, 1 for true)
|
* Type: int (0 for false, 1 for true)
|
||||||
* @hide
|
* @hide
|
||||||
|
|||||||
@@ -1836,20 +1836,10 @@ class DatabaseHelper extends SQLiteOpenHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (upgradeVersion < 116) {
|
if (upgradeVersion < 116) {
|
||||||
if (mUserHandle == UserHandle.USER_SYSTEM) {
|
/*
|
||||||
db.beginTransaction();
|
* To control the default value by carrier config manager, initializing
|
||||||
SQLiteStatement stmt = null;
|
* ENHANCED_4G_MODE_ENABLED has been removed.
|
||||||
try {
|
*/
|
||||||
stmt = db.compileStatement("INSERT OR IGNORE INTO global(name,value)"
|
|
||||||
+ " VALUES(?,?);");
|
|
||||||
loadSetting(stmt, Settings.Global.ENHANCED_4G_MODE_ENABLED,
|
|
||||||
ImsConfig.FeatureValueConstants.ON);
|
|
||||||
db.setTransactionSuccessful();
|
|
||||||
} finally {
|
|
||||||
db.endTransaction();
|
|
||||||
if (stmt != null) stmt.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
upgradeVersion = 116;
|
upgradeVersion = 116;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2633,9 +2623,6 @@ class DatabaseHelper extends SQLiteOpenHelper {
|
|||||||
|
|
||||||
loadSetting(stmt, Settings.Global.DEVICE_NAME, getDefaultDeviceName());
|
loadSetting(stmt, Settings.Global.DEVICE_NAME, getDefaultDeviceName());
|
||||||
|
|
||||||
loadSetting(stmt, Settings.Global.ENHANCED_4G_MODE_ENABLED,
|
|
||||||
ImsConfig.FeatureValueConstants.ON);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IMPORTANT: Do not add any more upgrade steps here as the global,
|
* IMPORTANT: Do not add any more upgrade steps here as the global,
|
||||||
* secure, and system settings are no longer stored in a database
|
* secure, and system settings are no longer stored in a database
|
||||||
|
|||||||
@@ -818,6 +818,14 @@ public class CarrierConfigManager {
|
|||||||
*/
|
*/
|
||||||
public static final String KEY_HIDE_ENHANCED_4G_LTE_BOOL = "hide_enhanced_4g_lte_bool";
|
public static final String KEY_HIDE_ENHANCED_4G_LTE_BOOL = "hide_enhanced_4g_lte_bool";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default Enhanced 4G LTE mode enabled. When this is {@code true}, Enhanced 4G LTE mode by
|
||||||
|
* default is on, otherwise if {@code false}, Enhanced 4G LTE mode by default is off.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static final String KEY_ENHANCED_4G_LTE_ON_BY_DEFAULT_BOOL =
|
||||||
|
"enhanced_4g_lte_on_by_default_bool";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine whether IMS apn can be shown.
|
* Determine whether IMS apn can be shown.
|
||||||
*/
|
*/
|
||||||
@@ -1780,6 +1788,7 @@ public class CarrierConfigManager {
|
|||||||
sDefaults.putBoolean(KEY_DISPLAY_HD_AUDIO_PROPERTY_BOOL, true);
|
sDefaults.putBoolean(KEY_DISPLAY_HD_AUDIO_PROPERTY_BOOL, true);
|
||||||
sDefaults.putBoolean(KEY_EDITABLE_ENHANCED_4G_LTE_BOOL, true);
|
sDefaults.putBoolean(KEY_EDITABLE_ENHANCED_4G_LTE_BOOL, true);
|
||||||
sDefaults.putBoolean(KEY_HIDE_ENHANCED_4G_LTE_BOOL, false);
|
sDefaults.putBoolean(KEY_HIDE_ENHANCED_4G_LTE_BOOL, false);
|
||||||
|
sDefaults.putBoolean(KEY_ENHANCED_4G_LTE_ON_BY_DEFAULT_BOOL, true);
|
||||||
sDefaults.putBoolean(KEY_HIDE_IMS_APN_BOOL, false);
|
sDefaults.putBoolean(KEY_HIDE_IMS_APN_BOOL, false);
|
||||||
sDefaults.putBoolean(KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL, false);
|
sDefaults.putBoolean(KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL, false);
|
||||||
sDefaults.putBoolean(KEY_ALLOW_EMERGENCY_VIDEO_CALLS_BOOL, false);
|
sDefaults.putBoolean(KEY_ALLOW_EMERGENCY_VIDEO_CALLS_BOOL, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user