Merge "Hide leash at beginning of animation instead of alpha"
diff --git a/services/core/java/com/android/server/wm/InsetsSourceProvider.java b/services/core/java/com/android/server/wm/InsetsSourceProvider.java
index cc55e01..3731d3f 100644
--- a/services/core/java/com/android/server/wm/InsetsSourceProvider.java
+++ b/services/core/java/com/android/server/wm/InsetsSourceProvider.java
@@ -241,6 +241,10 @@
         @Override
         public void startAnimation(SurfaceControl animationLeash, Transaction t,
                 OnAnimationFinishedCallback finishCallback) {
+            // TODO: use 0 alpha and remove t.hide() once b/138459974 is fixed.
+            t.setAlpha(animationLeash, 1 /* alpha */);
+            t.hide(animationLeash);
+
             mCapturedLeash = animationLeash;
             final Rect frame = mWin.getWindowFrames().mFrame;
             t.setPosition(mCapturedLeash, frame.left, frame.top);