Fix a couple of issues with insets
- Prevent any other animations running in WM that may override
the inset control.
- Ensure that we give the client control when the window gets
added.
Test: Show IME the first time
Bug: 111084606
Change-Id: I841d262103dc14e4aa71dbd37b696c76d822abd7
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 8f86c00..7d900e5 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -4371,6 +4371,12 @@
}
void startAnimation(Animation anim) {
+
+ // If we are an inset provider, all our animations are driven by the inset client.
+ if (mInsetProvider != null && mInsetProvider.isControllable()) {
+ return;
+ }
+
final DisplayInfo displayInfo = getDisplayContent().getDisplayInfo();
anim.initialize(mWindowFrames.mFrame.width(), mWindowFrames.mFrame.height(),
displayInfo.appWidth, displayInfo.appHeight);
@@ -4384,6 +4390,12 @@
}
private void startMoveAnimation(int left, int top) {
+
+ // If we are an inset provider, all our animations are driven by the inset client.
+ if (mInsetProvider != null && mInsetProvider.isControllable()) {
+ return;
+ }
+
if (DEBUG_ANIM) Slog.v(TAG, "Setting move animation on " + this);
final Point oldPosition = new Point();
final Point newPosition = new Point();