Put windows into resizing during IME adjust animation
Because the IME animates in with translucency there was a black hole
visible at the bottom. This CL puts the window into resizing mode,
waits until the change is commited, and then starts the animation
Bug: 28175599
Change-Id: Ib31c1e765639e5490208bccba77b25318ec8dc71
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 7b16dbe..13bfa57 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -509,6 +509,22 @@
return mDragResizeMode;
}
+ /**
+ * Adds all of the tasks windows to {@link WindowManagerService#mWaitingForDrawn} if drag
+ * resizing state of the window has been changed.
+ */
+ void addWindowsWaitingForDrawnIfResizingChanged() {
+ for (int activityNdx = mAppTokens.size() - 1; activityNdx >= 0; --activityNdx) {
+ final ArrayList<WindowState> windows = mAppTokens.get(activityNdx).allAppWindows;
+ for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) {
+ final WindowState win = windows.get(winNdx);
+ if (win.isDragResizeChanged()) {
+ mService.mWaitingForDrawn.add(win);
+ }
+ }
+ }
+ }
+
void updateDisplayInfo(final DisplayContent displayContent) {
if (displayContent == null) {
return;
@@ -619,6 +635,16 @@
return false;
}
+ boolean isVisible() {
+ for (int i = mAppTokens.size() - 1; i >= 0; i--) {
+ final AppWindowToken appToken = mAppTokens.get(i);
+ if (appToken.isVisible()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
boolean inHomeStack() {
return mStack != null && mStack.mStackId == HOME_STACK_ID;
}