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

Skip to content
Commit 2a2a8e1b authored by Xiaowen Lei's avatar Xiaowen Lei
Browse files

Remove SmartSpaceComplication when the SmartspaceTargetListener is removed.

The listener removes the SmartSpaceComplication when the targets becomes
empty. If the listener isn't connected, we don't know whether/when the
targets becomes empty. Therefore we should just remove the complication
when the listener is removed.

This fixes the extra DATE card impression on the Dream surface. The
CardPagerAdapter adds a default DATE card when its setTargets method is
called with an empty list. This CL ensures that for Dream Smartspace,
the setTargets method is never called with an empty list.

Reorganized the existing testAvailability() test into multiple tests.
The new logic is tested in
testOverlayInActive_removesTargetListener_removesComplication().

Bug: 231251252
Test: on device via `adb logcat ...`
Test: atest SmartSpaceComplicationTest
Change-Id: Iac0d8a9697f42e2c70c83c5da050f17190fcc3c1
parent ce97eb64
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