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

Commit 43dee064 authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Set the default state of NOTIFICATIONS_USE_RING_VOLUME.

Bug: 3365600

This doesn't affect upgrades, only new installs.

Don't backup/restore NOTIFICATIONS_USE_RING_VOLUME anymore as it doesn't
work well across device types and can wedge the device into a state
where you can never hear notification sounds.

Change-Id: I703e1db539eb4ac45b273f46ada0b4bbf3b981bb
parent 4061c9aa
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1792,7 +1792,6 @@ public final class Settings {
            SCREEN_BRIGHTNESS,
            SCREEN_BRIGHTNESS_MODE,
            VIBRATE_ON,
            NOTIFICATIONS_USE_RING_VOLUME,
            MODE_RINGER,
            MODE_RINGER_STREAMS_AFFECTED,
            MUTE_STREAMS_AFFECTED,
+3 −0
Original line number Diff line number Diff line
@@ -71,6 +71,9 @@
    <string name="def_lock_sound" translatable="false">/system/media/audio/ui/Lock.ogg</string>
    <string name="def_unlock_sound" translatable="false">/system/media/audio/ui/Unlock.ogg</string>

    <!-- Notifications use ringer volume -->
    <bool name="def_notifications_use_ring_volume">true</bool>

    <!-- Default for Settings.System.VIBRATE_IN_SILENT -->
    <bool name="def_vibrate_in_silent">true</bool>

+5 −0
Original line number Diff line number Diff line
@@ -1168,6 +1168,11 @@ public class DatabaseHelper extends SQLiteOpenHelper {

            loadBooleanSetting(stmt, Settings.System.USE_PTP_INTERFACE,
                    R.bool.def_use_ptp_interface);

            // Set notification volume to follow ringer volume by default
            loadBooleanSetting(stmt, Settings.System.NOTIFICATIONS_USE_RING_VOLUME,
                    R.bool.def_notifications_use_ring_volume);

        } finally {
            if (stmt != null) stmt.close();
        }