Commit 597ba12c authored by Theresa Wellington's avatar Theresa Wellington Committed by Commit Bot

Don't show app menu if DecorView isn't attached to the Window

Bug: 1105831
Change-Id: Ic433031ce79b7eb837bbc6599f5a098760006704
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2299470Reviewed-by: default avatarPatrick Noland <pnoland@chromium.org>
Commit-Queue: Theresa  <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789225}
parent eb83a6ff
......@@ -335,6 +335,12 @@ class AppMenuHandlerImpl
}
boolean shouldShowAppMenu() {
// If the activity's decor view is not attached to window, we don't show the app menu
// because the window manager might have revoked the window token for this activity. See
// https://crbug.com/1105831.
if (!mDecorView.isAttachedToWindow()) {
return false;
}
for (int i = 0; i < mBlockers.size(); i++) {
if (!mBlockers.get(i).canShowAppMenu()) return false;
}
......
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