Merge "Don't limit fullscreen stack window size to parent window size"

This commit is contained in:
Wale Ogunwale
2015-04-22 21:41:43 +00:00
committed by Android (Google) Code Review

View File

@@ -523,8 +523,9 @@ final class WindowState implements WindowManagerPolicy.WindowState {
public void computeFrameLw(Rect pf, Rect df, Rect of, Rect cf, Rect vf, Rect dcf, Rect sf) {
mHaveFrame = true;
TaskStack stack = mAppToken != null ? getStack() : null;
if (stack != null && !stack.isFullscreen()) {
final TaskStack stack = mAppToken != null ? getStack() : null;
final boolean nonFullscreenStack = stack != null && !stack.isFullscreen();
if (nonFullscreenStack) {
stack.getBounds(mContainingFrame);
final WindowState imeWin = mService.mInputMethodWindow;
if (imeWin != null && imeWin.isVisibleNow() && mService.mInputMethodTarget == this
@@ -607,9 +608,13 @@ final class WindowState implements WindowManagerPolicy.WindowState {
y = mAttrs.y;
}
// Make sure window fits in containing frame required by {@link Gravity#apply} call.
w = Math.min(w, pw);
h = Math.min(h, ph);
if (nonFullscreenStack) {
// Make sure window fits in containing frame since it is in a non-fullscreen stack as
// required by {@link Gravity#apply} call.
w = Math.min(w, pw);
h = Math.min(h, ph);
}
Gravity.apply(mAttrs.gravity, w, h, mContainingFrame,
(int) (x + mAttrs.horizontalMargin * pw),
(int) (y + mAttrs.verticalMargin * ph), mFrame);