Tony Wickham 6894f4f1bb Fix issue where popup jumps to full size before closing
Some background on what was happening:
- When mEndRect.isEmpty(), we set it to (0, 0 , width, height)
- We called mEndRect.setEmpty() in animateClose(), but override
  mEndRect if the reveal animation set the outline bounds.
- But the reveal animation doesn't set the outline bounds until
  after the arrow animation (40ms) finishes, i.e. the arrow scales
  up for 40ms then we clip to outline and start revealing the popup
- Thus, if you started a drag before the arrow animation finished,
  we called mEndRect.setEmpty(), which made the close animation start
  from the full popup size even though it was previously invisible.

To fix this, we clip the popup to its (empty) outline while the
arrow animates in, and then we can always start from wherever the
outline currently is when we close the popup.

Test:
- Set animation duration to 10x
- Long press an icon, and start dragging before the arrow scale
  animation finishes
- The popup never shows, whereas before it jumped to full size

Bug: 143639898
Change-Id: I284dd06a23e0e9c3faf066a0083ac13bac88ebcc
2019-11-01 15:53:52 -07:00
2019-08-08 02:02:20 -07:00
2019-05-17 23:19:58 -07:00
2019-08-28 16:32:59 -07:00
2018-11-02 14:18:45 -07:00
S
Description
No description provided
658 MiB
Languages
Java 57.2%
Kotlin 42.4%
AIDL 0.3%