Merge "Pass configuration changes to all pages" into sc-v2-dev am: 4cf8359556
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16149756 Change-Id: Idf1c4ae6680c93e8355121d0dd0fce3659c36318
This commit is contained in:
@@ -112,6 +112,16 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout {
|
|||||||
@Override
|
@Override
|
||||||
protected void onConfigurationChanged(Configuration newConfig) {
|
protected void onConfigurationChanged(Configuration newConfig) {
|
||||||
super.onConfigurationChanged(newConfig);
|
super.onConfigurationChanged(newConfig);
|
||||||
|
// Pass configuration change to non-attached pages as well. Some config changes will cause
|
||||||
|
// QS to recreate itself (as determined in FragmentHostManager), but in order to minimize
|
||||||
|
// those, make sure that all get passed to all pages.
|
||||||
|
int numPages = mPages.size();
|
||||||
|
for (int i = 0; i < numPages; i++) {
|
||||||
|
View page = mPages.get(i);
|
||||||
|
if (page.getParent() == null) {
|
||||||
|
page.dispatchConfigurationChanged(newConfig);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (mLayoutOrientation != newConfig.orientation) {
|
if (mLayoutOrientation != newConfig.orientation) {
|
||||||
mLayoutOrientation = newConfig.orientation;
|
mLayoutOrientation = newConfig.orientation;
|
||||||
mDistributeTiles = true;
|
mDistributeTiles = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user