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

Commit 0c449ec2 authored by jorgegil@google.com's avatar jorgegil@google.com
Browse files

Inject PipAnimationController into PipTaskOrg

Allows easier mocking in unit tests.

Bug: 159165010
Test: atest SystemUITests
Change-Id: Ib3efe837c14c140890e3b1b10a17579c7ceb9449
parent 8808b5a3
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -202,14 +202,15 @@ public class PipTaskOrganizer extends TaskOrganizer implements
    public PipTaskOrganizer(Context context, @NonNull PipBoundsHandler boundsHandler,
            @NonNull PipSurfaceTransactionHelper surfaceTransactionHelper,
            @Nullable Divider divider,
            @NonNull DisplayController displayController) {
            @NonNull DisplayController displayController,
            @NonNull PipAnimationController pipAnimationController) {
        mMainHandler = new Handler(Looper.getMainLooper());
        mUpdateHandler = new Handler(PipUpdateThread.get().getLooper(), mUpdateCallbacks);
        mPipBoundsHandler = boundsHandler;
        mEnterExitAnimationDuration = context.getResources()
                .getInteger(R.integer.config_pipResizeAnimationDuration);
        mSurfaceTransactionHelper = surfaceTransactionHelper;
        mPipAnimationController = new PipAnimationController(context, surfaceTransactionHelper);
        mPipAnimationController = pipAnimationController;
        mSurfaceControlTransactionFactory = SurfaceControl.Transaction::new;
        mSplitDivider = divider;
        displayController.addDisplayWindowListener(this);