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

Commit fbe9117e authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Move media setting to a constant, disabling it

Test: manual
Test: atest SettingsBackupTest
Bug: 155315021
Change-Id: I2f96b1df5e635f3362352ef929e09d7d1ff4be66
parent 144788b5
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -9688,6 +9688,13 @@ public final class Settings {
        public static final String HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED =
                "hdmi_control_auto_device_off_enabled";
        /**
         * Whether or not media is shown automatically when bypassing as a heads up.
         * @hide
         */
        public static final String SHOW_MEDIA_ON_QUICK_SETTINGS =
                "qs_media_player";
        /**
         * The interval in milliseconds at which location requests will be throttled when they are
         * coming from the background.
+1 −0
Original line number Diff line number Diff line
@@ -586,6 +586,7 @@ public class SettingsBackupTest {
                    Settings.Global.MODEM_STACK_ENABLED_FOR_SLOT,
                    Settings.Global.POWER_BUTTON_LONG_PRESS,
                    Settings.Global.POWER_BUTTON_VERY_LONG_PRESS,
                    Settings.Global.SHOW_MEDIA_ON_QUICK_SETTINGS, // Temporary for R beta
                    Settings.Global.INTEGRITY_CHECK_INCLUDES_RULE_PROVIDER,
                    Settings.Global.ADVANCED_BATTERY_USAGE_AMOUNT);

+3 −2
Original line number Diff line number Diff line
@@ -126,10 +126,11 @@ public class Utils {

    /**
     * Allow the media player to be shown in the QS area, controlled by 2 flags.
     * On by default, but can be disabled by setting to 0
     * Off by default, but can be disabled by setting to 0
     */
    public static boolean useQsMediaPlayer(Context context) {
        int flag = Settings.System.getInt(context.getContentResolver(), "qs_media_player", 1);
        int flag = Settings.Global.getInt(context.getContentResolver(),
                Settings.Global.SHOW_MEDIA_ON_QUICK_SETTINGS, 0);
        return flag > 0;
    }
}