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

Unverified Commit 8ac2a98d authored by Michael Bestas's avatar Michael Bestas
Browse files

LineageSettings: Enable status_bar_show_vibrate_icon if it was disabled

AOSP has def_statusBarVibrateIconEnabled in SettingsProvider which we
had not set to 1 but instead we've been modifying the SystemUI checks.
Since that no longer works and the references to that Setting keep
increasing in SystemUI, just set a default value here and set the
overlay in vendor/lineage for new users as well.
This is required since we hide the AOSP setting and handle vibrate icon
in SystemUI tuner like all the other status bar icons.

Change-Id: Idfa1d7564f35ca72add03e5335783e6aabf43199
parent fc454028
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ public class LineageDatabaseHelper extends SQLiteOpenHelper{
    private static final boolean LOCAL_LOGV = false;

    private static final String DATABASE_NAME = "lineagesettings.db";
    private static final int DATABASE_VERSION = 21;
    private static final int DATABASE_VERSION = 22;

    public static class LineageTableNames {
        public static final String TABLE_SYSTEM = "system";
@@ -325,6 +325,17 @@ public class LineageDatabaseHelper extends SQLiteOpenHelper{
            upgradeVersion = 21;
        }

        if (upgradeVersion < 22) {
            // Enable status bar vibrate icon by default since we handle it in SystemUI tuner
            Integer oldSetting = Settings.Secure.getInt(mContext.getContentResolver(),
                    Settings.Secure.STATUS_BAR_SHOW_VIBRATE_ICON, 1);
            if (oldSetting != 1) {
                Settings.Secure.putInt(mContext.getContentResolver(),
                        Settings.Secure.STATUS_BAR_SHOW_VIBRATE_ICON, 1);
            }
            upgradeVersion = 22;
        }

        // *** Remember to update DATABASE_VERSION above!
        if (upgradeVersion != newVersion) {
            Log.wtf(TAG, "warning: upgrading settings database to version "