Do not disable the default shortcut at the end of setup.

At the end of the setup process, the default Accessibility Shortcut target service gets disabled. This makes sense on Mobile, where many users would trigger the shortcut accidentally. However on TV, we find that to be very unlikely and would like to keep the shortcut enabled.

Bug: b/269689576
Test: Locally tested on adt4-userdebug that the shortcut works during setup, and after setup if not pressed during setup (factory reset in between).
Change-Id: I2d41d14fd60aa1c0c8856c6a8c72250cc72d813a
This commit is contained in:
Thomas Leu
2023-02-17 10:43:14 +01:00
parent 8f59bc4a4b
commit c13d2ac160

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,