Skip to content
Commit 50db731b authored by Peeyush Agarwal's avatar Peeyush Agarwal
Browse files

Implement requestKeyboardShortcuts for PopupDecorView

A call to requestKeyboardShortcuts from popup menu might be dispatched
to PopupDecorView or DecorView depending on WindowManagerService's
focusedWindow at that moment.

In case it gets dispatched to PopupDecorView, we would like to resend it
to parent activity's decor view (which can then handle it
appropriately). The change adds a notion of mParentRootView which keeps
track of popup's parent's decor view. The request is then routed
appropriately so as to display the corresponding shortcuts. mAnchor
cannot be used as it gets nulled (by dismiss) by the time
requestKeyboardShortcuts gets called.

Bug: 31850671
Change-Id: I0ee3a1c7801c6d3fce8748bc7513382f250c5c63
Fixes: 31850671
Test: cts-tradefed run cts-dev -m CtsAppTestCases -t
android.app.cts.ActivityKeyboardShortcutsTest#testRequestShowKeyboardShortcuts
parent 929a81b8
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