WM: Fix jumpcut animations

ROTATION_ANIMATION_JUMPCUT behaves like ROTATION_ANIMATION_SEAMLESS. In some cases we want to
simply freeze the screen while the app draws in the newrotation. This will revert back the
previous behavior.

Also fixes a flicker seen during jumpcut animation by fixing the inital position of the black
frame. The position was not set for Enter black frames when it was created.

Bug: 118169297
Test: atest FlickerTest:JumpcutAppRotationTest
Test: manually test with unity test app and verify jumpcut animation works
Change-Id: I87fd2b8536102e1c26adcf6ae16279aeb68d1e53
diff --git a/services/core/java/com/android/server/wm/BlackFrame.java b/services/core/java/com/android/server/wm/BlackFrame.java
index fff1fa4..e358ad5 100644
--- a/services/core/java/com/android/server/wm/BlackFrame.java
+++ b/services/core/java/com/android/server/wm/BlackFrame.java
@@ -16,21 +16,18 @@
 
 package com.android.server.wm;
 
-import static android.graphics.PixelFormat.OPAQUE;
-import static android.view.SurfaceControl.FX_SURFACE_DIM;
 import static com.android.server.wm.WindowManagerDebugConfig.SHOW_SURFACE_ALLOC;
 import static com.android.server.wm.WindowManagerDebugConfig.SHOW_TRANSACTIONS;
 import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
 
-import java.io.PrintWriter;
-
 import android.graphics.Matrix;
-import android.graphics.PixelFormat;
 import android.graphics.Rect;
 import android.util.Slog;
 import android.view.Surface.OutOfResourcesException;
 import android.view.SurfaceControl;
 
+import java.io.PrintWriter;
+
 /**
  * Four black surfaces put together to make a black frame.
  */
@@ -59,6 +56,7 @@
             transaction.setLayerStack(surface, dc.getDisplayId());
             transaction.setAlpha(surface, 1);
             transaction.setLayer(surface, layer);
+            transaction.setPosition(surface, left, top);
             transaction.show(surface);
             if (SHOW_TRANSACTIONS || SHOW_SURFACE_ALLOC) Slog.i(TAG_WM,
                             "  BLACK " + surface + ": CREATE layer=" + layer);