am 0499bb5d: IMS:change enhanced 4g setting to store in setting db.

* commit '0499bb5de45cf5542db7ac42406cd856d3386f1f':
  IMS:change enhanced 4g setting to store in setting db.
This commit is contained in:
Libin.Tang@motorola.com
2014-10-15 23:32:52 +00:00
committed by Android Git Automerger
3 changed files with 26 additions and 2 deletions

View File

@@ -6587,6 +6587,14 @@ public final class Settings {
*/
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
* keys and easy to update.

View File

@@ -5,7 +5,7 @@ LOCAL_MODULE_TAGS := optional
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_CERTIFICATE := platform

View File

@@ -43,6 +43,7 @@ import android.provider.Settings.Secure;
import android.text.TextUtils;
import android.util.Log;
import com.android.ims.ImsConfig;
import com.android.internal.content.PackageHelper;
import com.android.internal.telephony.RILConstants;
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'
// is properly propagated through your change. Not doing so will result in a loss of user
// settings.
private static final int DATABASE_VERSION = 113;
private static final int DATABASE_VERSION = 114;
private Context mContext;
private int mUserHandle;
@@ -1827,6 +1828,20 @@ public class DatabaseHelper extends SQLiteOpenHelper {
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!
if (upgradeVersion != currentVersion) {
@@ -2569,6 +2584,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
loadBooleanSetting(stmt, Settings.Global.GUEST_USER_ENABLED,
R.bool.def_guest_user_enabled);
loadSetting(stmt, Settings.Global.VOLTE_VT_ENABLED, ImsConfig.FeatureValueConstants.ON);
// --- New global settings start here
} finally {
if (stmt != null) stmt.close();