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

Skip to content
Commit 05830809 authored by Steven Ng's avatar Steven Ng
Browse files

Use relative bounds for app widget color extraction

Fix 2 bugs in this CL
1. Before this CL, getBoundsForViewInDragLayer returns absolute bounds
   for widgets. What we want is the bounds of a widget when it is
   visible in the drag layer. ViewGroupFocusHelper#viewToRect has
   taken PagedView into account. This makes it a prefect candidate to
   calculate relative bounds of a widget.
2. requestLayout at the end of endDrag is problematic due to the drop
   animation. If the drop animation is still in progress when onLayout
   is called, the bounds of the widget isn't final. Since the color of
   app widget right before is already the final color. We don't really
   need to update the color extraction.

Test: Set the wallpaper and clock widget according to the bug. Then,
      reboot the device. The clock widget color shown right after
      reboot is the expected color. Long pressing the widget doesn't
      cause a color change.
Fix: 191114337
Change-Id: I466c8102dba0e5b207b3768e0935472cbd523235
parent 10d4edad
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