Merge "Fix RemoteTransitionTest" into udc-dev am: 596240b3bc

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23053777

Change-Id: I2f2394844c7ab42af934004cdf2dfae178324975
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Tony Huang
2023-05-08 03:56:16 +00:00
committed by Automerger Merge Worker
2 changed files with 4 additions and 4 deletions

View File

@@ -311,7 +311,7 @@ public class TransitionUtil {
private static RemoteAnimationTarget getDividerTarget(TransitionInfo.Change change,
SurfaceControl leash) {
return new RemoteAnimationTarget(-1 /* taskId */, -1 /* mode */,
return new RemoteAnimationTarget(-1 /* taskId */, newModeToLegacyMode(change.getMode()),
leash, false /* isTranslucent */, null /* clipRect */,
null /* contentInsets */, Integer.MAX_VALUE /* prefixOrderIndex */,
new android.graphics.Point(0, 0) /* position */, change.getStartAbsBounds(),

View File

@@ -24,13 +24,13 @@ import static android.view.RemoteAnimationTarget.MODE_OPENING;
import static android.view.WindowManager.TRANSIT_CHANGE;
import static android.view.WindowManager.TRANSIT_CLOSE;
import static android.view.WindowManager.TRANSIT_OPEN;
import static android.window.TransitionInfo.FLAG_FIRST_CUSTOM;
import static android.window.TransitionInfo.FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY;
import static android.window.TransitionInfo.FLAG_IS_WALLPAPER;
import static android.window.TransitionInfo.FLAG_SHOW_WALLPAPER;
import static android.window.TransitionInfo.FLAG_TRANSLUCENT;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn;
import static com.android.wm.shell.common.split.SplitScreenConstants.FLAG_IS_DIVIDER_BAR;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -76,7 +76,7 @@ public class RemoteTransitionTest extends SysuiTestCase {
.addChange(TRANSIT_CLOSE, 0 /* flags */,
createTaskInfo(2 /* taskId */, ACTIVITY_TYPE_STANDARD))
.addChange(TRANSIT_OPEN, FLAG_IS_WALLPAPER, null /* taskInfo */)
.addChange(TRANSIT_CHANGE, FLAG_FIRST_CUSTOM, null /* taskInfo */)
.addChange(TRANSIT_CHANGE, FLAG_IS_DIVIDER_BAR, null /* taskInfo */)
.build();
// Check apps extraction
RemoteAnimationTarget[] wrapped = RemoteAnimationTargetCompat.wrapApps(combined,
@@ -107,7 +107,7 @@ public class RemoteTransitionTest extends SysuiTestCase {
RemoteAnimationTarget[] nonApps = RemoteAnimationTargetCompat.wrapNonApps(combined,
false /* wallpapers */, mock(SurfaceControl.Transaction.class), null /* leashes */);
assertEquals(1, nonApps.length);
assertTrue(nonApps[0].prefixOrderIndex < closeLayer);
assertTrue(nonApps[0].prefixOrderIndex == Integer.MAX_VALUE);
assertEquals(MODE_CHANGING, nonApps[0].mode);
}