From 15578338b53053878264a07d201d32ac4fdde698 Mon Sep 17 00:00:00 2001 From: Tony Huang Date: Tue, 7 Jun 2022 15:56:21 +0800 Subject: [PATCH] [DO NOT MERGE] Fix founction not found on tm cts tests We refactor setAdjacentRoots function on tm-qpr but cts suite is still using tm branch and it lead to it cannot found previous function. Add a temp function params same as old one on tm-qpr only for pass tests. Fix: 235169332 Test: atest MultiWindowTests on tm-dev codebase Change-Id: I3eaea698089cec78ef7fcef17817317c55a7bfe6 --- core/api/test-current.txt | 1 + .../android/window/WindowContainerTransaction.java | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/core/api/test-current.txt b/core/api/test-current.txt index 2df158d1b565d..bc6a6a5b76f25 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -3394,6 +3394,7 @@ package android.window { method @NonNull public android.window.WindowContainerTransaction scheduleFinishEnterPip(@NonNull android.window.WindowContainerToken, @NonNull android.graphics.Rect); method @NonNull public android.window.WindowContainerTransaction setActivityWindowingMode(@NonNull android.window.WindowContainerToken, int); method @NonNull public android.window.WindowContainerTransaction setAdjacentRoots(@NonNull android.window.WindowContainerToken, @NonNull android.window.WindowContainerToken); + method @Deprecated @NonNull public android.window.WindowContainerTransaction setAdjacentRoots(@NonNull android.window.WindowContainerToken, @NonNull android.window.WindowContainerToken, boolean); method @NonNull public android.window.WindowContainerTransaction setAdjacentTaskFragments(@NonNull android.os.IBinder, @Nullable android.os.IBinder, @Nullable android.window.WindowContainerTransaction.TaskFragmentAdjacentParams); method @NonNull public android.window.WindowContainerTransaction setAppBounds(@NonNull android.window.WindowContainerToken, @NonNull android.graphics.Rect); method @NonNull public android.window.WindowContainerTransaction setBounds(@NonNull android.window.WindowContainerToken, @NonNull android.graphics.Rect); diff --git a/core/java/android/window/WindowContainerTransaction.java b/core/java/android/window/WindowContainerTransaction.java index 633d87937049d..a87b91d87f1cf 100644 --- a/core/java/android/window/WindowContainerTransaction.java +++ b/core/java/android/window/WindowContainerTransaction.java @@ -391,6 +391,19 @@ public final class WindowContainerTransaction implements Parcelable { return this; } + /** + * This is temp function for compatible with old cts tests suite and it equal to + * {@link #setAdjacentRoots(WindowContainerToken, WindowContainerToken). + * @deprecated should use {@link #setAdjacentRoots(WindowContainerToken, WindowContainerToken)} + */ + @Deprecated + @NonNull + public WindowContainerTransaction setAdjacentRoots( + @NonNull WindowContainerToken root1, @NonNull WindowContainerToken root2, + boolean moveTogether) { + return setAdjacentRoots(root1, root2); + } + /** * Sets the container as launch adjacent flag root. Task starting with * {@link FLAG_ACTIVITY_LAUNCH_ADJACENT} will be launching to.