Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/ConfigurationControllerImpl.kt +6 −0 Original line number Diff line number Diff line Loading @@ -34,9 +34,11 @@ class ConfigurationControllerImpl(context: Context) private val inCarMode: Boolean private var uiMode: Int = 0 private var localeList: LocaleList? = null private val context: Context init { val currentConfig = context.resources.configuration this.context = context fontScale = currentConfig.fontScale density = currentConfig.densityDpi inCarMode = currentConfig.uiMode and Configuration.UI_MODE_TYPE_MASK == Loading Loading @@ -82,6 +84,10 @@ class ConfigurationControllerImpl(context: Context) } if (uiModeChanged) { // We need to force the style re-evaluation to make sure that it's up to date // and attrs were reloaded. context.theme.applyStyle(context.themeResId, true) this.uiMode = uiMode listeners.filterForEach({ this.listeners.contains(it) }) { it.onUiModeChanged() Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +0 −5 Original line number Diff line number Diff line Loading @@ -1144,11 +1144,6 @@ public class StatusBar extends SystemUI implements DemoMode, @Override public void onUiModeChanged() { // UiMode will change the style was already evaluated. // We need to force the re-evaluation to make sure that all parents // are up to date and new attrs will be rettrieved. mContext.getTheme().applyStyle(mContext.getThemeResId(), true); if (mBrightnessMirrorController != null) { mBrightnessMirrorController.onUiModeChanged(); } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/ConfigurationControllerImpl.kt +6 −0 Original line number Diff line number Diff line Loading @@ -34,9 +34,11 @@ class ConfigurationControllerImpl(context: Context) private val inCarMode: Boolean private var uiMode: Int = 0 private var localeList: LocaleList? = null private val context: Context init { val currentConfig = context.resources.configuration this.context = context fontScale = currentConfig.fontScale density = currentConfig.densityDpi inCarMode = currentConfig.uiMode and Configuration.UI_MODE_TYPE_MASK == Loading Loading @@ -82,6 +84,10 @@ class ConfigurationControllerImpl(context: Context) } if (uiModeChanged) { // We need to force the style re-evaluation to make sure that it's up to date // and attrs were reloaded. context.theme.applyStyle(context.themeResId, true) this.uiMode = uiMode listeners.filterForEach({ this.listeners.contains(it) }) { it.onUiModeChanged() Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +0 −5 Original line number Diff line number Diff line Loading @@ -1144,11 +1144,6 @@ public class StatusBar extends SystemUI implements DemoMode, @Override public void onUiModeChanged() { // UiMode will change the style was already evaluated. // We need to force the re-evaluation to make sure that all parents // are up to date and new attrs will be rettrieved. mContext.getTheme().applyStyle(mContext.getThemeResId(), true); if (mBrightnessMirrorController != null) { mBrightnessMirrorController.onUiModeChanged(); } Loading