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

Commit 15cac263 authored by Yan Han's avatar Yan Han
Browse files

On TV, make KEYCODE_SEARCH launch Assistant with keyboard

Currently, KEYCODE_ASSIST and KEYCODE_SEARCH both launch Assistant with voice UI on TV. This change splits the behavior of the keycodes, making KEYCODE_SEARCH suitable for mic-less remotes that wish to show text input instead of voice input.

Test: manual -
adb shell input keyevent KEYCODE_SEARCH -> keyboard UI
adb shell input keyevent KEYCODE_ASSIST -> voice UI
Assistant button on paired bluetooth remote -> voice UI

Flag: NONE small, TV-only change

Bug: 315264352

Change-Id: I764cddbfe84954d4712c8efab2c4f8fa087e0fb2
parent 6590abee
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3333,6 +3333,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
            Bundle args = new Bundle();
            args.putInt(Intent.EXTRA_ASSIST_INPUT_DEVICE_ID, event.getDeviceId());
            args.putLong(Intent.EXTRA_TIME, event.getEventTime());
            args.putBoolean(Intent.EXTRA_ASSIST_INPUT_HINT_KEYBOARD, true);
            ((SearchManager) getContext().getSystemService(Context.SEARCH_SERVICE))
                    .launchAssist(args);
            return true;