Using a fixed-size ring buffer for direction estimation.
An ArrayDequeue has an internal variable-size array that can grow unnecessarily when poping and adding elements to it. This CL makes sure that we use a much simpler ring buffer to hold translations and estimate directions. Test: MagneticRowManagerImplTest Test: presubmit Test: manual. Verified notifications dismiss in the correct direction when flinging before and after detaching Flag: com.android.systemui.magnetic_notification_swipes Bug: 422250180 Change-Id: Ia7ca7d9a78edd6b8d1d79b32a9a79bcf8460087e
Loading
Please register or sign in to comment