Skip to content

Commit 857e88a

Browse files
Coco DuanAndroid Build Coastguard Worker
authored andcommitted
Fix weather complication disappearing after timer pause
Noticed weather complication disappearing from dream after timer was paused while fixing the flickering issue. Fix is to create a new weather plugin for dream rather than sharing the same with lockscreen and aod. Bug: b/285193449 Test: manually Merged-in: Ide3143558c906ab650e6a295e805adae81eff9bb (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:36adfaa531b15a3a2aa495a38d01ce0563f913e3) Merged-In: Ide3143558c906ab650e6a295e805adae81eff9bb Change-Id: Ide3143558c906ab650e6a295e805adae81eff9bb
1 parent fa49d0d commit 857e88a

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

packages/SystemUI/src/com/android/systemui/dreams/smartspace/DreamSmartspaceController.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ import com.android.systemui.plugins.BcSmartspaceDataPlugin.SmartspaceView
3333
import com.android.systemui.plugins.BcSmartspaceDataPlugin.UI_SURFACE_DREAM
3434
import com.android.systemui.smartspace.SmartspacePrecondition
3535
import com.android.systemui.smartspace.SmartspaceTargetFilter
36-
import com.android.systemui.smartspace.dagger.SmartspaceModule
3736
import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.DREAM_SMARTSPACE_DATA_PLUGIN
3837
import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.DREAM_SMARTSPACE_PRECONDITION
3938
import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.DREAM_SMARTSPACE_TARGET_FILTER
39+
import com.android.systemui.smartspace.dagger.SmartspaceModule.Companion.DREAM_WEATHER_SMARTSPACE_DATA_PLUGIN
4040
import com.android.systemui.smartspace.dagger.SmartspaceViewComponent
4141
import com.android.systemui.util.concurrency.Execution
4242
import java.util.Optional
@@ -58,7 +58,7 @@ class DreamSmartspaceController @Inject constructor(
5858
@Named(DREAM_SMARTSPACE_TARGET_FILTER)
5959
private val optionalTargetFilter: Optional<SmartspaceTargetFilter>,
6060
@Named(DREAM_SMARTSPACE_DATA_PLUGIN) optionalPlugin: Optional<BcSmartspaceDataPlugin>,
61-
@Named(SmartspaceModule.WEATHER_SMARTSPACE_DATA_PLUGIN)
61+
@Named(DREAM_WEATHER_SMARTSPACE_DATA_PLUGIN)
6262
optionalWeatherPlugin: Optional<BcSmartspaceDataPlugin>,
6363
) {
6464
companion object {

packages/SystemUI/src/com/android/systemui/smartspace/dagger/SmartspaceModule.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ abstract class SmartspaceModule {
3333
*/
3434
const val DREAM_SMARTSPACE_DATA_PLUGIN = "dreams_smartspace_data_plugin"
3535

36+
/**
37+
* The BcSmartspaceDataPlugin for the standalone weather on dream.
38+
*/
39+
const val DREAM_WEATHER_SMARTSPACE_DATA_PLUGIN = "dream_weather_smartspace_data_plugin"
40+
3641
/**
3742
* The dream smartspace target filter.
3843
*/
@@ -62,6 +67,10 @@ abstract class SmartspaceModule {
6267
@Named(DREAM_SMARTSPACE_DATA_PLUGIN)
6368
abstract fun optionalDreamsBcSmartspaceDataPlugin(): BcSmartspaceDataPlugin?
6469

70+
@BindsOptionalOf
71+
@Named(DREAM_WEATHER_SMARTSPACE_DATA_PLUGIN)
72+
abstract fun optionalDreamWeatherSmartspaceDataPlugin(): BcSmartspaceDataPlugin?
73+
6574
@Binds
6675
@Named(DREAM_SMARTSPACE_PRECONDITION)
6776
abstract fun bindSmartspacePrecondition(

0 commit comments

Comments
 (0)