Merge "Fixed issue with resized stack sticking to the top of the screen."

This commit is contained in:
Wale Ogunwale
2015-02-04 00:29:20 +00:00
committed by Android (Google) Code Review
2 changed files with 9 additions and 13 deletions

View File

@@ -90,12 +90,17 @@ public class TaskStack {
// stack bounds once the stack is no longer forced to fullscreen.
final private Rect mPreForceFullscreenBounds;
// When true this stack is at the top of the screen and should be layed out to extend under
// the status bar.
boolean mUnderStatusBar;
TaskStack(WindowManagerService service, int stackId) {
mService = service;
mStackId = stackId;
mOverrideConfig = Configuration.EMPTY;
mForceFullscreen = false;
mPreForceFullscreenBounds = new Rect();
mUnderStatusBar = true;
// TODO: remove bounds from log, they are always 0.
EventLog.writeEvent(EventLogTags.WM_STACK_CREATED, stackId, mBounds.left, mBounds.top,
mBounds.right, mBounds.bottom);
@@ -110,8 +115,6 @@ public class TaskStack {
}
void resizeWindows() {
final boolean underStatusBar = mBounds.top == 0;
final ArrayList<WindowState> resizingWindows = mService.mResizingWindows;
for (int taskNdx = mTasks.size() - 1; taskNdx >= 0; --taskNdx) {
final ArrayList<AppWindowToken> activities = mTasks.get(taskNdx).mAppTokens;
@@ -124,7 +127,6 @@ public class TaskStack {
"setBounds: Resizing " + win);
resizingWindows.add(win);
}
win.mUnderStatusBar = underStatusBar;
}
}
}
@@ -155,6 +157,7 @@ public class TaskStack {
mDimLayer.setBounds(bounds);
mAnimationBackgroundSurface.setBounds(bounds);
mBounds.set(bounds);
mUnderStatusBar = (mBounds.top == 0);
updateOverrideConfiguration();
return true;
}

View File

@@ -342,10 +342,6 @@ final class WindowState implements WindowManagerPolicy.WindowState {
/** When true this window can be displayed on screens owther than mOwnerUid's */
private boolean mShowToOwnerOnly;
/** When true this window is at the top of the screen and should be layed out to extend under
* the status bar */
boolean mUnderStatusBar = true;
WindowState(WindowManagerService service, Session s, IWindow c, WindowToken token,
WindowState attachedWindow, int appOp, int seq, WindowManager.LayoutParams a,
int viewVisibility, final DisplayContent displayContent) {
@@ -509,8 +505,8 @@ final class WindowState implements WindowManagerPolicy.WindowState {
TaskStack stack = mAppToken != null ? getStack() : null;
if (stack != null && !stack.isFullscreen()) {
getStackBounds(stack, mContainingFrame);
if (mUnderStatusBar) {
stack.getBounds(mContainingFrame);
if (stack.mUnderStatusBar) {
mContainingFrame.top = pf.top;
}
} else {
@@ -808,10 +804,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
}
void getStackBounds(Rect bounds) {
getStackBounds(getStack(), bounds);
}
private void getStackBounds(TaskStack stack, Rect bounds) {
final TaskStack stack = getStack();
if (stack != null) {
stack.getBounds(bounds);
return;