PiP: Fully disable dismiss target.
When the flag is not enabled, we should not run any code even in onReleaseInTarget. Bug: 177038582 Test: None Change-Id: Iebf12d4405e462411aacfd4a3f38e566abafb858
This commit is contained in:
@@ -158,14 +158,16 @@ public class PipDismissTargetHandler implements ViewTreeObserver.OnPreDrawListen
|
||||
|
||||
@Override
|
||||
public void onReleasedInTarget(@NonNull MagnetizedObject.MagneticTarget target) {
|
||||
mMainExecutor.executeDelayed(() -> {
|
||||
mMotionHelper.notifyDismissalPending();
|
||||
mMotionHelper.animateDismiss();
|
||||
hideDismissTargetMaybe();
|
||||
if (mEnableDismissDragToEdge) {
|
||||
mMainExecutor.executeDelayed(() -> {
|
||||
mMotionHelper.notifyDismissalPending();
|
||||
mMotionHelper.animateDismiss();
|
||||
hideDismissTargetMaybe();
|
||||
|
||||
mPipUiEventLogger.log(
|
||||
PipUiEventLogger.PipUiEventEnum.PICTURE_IN_PICTURE_DRAG_TO_REMOVE);
|
||||
}, 0);
|
||||
mPipUiEventLogger.log(
|
||||
PipUiEventLogger.PipUiEventEnum.PICTURE_IN_PICTURE_DRAG_TO_REMOVE);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user