am bd4808dc: Merge "Correctly resize dialogs when measured in WRAP_CONTENT Bug #2549649" into froyo

Merge commit 'bd4808dccf8cd3e5d8e96e667fa435a6c68e0f7c' into froyo-plus-aosp

* commit 'bd4808dccf8cd3e5d8e96e667fa435a6c68e0f7c':
  Correctly resize dialogs when measured in WRAP_CONTENT
This commit is contained in:
Romain Guy
2010-04-06 12:38:33 -07:00
committed by Android Git Automerger

View File

@@ -852,7 +852,11 @@ public final class ViewRoot extends Handler implements ViewParent,
}
boolean windowShouldResize = mLayoutRequested && windowResizesToFitContent
&& (mWidth != host.mMeasuredWidth || mHeight != host.mMeasuredHeight);
&& ((mWidth != host.mMeasuredWidth || mHeight != host.mMeasuredHeight)
|| (lp.width == ViewGroup.LayoutParams.WRAP_CONTENT &&
frame.width() < desiredWindowWidth && frame.width() != mWidth)
|| (lp.height == ViewGroup.LayoutParams.WRAP_CONTENT &&
frame.height() < desiredWindowHeight && frame.height() != mHeight));
final boolean computesInternalInsets =
attachInfo.mTreeObserver.hasComputeInternalInsetsListeners();