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

Commit 72c52dfb authored by Kaiqiang Wang's avatar Kaiqiang Wang
Browse files

Fix the accessibility shortcut funtionaility.

1) Set default value when the
   Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE is empty.
2) Fix the filter condition to check if the value is empty or not.

Root cause of the issue: the value of ACCESSIBILITY_SHORTCUT_TARGET_SERVICE is
"", an empty string, which make a11y shortcut no responisble.

Preview: https://screenshot.googleplex.com/YWMnRGsPTm4hz6X

Test: tested on ADT3
Bug: 244128422
Change-Id: Id6f9d6f2ca90b79ff35ee5b14579915f059deb13
parent dd028ec3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ public class AccessibilityUtils {
        final String currentShortcutServiceId = Settings.Secure.getStringForUser(
                context.getContentResolver(), Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE,
                userId);
        if (currentShortcutServiceId != null) {
        if (!TextUtils.isEmpty(currentShortcutServiceId)) {
            return currentShortcutServiceId;
        }
        return context.getString(R.string.config_defaultAccessibilityService);