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

Commit 68ed2609 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Remove override prepareSurfaces of Task

Since the visibility logic is removed from prepareSurfaces,
the implementation in Task and TaskFragment are the same.

Bug: 163976519
Flag: EXEMPT remove duplicated code
Test: CtsWindowManagerDeviceActivity
Change-Id: Ic2051b4fb36bc40c160047d3c31c0a864b779ae5
parent d55f80cc
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -3366,16 +3366,6 @@ class Task extends TaskFragment {
        return inMultiWindowMode() || !isTranslucentAndVisible();
    }

    @Override
    void prepareSurfaces() {
        mDimmer.resetDimStates();
        super.prepareSurfaces();

        if (mDimmer.hasDimState() && mDimmer.updateDims(getSyncTransaction())) {
            scheduleAnimation();
        }
    }

    @Override
    void updateSurfaceVisibility(SurfaceControl.Transaction t) {
        t.setVisibility(mSurfaceControl, isVisible());
+1 −6
Original line number Diff line number Diff line
@@ -3389,15 +3389,10 @@ class TaskFragment extends WindowContainer<WindowContainer> {

    @Override
    void prepareSurfaces() {
        if (asTask() != null) {
            super.prepareSurfaces();
            return;
        }

        mDimmer.resetDimStates();
        super.prepareSurfaces();

        if (mDimmer.updateDims(getSyncTransaction())) {
        if (mDimmer.hasDimState() && mDimmer.updateDims(getSyncTransaction())) {
            scheduleAnimation();
        }
    }