Commit f597024c authored by Friedrich Horschig's avatar Friedrich Horschig Committed by Commit Bot

[Android] Dismiss keyboard accessory before Menu actions

Some actions (currently "New Incognito Tab" and "Recent Tabs") open as
page in the current tab. Keyboards would be implicitly dismissed by
Android but an open Accessory closes only when the page changes. This
causes the activity to update its bounds too late and leave a patch on
the newly renderd page.

Therefore, this CL causes all accessory elements to be dismissed once
any action is selected.

Bug: 877029
Change-Id: I92a3174c7c7ffcb7e94e3b39b3a26b0eb7a4f1f3
Reviewed-on: https://chromium-review.googlesource.com/1188303Reviewed-by: default avatarBernhard Bauer <bauerb@chromium.org>
Commit-Queue: Friedrich Horschig [CEST] <fhorschig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585784}
parent 4a1e20a9
......@@ -1438,8 +1438,9 @@ public abstract class ChromeActivity extends AsyncInitializationActivity
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item != null && onMenuOrKeyboardAction(item.getItemId(), true)) {
return true;
if (item != null) {
if (mManualFillingController != null) mManualFillingController.dismiss();
if (onMenuOrKeyboardAction(item.getItemId(), true)) return true;
}
return super.onOptionsItemSelected(item);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment