From 00329792d2eaad9f0cd24db1660df881b1be7538 Mon Sep 17 00:00:00 2001 From: Thomas Leu Date: Thu, 16 Feb 2023 11:27:25 +0000 Subject: [PATCH] Revert "Fix the accessibility shortcut funtionaility." This reverts commit 72c52dfb48ccc051c487a2796efb09aa6657464f. 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 db7d6590a301a89a94d8e72103a5ad419f208537) Merged-In: Ife2e098d1e55ed94efb2426505872546b27bc3bb --- .../android/settingslib/accessibility/AccessibilityUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SettingsLib/src/com/android/settingslib/accessibility/AccessibilityUtils.java b/packages/SettingsLib/src/com/android/settingslib/accessibility/AccessibilityUtils.java index 85e8aad38808b..59735f413f9db 100644 --- a/packages/SettingsLib/src/com/android/settingslib/accessibility/AccessibilityUtils.java +++ b/packages/SettingsLib/src/com/android/settingslib/accessibility/AccessibilityUtils.java @@ -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);