Do not dispatch theme change if same @ResId

Test: adb logcat
Fixes: 203137487
Change-Id: Ifde4781263ed8455ff27eb0d8123f7e9f2cb5a1e
This commit is contained in:
Lucas Dupin
2021-10-14 16:21:29 -07:00
parent b81195b5fb
commit f17bdea488

View File

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