Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db37d589 authored by Rob Carr's avatar Rob Carr
Browse files

WindowContainer: Obtain BLASTSyncTransaction from factory

So we don't mess up the tests using real objects.

Bug: 139371701
Test: Existing tests pass
Change-Id: Ib4be9997e8095d439b20624cf374f43e3d7aab47
parent d2d3e4d9
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -275,7 +275,7 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
    RemoteToken mRemoteToken = null;
    RemoteToken mRemoteToken = null;


    BLASTSyncEngine mBLASTSyncEngine = new BLASTSyncEngine();
    BLASTSyncEngine mBLASTSyncEngine = new BLASTSyncEngine();
    SurfaceControl.Transaction mBLASTSyncTransaction = new SurfaceControl.Transaction();
    SurfaceControl.Transaction mBLASTSyncTransaction;
    boolean mUsingBLASTSyncTransaction = false;
    boolean mUsingBLASTSyncTransaction = false;
    BLASTSyncEngine.TransactionReadyListener mWaitingListener;
    BLASTSyncEngine.TransactionReadyListener mWaitingListener;
    int mWaitingSyncId;
    int mWaitingSyncId;
@@ -283,6 +283,7 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
    WindowContainer(WindowManagerService wms) {
    WindowContainer(WindowManagerService wms) {
        mWmService = wms;
        mWmService = wms;
        mPendingTransaction = wms.mTransactionFactory.get();
        mPendingTransaction = wms.mTransactionFactory.get();
        mBLASTSyncTransaction = wms.mTransactionFactory.get();
        mSurfaceAnimator = new SurfaceAnimator(this, this::onAnimationFinished, wms);
        mSurfaceAnimator = new SurfaceAnimator(this, this::onAnimationFinished, wms);
        mSurfaceFreezer = new SurfaceFreezer(this, wms);
        mSurfaceFreezer = new SurfaceFreezer(this, wms);
    }
    }