Loading packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java +3 −1 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import static android.view.WindowManager.TRANSIT_CLOSE; import static android.view.WindowManager.TRANSIT_OPEN; import static android.view.WindowManager.TRANSIT_TO_BACK; import static android.view.WindowManager.TRANSIT_TO_FRONT; 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_STARTING_WINDOW_TRANSFER_RECIPIENT; Loading Loading @@ -228,7 +229,8 @@ public class RemoteAnimationTargetCompat { public static RemoteAnimationTarget[] wrapNonApps(TransitionInfo info, boolean wallpapers, SurfaceControl.Transaction t, ArrayMap<SurfaceControl, SurfaceControl> leashMap) { return wrap(info, t, leashMap, (change, taskInfo) -> (taskInfo == null) && wallpapers == ((change.getFlags() & TransitionInfo.FLAG_IS_WALLPAPER) != 0)); && wallpapers == change.hasFlags(FLAG_IS_WALLPAPER) && !change.hasFlags(FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY)); } private static RemoteAnimationTarget[] wrap(TransitionInfo info, Loading packages/SystemUI/tests/src/com/android/systemui/shared/system/RemoteTransitionTest.java +5 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ 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; Loading Loading @@ -69,10 +70,13 @@ public class RemoteTransitionTest extends SysuiTestCase { TransitionInfo combined = new TransitionInfoBuilder(TRANSIT_CLOSE) .addChange(TRANSIT_CHANGE, FLAG_SHOW_WALLPAPER, createTaskInfo(1 /* taskId */, ACTIVITY_TYPE_STANDARD)) // Embedded TaskFragment should be excluded when animated with Task. .addChange(TRANSIT_CLOSE, FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY, null /* taskInfo */) .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 */).build(); .addChange(TRANSIT_CHANGE, FLAG_FIRST_CUSTOM, null /* taskInfo */) .build(); // Check apps extraction RemoteAnimationTarget[] wrapped = RemoteAnimationTargetCompat.wrapApps(combined, mock(SurfaceControl.Transaction.class), null /* leashes */); Loading Loading
packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java +3 −1 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import static android.view.WindowManager.TRANSIT_CLOSE; import static android.view.WindowManager.TRANSIT_OPEN; import static android.view.WindowManager.TRANSIT_TO_BACK; import static android.view.WindowManager.TRANSIT_TO_FRONT; 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_STARTING_WINDOW_TRANSFER_RECIPIENT; Loading Loading @@ -228,7 +229,8 @@ public class RemoteAnimationTargetCompat { public static RemoteAnimationTarget[] wrapNonApps(TransitionInfo info, boolean wallpapers, SurfaceControl.Transaction t, ArrayMap<SurfaceControl, SurfaceControl> leashMap) { return wrap(info, t, leashMap, (change, taskInfo) -> (taskInfo == null) && wallpapers == ((change.getFlags() & TransitionInfo.FLAG_IS_WALLPAPER) != 0)); && wallpapers == change.hasFlags(FLAG_IS_WALLPAPER) && !change.hasFlags(FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY)); } private static RemoteAnimationTarget[] wrap(TransitionInfo info, Loading
packages/SystemUI/tests/src/com/android/systemui/shared/system/RemoteTransitionTest.java +5 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ 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; Loading Loading @@ -69,10 +70,13 @@ public class RemoteTransitionTest extends SysuiTestCase { TransitionInfo combined = new TransitionInfoBuilder(TRANSIT_CLOSE) .addChange(TRANSIT_CHANGE, FLAG_SHOW_WALLPAPER, createTaskInfo(1 /* taskId */, ACTIVITY_TYPE_STANDARD)) // Embedded TaskFragment should be excluded when animated with Task. .addChange(TRANSIT_CLOSE, FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY, null /* taskInfo */) .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 */).build(); .addChange(TRANSIT_CHANGE, FLAG_FIRST_CUSTOM, null /* taskInfo */) .build(); // Check apps extraction RemoteAnimationTarget[] wrapped = RemoteAnimationTargetCompat.wrapApps(combined, mock(SurfaceControl.Transaction.class), null /* leashes */); Loading