Skip to content
Commit 34562bcf authored by Bill Lin's avatar Bill Lin
Browse files

Fix QSTileViewImpl label set ellipsize performance issue

health/microbench/systemui/systemui-latency-suite regress
wake & unlock time : +50ms

Root cuase: TextView.setEllipsize() overhead is high, and
the overhead x QSTileView numbers would obviously affect
the test latency time.

Solution:
By default we left tileView as Marquee but not setSelected(),
then we setSelected on tile views when QQS expanding until
proposedTranslation meet 1f(showing truncated at End with
'...' visualization)

Adding 3 major factors to achieve below state machine
1. Selected(T) : expansion == 1f or proposedTranslation < 0f
2. NoAction in transitioning : expansion > 0f or expansion < 1f
3. Signal when mLastHeaderTranslation != headerTranslation

The expansion state will be:
- init Collapsed : setSelected(true)
- Header expanding QQS : setSelected(false)
- QQS expanded : NoAction
- QQS -> Expanding QS : NoAction
- QS expanded : setSelected(true)
- QS Collapsing -> QQS : setSelected(true)
  or QS full collapsing : setSelected(true)
- QS collapsed in QQS : setSelected(false)
- Back to init state : setSelected(true)

Test: health/microbench/systemui/systemui-latency-suite
Test: Manual check QS/QQS long label tile
      QQS : ellipsize at end
      QS: Marquee
Test: SystemUITests
Bug: 192680464
Change-Id: Iebf1e84043501916dd90378973a6736135c9f653
parent 2d5cbc5d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment