diff --git a/services/core/java/com/android/server/wm/AppWindowAnimator.java b/services/core/java/com/android/server/wm/AppWindowAnimator.java index 16edd35137fbe..65e3ec015bc6d 100644 --- a/services/core/java/com/android/server/wm/AppWindowAnimator.java +++ b/services/core/java/com/android/server/wm/AppWindowAnimator.java @@ -411,7 +411,9 @@ public class AppWindowAnimator { } if (DEBUG_ANIM) Slog.v(TAG, "Animation done in " + mAppToken - + ": reportedVisible=" + mAppToken.reportedVisible); + + ": reportedVisible=" + mAppToken.reportedVisible + + " okToDisplay=" + mService.okToDisplay() + + " startingDisplayed=" + mAppToken.startingDisplayed); transformation.clear(); diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 257f2856213e2..bbf7d9ff8a52d 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -520,9 +520,16 @@ class DisplayContent extends WindowContainer implements WindowManagerP boolean mHidden; // Used to determine if to show child windows. boolean mWallpaperVisible; // for wallpaper, what was last vis report? private boolean mDragResizing; - private boolean mDragResizingChangeReported; + private boolean mDragResizingChangeReported = true; private int mResizeMode; private RemoteCallbackList mFocusCallbacks; @@ -1155,11 +1155,7 @@ class WindowState extends WindowContainer implements WindowManagerP return; } - mLastOverscanInsets.set(mOverscanInsets); - mLastContentInsets.set(mContentInsets); - mLastVisibleInsets.set(mVisibleInsets); - mLastStableInsets.set(mStableInsets); - mLastOutsets.set(mOutsets); + updateLastInsetValues(); mService.makeWindowFreezingScreenIfNeededLocked(this); // If the orientation is changing, or we're starting or ending a drag resizing action, @@ -4404,6 +4400,24 @@ class WindowState extends WindowContainer implements WindowManagerP return result; } + /** + * @return True if this window has been laid out at least once; false otherwise. + */ + boolean isLaidOut() { + return mLayoutSeq != -1; + } + + /** + * Updates the last inset values to the current ones. + */ + void updateLastInsetValues() { + mLastOverscanInsets.set(mOverscanInsets); + mLastContentInsets.set(mContentInsets); + mLastVisibleInsets.set(mVisibleInsets); + mLastStableInsets.set(mStableInsets); + mLastOutsets.set(mOutsets); + } + // TODO: Hack to work around the number of states AppWindowToken needs to access without having // access to its windows children. Need to investigate re-writing // {@link AppWindowToken#updateReportedVisibilityLocked} so this can be removed.