Ensure only single pip dismiss magnetized target exists
- If init() is called multiple times, the previous magnetized targets can cause the wrong target position to be calculated when trying (or not trying) to dismiss Bug: 213348722 Test: Manual Change-Id: Ic1f972cc60eafca2302ad168065c974c8a0ee924
This commit is contained in:
@@ -140,6 +140,7 @@ public class PipDismissTargetHandler implements ViewTreeObserver.OnPreDrawListen
|
||||
});
|
||||
|
||||
mMagnetizedPip = mMotionHelper.getMagnetizedPip();
|
||||
mMagnetizedPip.clearAllTargets();
|
||||
mMagneticTarget = mMagnetizedPip.addTarget(mTargetView, 0);
|
||||
updateMagneticTargetSize();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user