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

Skip to content
Commit bbea105b authored by Tony's avatar Tony Committed by Tony Wickham
Browse files

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
parent b0c81fc0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment