From 3d1190a5b5fd5dd8db19c1d479fb326719869dcd Mon Sep 17 00:00:00 2001 From: chaviw Date: Mon, 13 Jun 2022 21:48:42 -0500 Subject: [PATCH] Refactor SurfaceSyncer so it now returns a SurfaceSyncGroup Test: SurfaceSyncGroupContinuousTest Test: SurfaceSyncGroupTest Bug: 237804605 Change-Id: I4e7c1a1509cc64f2992fc07df0684d43fcf3dfc0 --- .../launcher3/taskbar/TaskbarDragController.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java index 04fcc44b55..8ca9dba7a4 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java @@ -37,7 +37,7 @@ import android.view.MotionEvent; import android.view.SurfaceControl; import android.view.View; import android.view.ViewRootImpl; -import android.window.SurfaceSyncer; +import android.window.SurfaceSyncGroup; import androidx.annotation.Nullable; @@ -505,11 +505,11 @@ public class TaskbarDragController extends DragController im // maybeOnDragEnd() SurfaceControl.Transaction transaction = new SurfaceControl.Transaction(); transaction.remove(dragSurface); - SurfaceSyncer syncer = new SurfaceSyncer(); - int syncId = syncer.setupSync(transaction::close); - syncer.addToSync(syncId, viewRoot.getView()); - syncer.addTransactionToSync(syncId, transaction); - syncer.markSyncReady(syncId); + SurfaceSyncGroup syncGroup = new SurfaceSyncGroup(); + syncGroup.addSyncCompleteCallback(mActivity.getMainExecutor(), transaction::close); + syncGroup.addToSync(viewRoot); + syncGroup.addTransactionToSync(transaction); + syncGroup.markSyncReady(); mReturnAnimator = null; } });