Loading packages/SystemUI/src/com/android/keyguard/ClockEventController.kt +7 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ package com.android.keyguard import android.app.WallpaperManager import android.content.BroadcastReceiver import android.content.Context import android.content.Intent Loading Loading @@ -100,9 +101,13 @@ open class ClockEventController @Inject constructor( private val regionSamplingEnabled = featureFlags.isEnabled(REGION_SAMPLING) private fun updateColors() { if (regionSamplingEnabled && smallRegionSampler != null && largeRegionSampler != null) { val wallpaperManager = WallpaperManager.getInstance(context) if (!wallpaperManager.lockScreenWallpaperExists()) { smallClockIsDark = smallRegionSampler!!.currentRegionDarkness().isDark largeClockIsDark = largeRegionSampler!!.currentRegionDarkness().isDark } } else { val isLightTheme = TypedValue() context.theme.resolveAttribute(android.R.attr.isLightTheme, isLightTheme, true) Loading packages/SystemUI/src/com/android/systemui/flags/Flags.kt +1 −1 Original line number Diff line number Diff line Loading @@ -253,7 +253,7 @@ object Flags { // 801 - region sampling // TODO(b/254512848): Tracking Bug val REGION_SAMPLING = unreleasedFlag(801, "region_sampling") val REGION_SAMPLING = unreleasedFlag(801, "region_sampling", teamfood = true) // 802 - wallpaper rendering // TODO(b/254512923): Tracking Bug Loading packages/SystemUI/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceController.kt +3 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.statusbar.lockscreen import android.app.PendingIntent import android.app.WallpaperManager import android.app.smartspace.SmartspaceConfig import android.app.smartspace.SmartspaceManager import android.app.smartspace.SmartspaceSession Loading Loading @@ -389,7 +390,8 @@ class LockscreenSmartspaceController @Inject constructor( } private fun updateTextColorFromWallpaper() { if (!regionSamplingEnabled) { val wallpaperManager = WallpaperManager.getInstance(context) if (!regionSamplingEnabled || wallpaperManager.lockScreenWallpaperExists()) { val wallpaperTextColor = Utils.getColorAttrDefaultColor(context, R.attr.wallpaperTextColor) smartspaceViews.forEach { it.setPrimaryTextColor(wallpaperTextColor) } Loading Loading
packages/SystemUI/src/com/android/keyguard/ClockEventController.kt +7 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ package com.android.keyguard import android.app.WallpaperManager import android.content.BroadcastReceiver import android.content.Context import android.content.Intent Loading Loading @@ -100,9 +101,13 @@ open class ClockEventController @Inject constructor( private val regionSamplingEnabled = featureFlags.isEnabled(REGION_SAMPLING) private fun updateColors() { if (regionSamplingEnabled && smallRegionSampler != null && largeRegionSampler != null) { val wallpaperManager = WallpaperManager.getInstance(context) if (!wallpaperManager.lockScreenWallpaperExists()) { smallClockIsDark = smallRegionSampler!!.currentRegionDarkness().isDark largeClockIsDark = largeRegionSampler!!.currentRegionDarkness().isDark } } else { val isLightTheme = TypedValue() context.theme.resolveAttribute(android.R.attr.isLightTheme, isLightTheme, true) Loading
packages/SystemUI/src/com/android/systemui/flags/Flags.kt +1 −1 Original line number Diff line number Diff line Loading @@ -253,7 +253,7 @@ object Flags { // 801 - region sampling // TODO(b/254512848): Tracking Bug val REGION_SAMPLING = unreleasedFlag(801, "region_sampling") val REGION_SAMPLING = unreleasedFlag(801, "region_sampling", teamfood = true) // 802 - wallpaper rendering // TODO(b/254512923): Tracking Bug Loading
packages/SystemUI/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceController.kt +3 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.statusbar.lockscreen import android.app.PendingIntent import android.app.WallpaperManager import android.app.smartspace.SmartspaceConfig import android.app.smartspace.SmartspaceManager import android.app.smartspace.SmartspaceSession Loading Loading @@ -389,7 +390,8 @@ class LockscreenSmartspaceController @Inject constructor( } private fun updateTextColorFromWallpaper() { if (!regionSamplingEnabled) { val wallpaperManager = WallpaperManager.getInstance(context) if (!regionSamplingEnabled || wallpaperManager.lockScreenWallpaperExists()) { val wallpaperTextColor = Utils.getColorAttrDefaultColor(context, R.attr.wallpaperTextColor) smartspaceViews.forEach { it.setPrimaryTextColor(wallpaperTextColor) } Loading