summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Hongwei Wang <hwwang@google.com> 2024-07-25 13:37:43 -0700
committer Hongwei Wang <hwwang@google.com> 2024-07-25 15:05:41 -0700
commit62c7f1e66eb684be9a1fcb1879cb17403c13c68c (patch)
treef06fc7e16b1592c194acc3c19b9a1aa9242a946b /libs/androidfw/StringPool.cpp
parentba088a6344aacc5b0ea44fd6ebf79a6bd839f9ab (diff)
Snap to the closest edge when velocity is 0
When user slowly moves the PiP from one edge to the other, there could be chances that VelocityTrack reports 0 in x-velocity and used to snap to the right edge, which may not be intuitive to the user if the PiP window has passed the midpoint. In this change, we compare the centerX of the PiP window against the display centerX, and added a boost in velocity towards nearest edge. Updated also the pip2 counterpart. Flag: EXEMPT bugfix Video: http://recall/-/aaaaaabFQoRHlzixHdtY/bnpoNB1sS8Dujtfb5xUKkY Bug: 323102290 Test: Slowly moves PiP from left to right side, and vice versa Change-Id: I3b7c4ac14415d75164ba81f8ef471f5cae3f5ed6
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions