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

Commit 36ab2a84 authored by Edward Savage-Jones's avatar Edward Savage-Jones Committed by Fabian Kozynski
Browse files

Add a configurable timeout to global actions dialog

The global actions menu can be started on top of store
demo mode, videos and other scenarios where the display
is on for extended periods. Add a configurable timeout
that will automatically close it, to avoid possible OLED
burn-in.

Flag: EXEMPT bugfix
Bug: 153119340
Test: atest GlobalActionsDialogLiteTest#testShouldLogTimeout
Co-Author: Niklas Brunlid <niklas.brunlid@sony.com>

Change-Id: I9efc39365e6b53fee35893fe0f407cc4358ff2eb
parent f592160b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -19830,6 +19830,14 @@ public final class Settings {
        public static final String REDACT_OTP_NOTIFICATIONS_FROM_UNTRUSTED_LISTENERS =
                "redact_otp_notifications_from_untrusted_listeners";
        /**
         * Timeout used to dismiss the Global Actions Dialog to avoid the possibility of
         * OLED burn-in from the dialog.
         * @hide
         */
        public static final String GLOBAL_ACTIONS_TIMEOUT_MILLIS =
                "global_actions_timeout_ms";
        /**
         * Settings migrated from Wear OS settings provider.
         * @hide
+4 −0
Original line number Diff line number Diff line
@@ -7394,6 +7394,10 @@
         OEM/Partner can explicitly opt to disable the screen. -->
    <bool name="config_enableGaiaEducationInPrivateSpace">true</bool>

    <!-- Default dismiss timeout (in milliseconds) for the power menu (Global Actions) dialog to
         avoid possible screen burn in issues. Set to '0' to disable timeout -->
    <integer name="config_globalActionsDialogTimeout">0</integer>

    <!-- Whether to enable usb state update via udc sysfs. -->
    <bool name="config_enableUdcSysfsUsbStateUpdate">false</bool>

+2 −0
Original line number Diff line number Diff line
@@ -5896,6 +5896,8 @@
  <java-symbol type="string" name="keyboard_shortcut_group_applications_sms" />
  <java-symbol type="string" name="keyboard_shortcut_group_applications" />

  <java-symbol type="integer" name="config_globalActionsDialogTimeout" />

  <!-- Fingerprint loe notification string -->
  <java-symbol type="string" name="fingerprint_loe_notification_msg" />

+1 −0
Original line number Diff line number Diff line
@@ -127,5 +127,6 @@ public class GlobalSettings {
        Settings.Global.ADD_USERS_WHEN_LOCKED,
        Settings.Global.REMOVE_GUEST_ON_EXIT,
        Settings.Global.USER_SWITCHER_ENABLED,
        Settings.Global.GLOBAL_ACTIONS_TIMEOUT_MILLIS,
    };
}
+1 −0
Original line number Diff line number Diff line
@@ -476,5 +476,6 @@ public class GlobalSettingsValidators {
                        }));
        VALIDATORS.put(Global.Wearable.GESTURE_PRIMARY_ACTION_USER_PREFERENCE, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Global.Wearable.GESTURE_DISMISS_ACTION_USER_PREFERENCE, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Global.GLOBAL_ACTIONS_TIMEOUT_MILLIS, NON_NEGATIVE_INTEGER_VALIDATOR);
    }
}
Loading