Merge "Do not dispatch theme change if same @ResId" into sc-v2-dev

This commit is contained in:
TreeHugger Robot
2021-10-15 18:10:51 +00:00
committed by Android (Google) Code Review

View File

@@ -3292,6 +3292,9 @@ public class StatusBar extends SystemUI implements
final boolean lockDarkText = mColorExtractor.getNeutralColors().supportsDarkText(); final boolean lockDarkText = mColorExtractor.getNeutralColors().supportsDarkText();
final int themeResId = lockDarkText ? R.style.Theme_SystemUI_LightWallpaper final int themeResId = lockDarkText ? R.style.Theme_SystemUI_LightWallpaper
: R.style.Theme_SystemUI; : R.style.Theme_SystemUI;
if (mContext.getThemeResId() == themeResId) {
return;
}
mContext.setTheme(themeResId); mContext.setTheme(themeResId);
mConfigurationController.notifyThemeChanged(); mConfigurationController.notifyThemeChanged();
} }