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
This commit is contained in:
Hongwei Wang
2021-11-11 16:05:39 -08:00
parent bcc3f65352
commit abf3d3b948
2 changed files with 6 additions and 0 deletions

View File

@@ -463,6 +463,7 @@ public class PipController implements PipTransitionController.PipTransitionCallb
}
private void onOverlayChanged() {
mTouchHandler.onOverlayChanged();
onDisplayChanged(new DisplayLayout(mContext, mContext.getDisplay()),
false /* saveRestoreSnapFraction */);
}

View File

@@ -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;
}