Loading src/com/android/customization/picker/clock/ui/view/ThemePickerClockViewFactory.kt +25 −15 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ import android.app.Activity import android.app.WallpaperColors import android.app.WallpaperManager import android.graphics.Rect import android.util.Log import android.view.View import android.widget.FrameLayout import androidx.annotation.ColorInt Loading Loading @@ -187,6 +188,7 @@ constructor( } private fun initClockController(clockId: String): ClockController? { try { val isWallpaperDark = isLockscreenWallpaperDark() return registry.createExampleClock(activity, clockId)?.also { controller -> controller.initialize(isWallpaperDark, 0f, 0f) Loading @@ -204,6 +206,14 @@ constructor( controller.smallClock.events.onTargetRegionChanged(getSmallClockRegion()) controller.events.onWeatherDataChanged(WeatherData.getPlaceholderWeatherData()) } } catch (e: Exception) { Log.e( "ThemePickerClockViewFactory", "caught clock init exception, proceeding without clocks", e, ) return null } } /** Loading Loading
src/com/android/customization/picker/clock/ui/view/ThemePickerClockViewFactory.kt +25 −15 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ import android.app.Activity import android.app.WallpaperColors import android.app.WallpaperManager import android.graphics.Rect import android.util.Log import android.view.View import android.widget.FrameLayout import androidx.annotation.ColorInt Loading Loading @@ -187,6 +188,7 @@ constructor( } private fun initClockController(clockId: String): ClockController? { try { val isWallpaperDark = isLockscreenWallpaperDark() return registry.createExampleClock(activity, clockId)?.also { controller -> controller.initialize(isWallpaperDark, 0f, 0f) Loading @@ -204,6 +206,14 @@ constructor( controller.smallClock.events.onTargetRegionChanged(getSmallClockRegion()) controller.events.onWeatherDataChanged(WeatherData.getPlaceholderWeatherData()) } } catch (e: Exception) { Log.e( "ThemePickerClockViewFactory", "caught clock init exception, proceeding without clocks", e, ) return null } } /** Loading