am 521ded6e: am dbf8c0d9: am 991e4936: am cbacd4f0: Merge "Don\'t perform layout while adjusting displays/stacks state." into mnc-dev
* commit '521ded6e9dcb9e97843c89f6d7c87264107d4ef7': Don't perform layout while adjusting displays/stacks state.
This commit is contained in:
@@ -375,7 +375,10 @@ public class TaskStack {
|
|||||||
for (int appNdx = appWindowTokens.size() - 1; appNdx >= 0; --appNdx) {
|
for (int appNdx = appWindowTokens.size() - 1; appNdx >= 0; --appNdx) {
|
||||||
final WindowList appWindows = appWindowTokens.get(appNdx).allAppWindows;
|
final WindowList appWindows = appWindowTokens.get(appNdx).allAppWindows;
|
||||||
for (int winNdx = appWindows.size() - 1; winNdx >= 0; --winNdx) {
|
for (int winNdx = appWindows.size() - 1; winNdx >= 0; --winNdx) {
|
||||||
mService.removeWindowInnerLocked(appWindows.get(winNdx));
|
// We are in the middle of changing the state of displays/stacks/tasks. We need
|
||||||
|
// to finish that, before we let layout interfere with it.
|
||||||
|
mService.removeWindowInnerLocked(appWindows.get(winNdx),
|
||||||
|
false /* performLayout */);
|
||||||
doAnotherLayoutPass = true;
|
doAnotherLayoutPass = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2794,6 +2794,10 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
}
|
}
|
||||||
|
|
||||||
void removeWindowInnerLocked(WindowState win) {
|
void removeWindowInnerLocked(WindowState win) {
|
||||||
|
removeWindowInnerLocked(win, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void removeWindowInnerLocked(WindowState win, boolean performLayout) {
|
||||||
if (win.mRemoved) {
|
if (win.mRemoved) {
|
||||||
// Nothing to do.
|
// Nothing to do.
|
||||||
return;
|
return;
|
||||||
@@ -2891,7 +2895,9 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
if (displayContent != null) {
|
if (displayContent != null) {
|
||||||
displayContent.layoutNeeded = true;
|
displayContent.layoutNeeded = true;
|
||||||
}
|
}
|
||||||
|
if (performLayout) {
|
||||||
performLayoutAndPlaceSurfacesLocked();
|
performLayoutAndPlaceSurfacesLocked();
|
||||||
|
}
|
||||||
if (win.mAppToken != null) {
|
if (win.mAppToken != null) {
|
||||||
win.mAppToken.updateReportedVisibilityLocked();
|
win.mAppToken.updateReportedVisibilityLocked();
|
||||||
}
|
}
|
||||||
@@ -5194,8 +5200,10 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void removeStack(int stackId) {
|
public void removeStack(int stackId) {
|
||||||
|
synchronized (mWindowMap) {
|
||||||
mStackIdToStack.remove(stackId);
|
mStackIdToStack.remove(stackId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void removeTask(int taskId) {
|
public void removeTask(int taskId) {
|
||||||
synchronized (mWindowMap) {
|
synchronized (mWindowMap) {
|
||||||
@@ -5268,11 +5276,13 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void getStackBounds(int stackId, Rect bounds) {
|
public void getStackBounds(int stackId, Rect bounds) {
|
||||||
|
synchronized (mWindowMap) {
|
||||||
final TaskStack stack = mStackIdToStack.get(stackId);
|
final TaskStack stack = mStackIdToStack.get(stackId);
|
||||||
if (stack != null) {
|
if (stack != null) {
|
||||||
stack.getBounds(bounds);
|
stack.getBounds(bounds);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
bounds.setEmpty();
|
bounds.setEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user