Loading packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSmartspaceRepository.kt +20 −13 Original line number Diff line number Diff line Loading @@ -82,19 +82,26 @@ constructor( } _timers.value = timerTargets.map { (stableId, target) -> timerTargets .map { (stableId, target) -> CommunalSmartspaceTimer( // The view layer should have the instance based smartspaceTargetId instead of // stable id, so that when a new instance of the timer is created, for example, // when it is paused, the view should re-render its remote views. // The view layer should have the instance based smartspaceTargetId instead // of stable id, so that when a new instance of the timer is created, for // example, when it is paused, the view should re-render its remote views. smartspaceTargetId = if (communalTimerFlickerFix()) stableId else target.smartspaceTargetId, createdTimestampMillis = targetCreationTimes[stableId]!!, remoteViews = target.remoteViews!!, ) } logger.d({ "Smartspace timers updated: $str1" }) { str1 = _timers.value.toString() } .also { newVal -> // Only log when value changes to avoid filling up the buffer. if (newVal != _timers.value) { logger.d({ "Smartspace timers updated: $str1" }) { str1 = newVal.toString() } } } } override fun startListening() { Loading Loading
packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSmartspaceRepository.kt +20 −13 Original line number Diff line number Diff line Loading @@ -82,19 +82,26 @@ constructor( } _timers.value = timerTargets.map { (stableId, target) -> timerTargets .map { (stableId, target) -> CommunalSmartspaceTimer( // The view layer should have the instance based smartspaceTargetId instead of // stable id, so that when a new instance of the timer is created, for example, // when it is paused, the view should re-render its remote views. // The view layer should have the instance based smartspaceTargetId instead // of stable id, so that when a new instance of the timer is created, for // example, when it is paused, the view should re-render its remote views. smartspaceTargetId = if (communalTimerFlickerFix()) stableId else target.smartspaceTargetId, createdTimestampMillis = targetCreationTimes[stableId]!!, remoteViews = target.remoteViews!!, ) } logger.d({ "Smartspace timers updated: $str1" }) { str1 = _timers.value.toString() } .also { newVal -> // Only log when value changes to avoid filling up the buffer. if (newVal != _timers.value) { logger.d({ "Smartspace timers updated: $str1" }) { str1 = newVal.toString() } } } } override fun startListening() { Loading