Commit 08eac89f authored by Amirhossein Simjour's avatar Amirhossein Simjour Committed by Commit Bot

VR: remove the layout listener from mVrPopupContainer

Since the size is always updated using update method, the listener
is not needed. Moreover, the listener might have wrong width and
height information that can't be used for updating the buffer size.

The listener can get called during the updating the autofill
options with invalid Width() and Height() values. As a result,
buffer size would be wrong and Chrome crashes.

Bug: 830471
Change-Id: Ie634241a591f60e2680e291b6fbdf65c9186093b
Reviewed-on: https://chromium-review.googlesource.com/1002871Reviewed-by: default avatarMichael Thiessen <mthiesse@chromium.org>
Commit-Queue: Amirhossein Simjour <asimjour@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549281}
parent 9dd91389
...@@ -43,13 +43,6 @@ public class VrPopupWindow extends PopupWindow { ...@@ -43,13 +43,6 @@ public class VrPopupWindow extends PopupWindow {
mVrPopupContainer.setBackgroundDrawable(getBackground()); mVrPopupContainer.setBackgroundDrawable(getBackground());
mVrPopupContainer.addView(dialogView, params); mVrPopupContainer.addView(dialogView, params);
mVrDialogManager.setDialogView(mVrPopupContainer); mVrDialogManager.setDialogView(mVrPopupContainer);
mVrPopupContainer.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {
@Override
public void onLayoutChange(View v, int left, int top, int right, int bottom,
int oldLeft, int oldTop, int oldRight, int oldBottom) {
mVrDialogManager.setDialogSize(getWidth(), getHeight());
}
});
mVrDialogManager.initVrDialog(getWidth(), getHeight()); mVrDialogManager.initVrDialog(getWidth(), getHeight());
mVrDialogManager.setDialogFloating(); mVrDialogManager.setDialogFloating();
mVrDialogManager.setDialogLocation(x, y); mVrDialogManager.setDialogLocation(x, y);
......
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