Commit b3c68405 authored by Mia Glaese's avatar Mia Glaese Committed by Commit Bot

[Start Surface] Fix bug that logo disappears on sign out in landscape

The identity disc visibility is set to gone on sign out.
After it is set to gone, it is not considered onLoayout, but it keeps
its position and size. Therefore the gone view will be hanging around
the middle of the screen in landscape and overlay with the logo.

Now we only consider views that are not GONE when determining whether the
logo intersects with any sibling view.

Bug: 1044914
Change-Id: I3b79119c3f6dad002a0cc8366677447b0146e1bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2020889
Commit-Queue: Mia Glaese <glamia@chromium.org>
Reviewed-by: default avatarYusuf Ozuysal <yusufo@chromium.org>
Reviewed-by: default avatarGanggui Tang <gogerald@chromium.org>
Cr-Commit-Position: refs/heads/master@{#737504}
parent ad44950e
......@@ -71,7 +71,9 @@ class StartSurfaceToolbarView extends RelativeLayout {
mLogoRect.set(mLogo.getLeft(), mLogo.getTop(), mLogo.getRight(), mLogo.getBottom());
for (int viewIndex = 0; viewIndex < getChildCount(); viewIndex++) {
View view = getChildAt(viewIndex);
if (view == mLogo) continue;
if (view == mLogo || view.getVisibility() == View.GONE) continue;
assert view.getVisibility() == View.VISIBLE;
mViewRect.set(view.getLeft(), view.getTop(), view.getRight(), view.getBottom());
if (Rect.intersects(mLogoRect, mViewRect)) {
mLogo.setVisibility(View.GONE);
......
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