IMS:change enhanced 4g setting to store in setting db.
Change-Id: I2ec37478e2bef5b15b157e490f75d5dda5f97117
This commit is contained in:
committed by
Pavel Zhamaitsiak
parent
512c2330c6
commit
0499bb5de4
@@ -6587,6 +6587,14 @@ 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/VT is enabled
|
||||||
|
* <p>
|
||||||
|
* Type: int (0 for false, 1 for true)
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static final String VOLTE_VT_ENABLED = "volte_vt_enabled";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Settings to backup. This is here so that it's in the same place as the settings
|
* Settings to backup. This is here so that it's in the same place as the settings
|
||||||
* keys and easy to update.
|
* keys and easy to update.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ LOCAL_MODULE_TAGS := optional
|
|||||||
|
|
||||||
LOCAL_SRC_FILES := $(call all-subdir-java-files)
|
LOCAL_SRC_FILES := $(call all-subdir-java-files)
|
||||||
|
|
||||||
LOCAL_JAVA_LIBRARIES := telephony-common
|
LOCAL_JAVA_LIBRARIES := telephony-common ims-common
|
||||||
|
|
||||||
LOCAL_PACKAGE_NAME := SettingsProvider
|
LOCAL_PACKAGE_NAME := SettingsProvider
|
||||||
LOCAL_CERTIFICATE := platform
|
LOCAL_CERTIFICATE := platform
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ import android.provider.Settings.Secure;
|
|||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.android.ims.ImsConfig;
|
||||||
import com.android.internal.content.PackageHelper;
|
import com.android.internal.content.PackageHelper;
|
||||||
import com.android.internal.telephony.RILConstants;
|
import com.android.internal.telephony.RILConstants;
|
||||||
import com.android.internal.telephony.cdma.CdmaSubscriptionSourceManager;
|
import com.android.internal.telephony.cdma.CdmaSubscriptionSourceManager;
|
||||||
@@ -70,7 +71,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
|
|||||||
// database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion'
|
// database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion'
|
||||||
// is properly propagated through your change. Not doing so will result in a loss of user
|
// is properly propagated through your change. Not doing so will result in a loss of user
|
||||||
// settings.
|
// settings.
|
||||||
private static final int DATABASE_VERSION = 113;
|
private static final int DATABASE_VERSION = 114;
|
||||||
|
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private int mUserHandle;
|
private int mUserHandle;
|
||||||
@@ -1827,6 +1828,20 @@ public class DatabaseHelper extends SQLiteOpenHelper {
|
|||||||
upgradeVersion = 113;
|
upgradeVersion = 113;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (upgradeVersion < 114) {
|
||||||
|
db.beginTransaction();
|
||||||
|
SQLiteStatement stmt = null;
|
||||||
|
try {
|
||||||
|
stmt = db.compileStatement("INSERT OR IGNORE INTO global(name,value)"
|
||||||
|
+ " VALUES(?,?);");
|
||||||
|
loadSetting(stmt, Settings.Global.VOLTE_VT_ENABLED, ImsConfig.FeatureValueConstants.ON);
|
||||||
|
db.setTransactionSuccessful();
|
||||||
|
} finally {
|
||||||
|
db.endTransaction();
|
||||||
|
if (stmt != null) stmt.close();
|
||||||
|
}
|
||||||
|
upgradeVersion = 114;
|
||||||
|
}
|
||||||
// *** Remember to update DATABASE_VERSION above!
|
// *** Remember to update DATABASE_VERSION above!
|
||||||
|
|
||||||
if (upgradeVersion != currentVersion) {
|
if (upgradeVersion != currentVersion) {
|
||||||
@@ -2569,6 +2584,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
|
|||||||
|
|
||||||
loadBooleanSetting(stmt, Settings.Global.GUEST_USER_ENABLED,
|
loadBooleanSetting(stmt, Settings.Global.GUEST_USER_ENABLED,
|
||||||
R.bool.def_guest_user_enabled);
|
R.bool.def_guest_user_enabled);
|
||||||
|
loadSetting(stmt, Settings.Global.VOLTE_VT_ENABLED, ImsConfig.FeatureValueConstants.ON);
|
||||||
// --- New global settings start here
|
// --- New global settings start here
|
||||||
} finally {
|
} finally {
|
||||||
if (stmt != null) stmt.close();
|
if (stmt != null) stmt.close();
|
||||||
|
|||||||
Reference in New Issue
Block a user