Don't rely on nav mode change listener for oriented state
When nav mode state changes, launcher gets re-instantiated, which means the listener for nav mode changes often gets destroyed before it even gets fired. Rely on the initial setup to set the correct nav mode. The other bug with relying on the initial value was that we were initially getting the old nav mode when initFlags was called from the ctor, but then the correct updated nav mode when called from initListeners(). The first call would enable rotation but then the second call wasn't disabling it. Now we toggled based on nav mode each time. Another bug fix in RecentsView was not calling update when launcher rotation is enabled. That was added when previously we were using HOME_ROTATED and PORTRAIT as different PagedViewHandlers to differentiate when launcher rotation was enabled. HOME_ROTATED is now removed, so we no longer need to change the internal state of RecentsOrientedState. Fixes: 159176222 Change-Id: I2a37880ce3cf835ca5b9b165ce3840537facee6c
Loading
Please register or sign in to comment