mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Merge "Refactor SurfaceSyncer so it now returns a SurfaceSyncGroup"
This commit is contained in:
committed by
Android (Google) Code Review
commit
254b0c4e94
@@ -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<BaseTaskbarContext> 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;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user