Merge changes from topic "cherrypicker-L72500000958763307:N21300001339715669" into udc-dev

* changes:
  Do not disable the default shortcut at the end of setup.
  Revert "Fix the accessibility shortcut funtionaility."
This commit is contained in:
Thomas Leu
2023-02-23 05:44:57 +00:00
committed by Android (Google) Code Review
2 changed files with 6 additions and 1 deletions

View File

@@ -650,6 +650,11 @@ public class AccessibilityShortcutController {
*
*/
private void setEmptyShortcutTargetIfNeeded() {
if (hasFeatureLeanback()) {
// Do not disable the default shortcut on TV.
return;
}
final ContentResolver contentResolver = mContext.getContentResolver();
final String shortcutTargets = Settings.Secure.getStringForUser(contentResolver,

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);