Fix inconsistency in nav mode changes
- Don't rely on the broadcast for determining overlay changes, the actual
changes are propagated via asset path changes to the configuration
only after which the correct resources can be read
- Remove unnecessary reloading of nav bar when changing modes, basically
in the rare cases that the configuration change comes before the
receiver what happens is that NavBarFragment is reloaded (because
FragmentHostManager detects an interesting config change), but the
NavigationModeController has the old value (because it hasn't received
the broadcast), then when it receives the broadcast, it has to
reinflate with the new mode. Now that NavModeController is based on
config changes (and FragmentService always posts config change updates)
the NavModeController mode will always be updated before the fragment
is reloaded (and NavBarInflaterView doesn't need to update on mode change
at all)
- Remove some dead code
Bug: 156631944
Test: Change nav modes a bunch of times
Change-Id: I14ba57acab3683fcd187d0d4adcf87dc7e352b1d
Signed-off-by: Winson Chung <winsonc@google.com>
Loading
Please register or sign in to comment