summaryrefslogtreecommitdiff
path: root/libs/input/PointerController.cpp
diff options
context:
space:
mode:
author Fabián Kozynski <kozynski@google.com> 2024-05-29 10:46:22 -0400
committer Fabián Kozynski <kozynski@google.com> 2024-05-29 10:51:13 -0400
commit07075292d4c6d0910622eee1fd80b01fa14300e0 (patch)
tree6fd79b864a65937ce6f327ea370ab9e9afeb9d1b /libs/input/PointerController.cpp
parent2b3fd07b0646d3b54b527e5e501de5c625127361 (diff)
Prevent infinite appending default in retail mode
When in reatil mode, we restrict the tiles that are shown to a small set. However, that set is the same size as the minimum number of tiles. If any of those tiles cannot be created (for example, flashlight in large devices), we end up with less tiles than the minimum, which will trigger a `prependDefault`. However, as the CurrentTilesInteractor only sees the retail tiles, this will keep happening and the tiles in Settings will grow unbounded, crashing the device. We fix this at a handful of points: * When applying a change to the tiles, apply `distinct` so that only the first copy of each tile is saved. * Prevent TileSpecRepository from applying prependDefault when in retailMode (same as other tile operations). * When in retail mode, the min number of tiles in the CurrentTilesInteractor is reduced to 1. Test: atest com.android.systemui.qs.pipeline Fixes: 340450011 Flag: EXEMPT Bug Fix Change-Id: I8771f0a8ae8b88e5d3600b35ee96901fc46cbc53
Diffstat (limited to 'libs/input/PointerController.cpp')
0 files changed, 0 insertions, 0 deletions