@@ -98,7 +98,7 @@ abstract class BaseActivity<D : Design<*>> : AppCompatActivity(),
9898 DynamicColors .applyToActivityIfAvailable(this )
9999 }
100100 super .onCreate(savedInstanceState)
101- // updateSystemBars(dayNightValue)
101+ updateSystemBars(dayNightValue)
102102 // Apply excludeFromRecents setting to all app tasks.
103103 checkNotNull(getSystemService<ActivityManager >()).appTasks.forEach { task ->
104104 task.setExcludeFromRecents(uiStore.hideFromRecents)
@@ -197,23 +197,23 @@ abstract class BaseActivity<D : Design<*>> : AppCompatActivity(),
197197 }
198198 }
199199
200- // private fun updateSystemBars(currentDayNight: DayNight) {
201- // window.isAllowForceDarkCompat = false
202- // window.isSystemBarsTranslucentCompat = true
200+ private fun updateSystemBars (currentDayNight : DayNight ) {
201+ window.isAllowForceDarkCompat = false
202+ window.isSystemBarsTranslucentCompat = true
203203
204- // window.statusBarColor = resolveThemedColor(android.R.attr.statusBarColor)
205- // window.navigationBarColor = resolveThemedColor(android.R.attr.navigationBarColor)
204+ window.statusBarColor = resolveThemedColor(android.R .attr.statusBarColor)
205+ window.navigationBarColor = resolveThemedColor(android.R .attr.navigationBarColor)
206206
207- // if (Build.VERSION.SDK_INT >= 23) {
208- // window.isLightStatusBarsCompat = resolveThemedBoolean(android.R.attr.windowLightStatusBar)
209- // }
207+ if (Build .VERSION .SDK_INT >= 23 ) {
208+ window.isLightStatusBarsCompat = resolveThemedBoolean(android.R .attr.windowLightStatusBar)
209+ }
210210
211- // if (Build.VERSION.SDK_INT >= 27) {
212- // window.isLightNavigationBarCompat = resolveThemedBoolean(android.R.attr.windowLightNavigationBar)
213- // }
211+ if (Build .VERSION .SDK_INT >= 27 ) {
212+ window.isLightNavigationBarCompat = resolveThemedBoolean(android.R .attr.windowLightNavigationBar)
213+ }
214214
215- // this.dayNight = currentDayNight
216- // }
215+ this .dayNight = currentDayNight
216+ }
217217
218218 private fun queryDayNight (config : Configuration = resources.configuration): DayNight {
219219 return when (uiStore.darkMode) {
0 commit comments