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

Commit cd5e33dc authored by lyn's avatar lyn Committed by Android Build Coastguard Worker
Browse files

Fix gap in shade from custom outline

This bug happened when a new notification animated in, where
- ActivatableNotificationView.mTargetPoint was null (from bugreport).
- ActivatableNotificationView.performAddAnimation()
  calls updateAppearRect() with ClipSide.BOTTOM

Key parts of this animation:
1. Y position: descend from above.
2. Height: unsquish from zero to full height.

Problem: double translation
- ActivatableNotificationView.updateAppearRect
  set outline Y with mAppearAnimationTranslation
  IN ADDITION TO dispatchDraw
  translating Canvas Y by mAppearAnimationTranslation
- Since notif contents are drawn in the Canvas window
  no part of it shows through the clipped window above the Canvas
  so we see a gap where the view should be

Solution: remove duplicate position logic
- ActivatableNotificationView.updateAppearRect() now
sets mOutlineRect using local (0,0 based) coordinates
to _only_ animate height

Fixes: 400978214
Test: Add hun/shade/ls notifs: no repro, no regressions, screenrecords in bug
Test: in ag/33977271 (with refactors and logs) to simplify cherry pick
Flag: EXEMPT bug fix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:0f5fde9d2d4c41ddc829a0710e56c768b6882cd2)
Merged-In: I28380fad37e1b2155a61adb8c76a72f04630c42e
Change-Id: I28380fad37e1b2155a61adb8c76a72f04630c42e
parent b0e88a46
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment