Fixed calls to update() when configuration changed.
update() is an expensive operation and should only be called once under normal circumstances (it still needs to be called due to external changes). In particular, it should not be called again on orientation changes. The first approach to solve the orientation change caused the volume title to not be shown when the screen changed on multi window environments; the fix for title issue caused the update to be called again on configuration changes. This change properly fixes both issues by removing the onAttach() / onDetach() methods and using a clearer variable (mNeedsUpdate) to avoid future regressions. BUG: 24508289 BUG: 27989238 Change-Id: I140f5a541cda293f1c476d3b80a5bc8918e18b08
Loading
Please register or sign in to comment