Revert "Fix the accessibility shortcut funtionaility."

This reverts commit 72c52dfb48.

Reason for revert: The original commit only changed what was displayed in the settings, but not the actual value of the setting that was used during the shortcut operation.

Bug: b/269693551
Test: Locally tested on adt4-userdebug that the shortcut does not show TalkBack as target service if it is set to an empty string and the settings are opened for the very first time.

Change-Id: Ife2e098d1e55ed94efb2426505872546b27bc3bb
(cherry picked from commit db7d6590a3)
Merged-In: Ife2e098d1e55ed94efb2426505872546b27bc3bb
This commit is contained in:
Thomas Leu
2023-02-16 11:27:25 +00:00
committed by Cherrypicker Worker
parent fcb2bb5183
commit 00329792d2

View File

@@ -183,7 +183,7 @@ public class AccessibilityUtils {
final String currentShortcutServiceId = Settings.Secure.getStringForUser(
context.getContentResolver(), Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE,
userId);
if (!TextUtils.isEmpty(currentShortcutServiceId)) {
if (currentShortcutServiceId != null) {
return currentShortcutServiceId;
}
return context.getString(R.string.config_defaultAccessibilityService);