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