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

Skip to content
Commit db115452 authored by Fabián Kozynski's avatar Fabián Kozynski Committed by Fabian Kozynski
Browse files

Fix click on TileService bug when closing shade

If an active (unbound) tile is clicked and then the shade is closed
immediately, the click would never be sent to the tile. This was because
a tile that has `onStopListening` called will immediately stopListening
(even if not bound) and reject the click when bound finally happens.

Instead, queue the stopListening to happen right after the click is
dispatched once the tile is bound.

Also, fix when we unbind from active tiles (as together with this it was
causing multiple calls to `onStopListening`). Now:
* If an active tile requests listening, it will be unbound right after
  they send a status update.
* If an active tile is bound because of a click, it will stop listening
  and be unbound as if it was not active.

Test: atest com.android.systemui.qs
Test: atest CtsTileServiceTestCases CtsSystemUiHostTestCases
Flag: ACONFIG com.android.systemui.qs_custom_tile_click_guaranteed_bug_fix DISABLED
Fixes: 339290820

Change-Id: I0d0a87304e252ad68c48145819098115b00399a1
parent f792c8cf
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