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

Commit c27675f8 authored by Nathalie Le Clair's avatar Nathalie Le Clair Committed by Automerger Merge Worker
Browse files

Merge "Get HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED from overlay" into rvc-dev am: eeff6747

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11655738

Change-Id: Id538e133c86fbbe89563553fe043936a4f0b06fb
parents d68ed299 eeff6747
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -237,4 +237,7 @@


    <!-- Default for Settings.Secure.AWARE_LOCK_ENABLED -->
    <!-- Default for Settings.Secure.AWARE_LOCK_ENABLED -->
    <bool name="def_aware_lock_enabled">false</bool>
    <bool name="def_aware_lock_enabled">false</bool>

    <!-- Default for setting for Settings.Global.HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED -->
    <bool name="def_hdmiControlAutoDeviceOff">false</bool>
</resources>
</resources>
+16 −1
Original line number Original line Diff line number Diff line
@@ -3513,7 +3513,7 @@ public class SettingsProvider extends ContentProvider {
        }
        }


        private final class UpgradeController {
        private final class UpgradeController {
            private static final int SETTINGS_VERSION = 190;
            private static final int SETTINGS_VERSION = 191;


            private final int mUserId;
            private final int mUserId;


@@ -4867,6 +4867,21 @@ public class SettingsProvider extends ContentProvider {
                    currentVersion = 190;
                    currentVersion = 190;
                }
                }


                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);
                    }
                    currentVersion = 191;
                }

                // vXXX: Add new settings above this point.
                // vXXX: Add new settings above this point.


                if (currentVersion != newVersion) {
                if (currentVersion != newVersion) {