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

Commit 0499bb5d authored by Libin.Tang@motorola.com's avatar Libin.Tang@motorola.com Committed by Pavel Zhamaitsiak
Browse files

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

Change-Id: I2ec37478e2bef5b15b157e490f75d5dda5f97117
parent 512c2330
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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.
+1 −1
Original line number Diff line number Diff line
@@ -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
+17 −1
Original line number Diff line number Diff line
@@ -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();