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

Commit 8b78ddfd authored by Phil Weaver's avatar Phil Weaver
Browse files

Fix a11y shortcut

Adding a default value when checking settings.

Bug: 68765076
Test: Now able to activate shortcut.
Change-Id: Ic648249dae042dd318301d0659cb4de4cc719ff6
parent 0a69435f
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -1661,14 +1661,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {

    private long getAccessibilityShortcutTimeout() {
        ViewConfiguration config = ViewConfiguration.get(mContext);
        try {
        return Settings.Secure.getIntForUser(mContext.getContentResolver(),
                    Settings.Secure.ACCESSIBILITY_SHORTCUT_DIALOG_SHOWN, mCurrentUserId) == 0
                Settings.Secure.ACCESSIBILITY_SHORTCUT_DIALOG_SHOWN, 0, mCurrentUserId) == 0
                ? config.getAccessibilityShortcutKeyTimeout()
                : config.getAccessibilityShortcutKeyTimeoutAfterConfirmation();
        } catch (Settings.SettingNotFoundException e) {
            throw new RuntimeException(e);
        }
    }

    private long getScreenshotChordLongPressDelay() {