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

Commit 49ef8f2e authored by Michal Olech's avatar Michal Olech
Browse files

[CEC Configuration] Switch HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED to Shared Preferences

Test: manual + unit test
Bug: 175381065
Change-Id: Ifb05b969933e9aa81eea45c7993c19512d965b56
parent bae425ef
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -11049,16 +11049,6 @@ public final class Settings {
        @Deprecated
        public static final String INSTALL_NON_MARKET_APPS = Secure.INSTALL_NON_MARKET_APPS;
        /**
         * Whether TV will also turn off other CEC devices when it goes to standby mode.
         * (0 = false, 1 = true)
         *
         * @hide
         */
        @Readable
        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
+0 −3
Original line number Diff line number Diff line
@@ -242,9 +242,6 @@
    <!-- Default for Settings.Secure.AWARE_LOCK_ENABLED -->
    <bool name="def_aware_lock_enabled">false</bool>

    <!-- Default for setting for Settings.Global.HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED -->
    <bool name="def_hdmiControlAutoDeviceOff">true</bool>

    <!-- Default for Settings.Secure.SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED -->
    <bool name="def_swipe_bottom_to_notification_enabled">false</bool>

+0 −6
Original line number Diff line number Diff line
@@ -800,12 +800,6 @@ class SettingsProtoDumpUtil {
                GlobalSettingsProto.Gpu.UPDATABLE_DRIVER_SPHAL_LIBRARIES);
        p.end(gpuToken);

        final long hdmiToken = p.start(GlobalSettingsProto.HDMI);
        dumpSetting(s, p,
                Settings.Global.HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED,
                GlobalSettingsProto.Hdmi.CONTROL_AUTO_DEVICE_OFF_ENABLED);
        p.end(hdmiToken);

        dumpSetting(s, p,
                Settings.Global.HEADS_UP_NOTIFICATIONS_ENABLED,
                GlobalSettingsProto.HEADS_UP_NOTIFICATIONS_ENABLED);
+1 −10
Original line number Diff line number Diff line
@@ -4948,16 +4948,7 @@ public class SettingsProvider extends ContentProvider {

                if (currentVersion == 190) {
                    // Version 190: get HDMI auto device off from overlay
                    final SettingsState globalSettings = getGlobalSettingsLocked();
                    final Setting currentSetting = globalSettings.getSettingLocked(
                            Global.HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED);
                    if (currentSetting.isNull()) {
                        globalSettings.insertSettingLocked(
                                Global.HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED,
                                getContext().getResources().getBoolean(
                                        R.bool.def_hdmiControlAutoDeviceOff) ? "1" : "0",
                                null, true, SettingsState.SYSTEM_PACKAGE_NAME);
                    }
                    // HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED settings option was removed
                    currentVersion = 191;
                }

+0 −1
Original line number Diff line number Diff line
@@ -299,7 +299,6 @@ public class SettingsBackupTest {
                    Settings.Global.GNSS_HAL_LOCATION_REQUEST_DURATION_MILLIS,
                    Settings.Global.GNSS_SATELLITE_BLOCKLIST,
                    Settings.Global.GPRS_REGISTER_CHECK_PERIOD_MS,
                    Settings.Global.HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED,
                    Settings.Global.HEADS_UP_NOTIFICATIONS_ENABLED,
                    Settings.Global.HIDDEN_API_POLICY,
                    Settings.Global.FORCE_NON_DEBUGGABLE_FINAL_BUILD_FOR_COMPAT,
Loading