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

Skip to content
Commit 3af495a1 authored by Behnam Heydarshahi's avatar Behnam Heydarshahi
Browse files

Deduplicate internet tile cellular icon loading

When loading the mobile internet icon, we updated icon multiple times
for the same icon, because the SignalDrawables were Loaded icons and
the equality of SignalDrawables was done by comparing their references.

This CL compares the drawables by comparing their (signal) level. Which
should lead to handleStateChanged being called less frequently when
opening the shade, hence fewers frames dropping on that CUJ.

The wifi and cellular icons will be loaded in the mapper, rather than
the data interactor, which should relieve the Background thread and
hence reduce thread contention.

Finally, a Handler can be injected into SignalDrawable now, which
removes an edge case in our mapper test for cellular drawable. Not
creating a handler on the test thread means we no longer need to make
that test run with looper.

Bug: 361558581
Flag: com.android.systemui.qs_new_tiles
Test: manual: run systemui-quicksettings-toggle-jank-suite verify there
is no performance regression
Test: atest InternetTileMapperTest InternetTileDataInteractorTest

Change-Id: I6e4cac667399941029caafe0b8469639c434a8c0
parent 6d236445
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