CasperVerswijvelt/Better-Internet-Tiles

Tiles not as responsive when QS is fully expanded

Closed this issue · 2 comments

Tile services seem to get destroyed for a couple seconds when the QS is in the fully expanded state (8 tiles visible), whereas they are kept alive when QS is in semi expanded state (4 tiles). This causes delayed ui updates for network status and delayed tile click handling

Looking into this, I found that Android limits the amount of custom tiles that can be bound to maximum 3 at a time. So when only 4 tiles are visible, this is most likely not an issue since a maximum of 4 tiles can be bound anyway. Whne the QS is fully expanded, all tiles across all pages are taken into account, so if you have more than 3 total custom tiles in your configuration, tiles will take turns on being bound, cycling each 5 seconds. This can cause custom tiles to be unresponsive or not up to date. The more custom tiles you have, the longer it can take for a tile to be 'bound' again. When you click a tile, it should get the priority to be bound immediately (if I read the Android sourcecode correctly), but for some reason this can still take a couple seconds too.

Since this is an Android limitation, there's not much I can do here, unfortunately.

A possible solution is to limit your custom tiles to 3

In the 3.0.0 beta's, active tiles are used, which removes this limitation. All listeners and such are set in a separate foreground service, which then lets the tiles know they should be updated with that data.