Merge "Ensure that popup width and height are correct on update" into nyc-dev

am: 9e6fe19

* commit '9e6fe190468ca83a350e2e59e4622674142d1fd4':
  Ensure that popup width and height are correct on update
This commit is contained in:
Alan Viverette
2016-03-22 19:37:23 +00:00
committed by android-build-merger

View File

@@ -2027,21 +2027,24 @@ public class PopupWindow {
mAnchorYoff = yoff;
}
final WindowManager.LayoutParams p =
(WindowManager.LayoutParams) mDecorView.getLayoutParams();
if (updateDimension) {
if (width == -1) {
width = mPopupWidth;
} else {
mPopupWidth = width;
p.width = width;
}
if (height == -1) {
height = mPopupHeight;
} else {
mPopupHeight = height;
p.height = height;
}
}
final WindowManager.LayoutParams p =
(WindowManager.LayoutParams) mDecorView.getLayoutParams();
final int x = p.x;
final int y = p.y;
if (updateLocation) {