Skip to content
Commit da16f224 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Fallback BUTTON_MODE to HOME

Currently, BUTTON_MODE falls back to MENU.
It is not clear which functionality relies on that. However, many
joysticks currently map their "branded" button, for example, the "XBOX"
key on the Xbox joystick, and "PS" key on the playstation joystick, to
the BUTTON_MODE. On other joysticks, the same button is mapped to
"HOME". So it would make sense to have this button to fall back to HOME
in order to make the behaviour consistent.

Also, remap the "XBOX" button on the Xbox controller to "BUTTON_MODE".
This would give apps the chance to intercept this key and actually use
it, instead of limiting it to the system.

Bug: 37115804
Bug: 77803694
Test: Made a test app to dump out joystick events in response to
dispatchKeyEvent. Then either returned true or false to ensure that the
fallback happens. If returning true, the app has handled the event, and
HOME is not dispatched. If returning false, the app does not care about
the event. Therefore, HOME is generated and the phone goes to home
screen (so the app gets closed).

Change-Id: I023620551f52d34638303db60f8a4ca37f06d4d8
parent 27906ac9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment