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

Commit abf3d3b9 authored by Hongwei Wang's avatar Hongwei Wang
Browse files

Update PiP dismiss target on theme change

Re-initiate the DismissCircleView upon theme change to make sure the PiP
dismiss target inherits the right theme color.

Bug: 199359063
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/bIMe3fAFoW6Nw47Ye894MZ
Test: manually, see video
Change-Id: Ia65c633fd636114ddbdc2ff497245e2cb73f7745
parent bcc3f653
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -463,6 +463,7 @@ public class PipController implements PipTransitionController.PipTransitionCallb
    }

    private void onOverlayChanged() {
        mTouchHandler.onOverlayChanged();
        onDisplayChanged(new DisplayLayout(mContext, mContext.getDisplay()),
                false /* saveRestoreSnapFraction */);
    }
+5 −0
Original line number Diff line number Diff line
@@ -259,6 +259,11 @@ public class PipTouchHandler {
        mPipDismissTargetHandler.updateMagneticTargetSize();
    }

    public void onOverlayChanged() {
        // onOverlayChanged is triggered upon theme change, update the dismiss target accordingly.
        mPipDismissTargetHandler.init();
    }

    private boolean shouldShowResizeHandle() {
        return false;
    }