Skip to content
Commit 99157ead authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Fix RTL changes in PagedTileLayout

This change fixes two RTL issues with PagedTileLayout:

* When RTL happens we had a race condition between the following:
  * onConfigurationChanged
  * onRtlPropertiesChanged
  * QSFragment recreation due to InterestingConfigChanges
  This was causing that the page that was set after RTL changed when QS
  was open (for example, by using the Development tile) would sometimes
  not be correct.

  In order to fix this, we do two things:
  * Remove LAYOUT_DIRECTION from InterestingConfigChanges so QSFragment
    is not recreated
  * Cached the last known direction in PagedTileLayout so we can use
    that to get the page when the change happens, even if it has already
    propagated internally due to onConfigurationChanged.
* When PagedTileLayout has never measured and laid out page 0 (because
  it was recreated in a different page), getTilesHeight returned 0. To
  prevent this, make sure that we always measure and lay out page 0
  (explicitly if not attached to PagedTileLayout).

Test: manual
Fixes: 227231905
Change-Id: I453606937f275b8fe3255f3e2c666cb912229b1a
parent e02f9e39
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