Commit 0a37b3be authored by Clemens Arbesser's avatar Clemens Arbesser Committed by Commit Bot

[Autofill Assistant] Fix initial bottomsheet size.

This CL fixes a bug in the bottom sheet where size change notifications while in SCROLLING state where ignored. See the linked bug for more information.

Bug: b/144838045
Change-Id: I825ed22c2078873fcf7295f86e99d4b14b01cc56
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1926479Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Reviewed-by: default avatarMathias Carlen <mcarlen@chromium.org>
Commit-Queue: Clemens Arbesser <arbesser@google.com>
Cr-Commit-Position: refs/heads/master@{#717600}
parent 4d2a057c
...@@ -1125,7 +1125,14 @@ class BottomSheet extends FrameLayout ...@@ -1125,7 +1125,14 @@ class BottomSheet extends FrameLayout
* Called when the sheet content size changed. * Called when the sheet content size changed.
*/ */
private void onContentSizeChanged(int width, int height, int oldWidth, int oldHeight) { private void onContentSizeChanged(int width, int height, int oldWidth, int oldHeight) {
boolean heightChanged = mContentDesiredHeight != height;
mContentDesiredHeight = height; mContentDesiredHeight = height;
if (heightChanged && mCurrentState == SheetState.SCROLLING) {
endAnimations();
return;
}
ensureContentIsWrapped(/* animate= */ false); ensureContentIsWrapped(/* animate= */ 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