Move logic that overrides MotionPauseDetector to callers
There are 2 conditions that we force the MotionPauseDetector to treat the motion as not paused: 1. If we haven't passed a small displacement (48dp before, 36dp now) 2. If we have moved mostly orthogonally These existed soley for the OtherActivityInputConsumer case, because 1. We only need the displacement requirement to make room for the peeking shelf, which doesn't exist in other cases (it's already there on home for example) 2. We can only move orthogonally for quick switch, which again doesn't exist for other users of MotionPauseDetector. So now instead of checking min displacement and orthogonal distance inside MotionPauseDetector, we let callers setDisallowPause() before adding positions to their MotionPauseDetector. The only user visible change is that you no longer have to swipe up 48dp before we allow pause to overview from home. This also paves the way to using the same logic that determines to disallowPause to also detach recents from the window while swiping up from an app. Bug: 129985827 Change-Id: Ie690aa314da3260aff2209341a29638604f9501c
Loading
Please register or sign in to comment