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

Commit dd64e470 authored by Aayush Gupta's avatar Aayush Gupta
Browse files

Merge remote-tracking branch 'origin/lineage-18.1' into v1-r

parents 20d77d88 990b7665
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -181,6 +181,9 @@
    <java-symbol type="dimen" name="config_buttonBrightnessSettingDefaultFloat" />
    <java-symbol type="dimen" name="config_keyboardBrightnessSettingDefaultFloat" />

    <!-- Whether the device supports wireless charging or not -->
    <java-symbol type="bool" name="config_deviceSupportsWirelessCharging" />

    <!-- Whether to cleanup fingerprints upon connection to the daemon and when
         user switches -->
    <java-symbol type="bool" name="config_cleanupUnusedFingerprints" />
+3 −0
Original line number Diff line number Diff line
@@ -289,6 +289,9 @@
    <integer name="config_deviceSupportsKeyboardBrightnessControl">0</integer>
    <dimen name="config_keyboardBrightnessSettingDefaultFloat">1.0</dimen>

    <!-- Whether the device supports wireless charging or not -->
    <bool name="config_deviceSupportsWirelessCharging">false</bool>

    <!-- Whether to cleanup fingerprints upon connection to the daemon and when
         user switches -->
    <bool name="config_cleanupUnusedFingerprints">true</bool>
+0 −9
Original line number Diff line number Diff line
@@ -62,15 +62,6 @@
         1==on -->
    <integer name="def_heads_up_enabled">1</integer>

    <!-- Default for LineageSettings.Global.POWER_NOTIFICATIONS_ENABLED -->
    <bool name="def_power_notifications_enabled">true</bool>

    <!-- Default for LineageSettings.Global.POWER_NOTIFICATIONS_VIBRATE -->
    <bool name="def_power_notifications_vibrate">false</bool>

    <!-- Default for LineageSettings.Global.POWER_NOTIFICATIONS_RINGTONE -->
    <string name="def_power_notifications_ringtone" translatable="false">/system/product/media/audio/ui/WirelessChargingStarted.ogg</string>

    <!-- Default value for the battery LEDs brightness -->
    <integer name="def_battery_brightness_level">255</integer>

+3 −28
Original line number Diff line number Diff line
@@ -428,22 +428,9 @@ public class LineageDatabaseHelper extends SQLiteOpenHelper{
        }

        if (upgradeVersion < 13) {
            // Update custom charging sound setting
            if (mUserHandle == UserHandle.USER_OWNER) {
                db.beginTransaction();
                SQLiteStatement stmt = null;
                try {
                    stmt = db.compileStatement("UPDATE global SET value=? WHERE name=?");
                    stmt.bindString(1, mContext.getResources()
                            .getString(R.string.def_power_notifications_ringtone));
                    stmt.bindString(2, LineageSettings.Global.POWER_NOTIFICATIONS_RINGTONE);
                    stmt.execute();
                    db.setTransactionSuccessful();
                } finally {
                    if (stmt != null) stmt.close();
                    db.endTransaction();
                }
            }
            /* Was used to migrate LineageSettings.Global.POWER_NOTIFICATIONS_RINGTONE,
             * but this setting has been deprecated
             */
            upgradeVersion = 13;
        }

@@ -617,18 +604,6 @@ public class LineageDatabaseHelper extends SQLiteOpenHelper{
            stmt = db.compileStatement("INSERT OR IGNORE INTO global(name,value)"
                    + " VALUES(?,?);");
            // Global
            loadBooleanSetting(stmt,
                    LineageSettings.Global.POWER_NOTIFICATIONS_ENABLED,
                    R.bool.def_power_notifications_enabled);

            loadBooleanSetting(stmt,
                    LineageSettings.Global.POWER_NOTIFICATIONS_VIBRATE,
                    R.bool.def_power_notifications_vibrate);

            loadStringSetting(stmt,
                    LineageSettings.Global.POWER_NOTIFICATIONS_RINGTONE,
                    R.string.def_power_notifications_ringtone);

            loadIntegerSetting(stmt, LineageSettings.Global.WEATHER_TEMPERATURE_UNIT,
                    R.integer.def_temperature_unit);
        } finally {
+0 −9
Original line number Diff line number Diff line
@@ -92,15 +92,6 @@ public class LineageSettingsProviderDefaultsTest extends AndroidTestCase {

    //GLOBAL
    static {
        GLOBAL_SETTINGS_DEFAULTS.add(new Setting(
                LineageSettings.Global.POWER_NOTIFICATIONS_ENABLED,
                "R.bool.def_power_notifications_enabled"));
        GLOBAL_SETTINGS_DEFAULTS.add(new Setting(
                LineageSettings.Global.POWER_NOTIFICATIONS_VIBRATE,
                "R.bool.def_power_notifications_vibrate"));
        GLOBAL_SETTINGS_DEFAULTS.add(new Setting(
                LineageSettings.Global.POWER_NOTIFICATIONS_RINGTONE,
                "R.string.def_power_notifications_ringtone"));
        GLOBAL_SETTINGS_DEFAULTS.add(new Setting(
                LineageSettings.Global.WEATHER_TEMPERATURE_UNIT,
                "R.integer.def_temperature_unit"));
Loading