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
Loading
Please register or sign in to comment