Loading packages/SystemUI/src/com/android/systemui/flags/Flags.kt +0 −5 Original line number Diff line number Diff line Loading @@ -316,11 +316,6 @@ object Flags { val SMARTSPACE_SHARED_ELEMENT_TRANSITION_ENABLED = releasedFlag("smartspace_shared_element_transition_enabled") // TODO(b/258517050): Clean up after the feature is launched. @JvmField val SMARTSPACE_DATE_WEATHER_DECOUPLED = sysPropBooleanFlag("persist.sysui.ss.dw_decoupled", default = true) // TODO(b/270223352): Tracking Bug @JvmField val HIDE_SMARTSPACE_ON_DREAM_OVERLAY = releasedFlag("hide_smartspace_on_dream_overlay") Loading packages/SystemUI/src/com/android/systemui/smartspace/config/BcSmartspaceConfigProvider.kt +1 −2 Original line number Diff line number Diff line Loading @@ -17,11 +17,10 @@ package com.android.systemui.smartspace.config import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags import com.android.systemui.plugins.BcSmartspaceConfigPlugin class BcSmartspaceConfigProvider(private val featureFlags: FeatureFlags) : BcSmartspaceConfigPlugin { override val isDefaultDateWeatherDisabled: Boolean get() = featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED) get() = true } packages/SystemUI/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceController.kt +3 −4 Original line number Diff line number Diff line Loading @@ -269,8 +269,7 @@ constructor( fun isDateWeatherDecoupled(): Boolean { execution.assertIsMainThread() return featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED) && datePlugin != null && weatherPlugin != null return datePlugin != null && weatherPlugin != null } fun isWeatherEnabled(): Boolean { Loading Loading @@ -501,8 +500,8 @@ constructor( } private fun filterSmartspaceTarget(t: SmartspaceTarget): Boolean { if (isDateWeatherDecoupled()) { return t.featureType != SmartspaceTarget.FEATURE_WEATHER if (isDateWeatherDecoupled() && t.featureType == SmartspaceTarget.FEATURE_WEATHER) { return false } if (!showNotifications) { return t.featureType == SmartspaceTarget.FEATURE_WEATHER Loading packages/SystemUI/tests/src/com/android/systemui/smartspace/BcSmartspaceConfigProviderTest.kt +1 −13 Original line number Diff line number Diff line Loading @@ -20,10 +20,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags import com.android.systemui.smartspace.config.BcSmartspaceConfigProvider import com.android.systemui.util.mockito.whenever import junit.framework.Assert.assertFalse import junit.framework.Assert.assertTrue import org.junit.Before import org.junit.Test Loading @@ -45,16 +42,7 @@ class BcSmartspaceConfigProviderTest : SysuiTestCase() { } @Test fun isDefaultDateWeatherDisabled_flagIsTrue_returnsTrue() { whenever(featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)).thenReturn(true) fun isDefaultDateWeatherDisabled_returnsTrue() { assertTrue(configProvider.isDefaultDateWeatherDisabled) } @Test fun isDefaultDateWeatherDisabled_flagIsFalse_returnsFalse() { whenever(featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)).thenReturn(false) assertFalse(configProvider.isDefaultDateWeatherDisabled) } } packages/SystemUI/tests/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceControllerTest.kt +33 −116 Original line number Diff line number Diff line Loading @@ -38,7 +38,6 @@ import com.android.keyguard.KeyguardUpdateMonitor import com.android.systemui.SysuiTestCase import com.android.systemui.dump.DumpManager import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags import com.android.systemui.plugins.ActivityStarter import com.android.systemui.plugins.BcSmartspaceConfigPlugin import com.android.systemui.plugins.BcSmartspaceDataPlugin Loading Loading @@ -205,10 +204,6 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { fun setUp() { MockitoAnnotations.initMocks(this) // Todo(b/261760571): flip the flag value here when feature is launched, and update relevant // tests. `when`(featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)).thenReturn(false) `when`(secureSettings.getUriFor(PRIVATE_LOCKSCREEN_SETTING)) .thenReturn(fakePrivateLockscreenSettingUri) `when`(secureSettings.getUriFor(NOTIF_ON_LOCKSCREEN_SETTING)) Loading Loading @@ -260,17 +255,6 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { deviceProvisionedListener = deviceProvisionedCaptor.value } @Test(expected = RuntimeException::class) fun testBuildAndConnectWeatherView_throwsIfDecouplingDisabled() { // GIVEN the feature flag is disabled `when`(featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)).thenReturn(false) // WHEN we try to build the view controller.buildAndConnectWeatherView(fakeParent) // THEN an exception is thrown } @Test fun testBuildAndConnectView_connectsOnlyAfterDeviceIsProvisioned() { // GIVEN an unprovisioned device and an attempt to connect Loading Loading @@ -332,6 +316,8 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { clearInvocations(plugin) // WHEN the session is closed controller.stateChangeListener.onViewDetachedFromWindow(dateSmartspaceView as View) controller.stateChangeListener.onViewDetachedFromWindow(weatherSmartspaceView as View) controller.stateChangeListener.onViewDetachedFromWindow(smartspaceView as View) controller.disconnect() Loading Loading @@ -375,20 +361,6 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { // WHEN the theme changes configChangeListener.onThemeChanged() // We update the new text color to match the wallpaper color verify(smartspaceView).setPrimaryTextColor(anyInt()) } @Test fun testThemeChange_ifDecouplingEnabled_updatesTextColor() { `when`(featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)).thenReturn(true) // GIVEN a connected smartspace session connectSession() // WHEN the theme changes configChangeListener.onThemeChanged() // We update the new text color to match the wallpaper color verify(dateSmartspaceView).setPrimaryTextColor(anyInt()) verify(weatherSmartspaceView).setPrimaryTextColor(anyInt()) Loading @@ -403,20 +375,6 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { // WHEN the doze amount changes statusBarStateListener.onDozeAmountChanged(0.1f, 0.7f) // We pass that along to the view verify(smartspaceView).setDozeAmount(0.7f) } @Test fun testDozeAmountChange_ifDecouplingEnabled_updatesViews() { `when`(featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)).thenReturn(true) // GIVEN a connected smartspace session connectSession() // WHEN the doze amount changes statusBarStateListener.onDozeAmountChanged(0.1f, 0.7f) // We pass that along to the view verify(dateSmartspaceView).setDozeAmount(0.7f) verify(weatherSmartspaceView).setDozeAmount(0.7f) Loading Loading @@ -472,7 +430,7 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { } @Test fun testAllTargetsAreFilteredExceptWeatherWhenNotificationsAreDisabled() { fun testAllTargetsAreFilteredInclWeatherWhenNotificationsAreDisabled() { // GIVEN the active user doesn't allow any notifications on lockscreen setShowNotifications(userHandlePrimary, false) connectSession() Loading @@ -488,7 +446,7 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { sessionListener.onTargetsAvailable(targets) // THEN all non-sensitive content is still shown verify(plugin).onTargetsAvailable(eq(listOf(targets[3]))) verify(plugin).onTargetsAvailable(emptyList()) } @Test Loading Loading @@ -519,8 +477,7 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { } @Test fun testSessionListener_ifDecouplingEnabled_weatherTargetIsFilteredOut() { `when`(featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)).thenReturn(true) fun testSessionListener_weatherTargetIsFilteredOut() { connectSession() // WHEN we receive a list of targets Loading Loading @@ -670,8 +627,7 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { } @Test fun testSessionListener_ifDecouplingEnabled_weatherDataUpdates() { `when`(featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)).thenReturn(true) fun testSessionListener_weatherDataUpdates() { connectSession() clock.setCurrentTimeMillis(SMARTSPACE_TIME_JUST_RIGHT) Loading @@ -698,33 +654,6 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { }) } @Test fun testSessionListener_ifDecouplingDisabled_weatherDataUpdates() { `when`(featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)).thenReturn(false) connectSession() clock.setCurrentTimeMillis(SMARTSPACE_TIME_JUST_RIGHT) // WHEN we receive a list of targets val targets = listOf( makeWeatherTargetWithExtras( id = 1, userHandle = userHandlePrimary, description = "Sunny", state = WeatherData.WeatherStateIcon.SUNNY.id, temperature = "32", useCelsius = false), makeTarget(2, userHandlePrimary, isSensitive = true) ) sessionListener.onTargetsAvailable(targets) verify(keyguardUpdateMonitor).sendWeatherData(argThat { w -> w.description == "Sunny" && w.state == WeatherData.WeatherStateIcon.SUNNY && w.temperature == 32 && !w.useCelsius }) } @Test fun testSettingsAreReloaded() { // GIVEN a connected session where the privacy settings later flip to false Loading Loading @@ -781,6 +710,8 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { connectSession() // WHEN we are told to cleanup controller.stateChangeListener.onViewDetachedFromWindow(dateSmartspaceView as View) controller.stateChangeListener.onViewDetachedFromWindow(weatherSmartspaceView as View) controller.stateChangeListener.onViewDetachedFromWindow(smartspaceView as View) controller.disconnect() Loading Loading @@ -815,16 +746,6 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { verify(smartspaceView2).registerConfigProvider(configPlugin) } @Test fun testWeatherViewUsesSameSession() { `when`(featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)).thenReturn(true) // GIVEN a connected session connectSession() // No checks is needed here, since connectSession() already checks internally that // createSmartspaceSession is invoked only once. } @Test fun testViewGetInitializedWithBypassEnabledState() { // GIVEN keyguard bypass is enabled. Loading Loading @@ -853,7 +774,6 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { } private fun connectSession() { if (controller.isDateWeatherDecoupled()) { val dateView = controller.buildAndConnectDateView(fakeParent) dateSmartspaceView = dateView as SmartspaceView fakeParent.addView(dateView) Loading @@ -877,7 +797,6 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { verify(weatherSmartspaceView).setPrimaryTextColor(anyInt()) verify(weatherSmartspaceView).setDozeAmount(0.5f) } val view = controller.buildAndConnectView(fakeParent) smartspaceView = view as SmartspaceView Loading Loading @@ -918,10 +837,8 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { verify(smartspaceView).setPrimaryTextColor(anyInt()) verify(smartspaceView).setDozeAmount(0.5f) if (controller.isDateWeatherDecoupled()) { clearInvocations(dateSmartspaceView) clearInvocations(weatherSmartspaceView) } clearInvocations(smartspaceView) } Loading Loading
packages/SystemUI/src/com/android/systemui/flags/Flags.kt +0 −5 Original line number Diff line number Diff line Loading @@ -316,11 +316,6 @@ object Flags { val SMARTSPACE_SHARED_ELEMENT_TRANSITION_ENABLED = releasedFlag("smartspace_shared_element_transition_enabled") // TODO(b/258517050): Clean up after the feature is launched. @JvmField val SMARTSPACE_DATE_WEATHER_DECOUPLED = sysPropBooleanFlag("persist.sysui.ss.dw_decoupled", default = true) // TODO(b/270223352): Tracking Bug @JvmField val HIDE_SMARTSPACE_ON_DREAM_OVERLAY = releasedFlag("hide_smartspace_on_dream_overlay") Loading
packages/SystemUI/src/com/android/systemui/smartspace/config/BcSmartspaceConfigProvider.kt +1 −2 Original line number Diff line number Diff line Loading @@ -17,11 +17,10 @@ package com.android.systemui.smartspace.config import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags import com.android.systemui.plugins.BcSmartspaceConfigPlugin class BcSmartspaceConfigProvider(private val featureFlags: FeatureFlags) : BcSmartspaceConfigPlugin { override val isDefaultDateWeatherDisabled: Boolean get() = featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED) get() = true }
packages/SystemUI/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceController.kt +3 −4 Original line number Diff line number Diff line Loading @@ -269,8 +269,7 @@ constructor( fun isDateWeatherDecoupled(): Boolean { execution.assertIsMainThread() return featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED) && datePlugin != null && weatherPlugin != null return datePlugin != null && weatherPlugin != null } fun isWeatherEnabled(): Boolean { Loading Loading @@ -501,8 +500,8 @@ constructor( } private fun filterSmartspaceTarget(t: SmartspaceTarget): Boolean { if (isDateWeatherDecoupled()) { return t.featureType != SmartspaceTarget.FEATURE_WEATHER if (isDateWeatherDecoupled() && t.featureType == SmartspaceTarget.FEATURE_WEATHER) { return false } if (!showNotifications) { return t.featureType == SmartspaceTarget.FEATURE_WEATHER Loading
packages/SystemUI/tests/src/com/android/systemui/smartspace/BcSmartspaceConfigProviderTest.kt +1 −13 Original line number Diff line number Diff line Loading @@ -20,10 +20,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags import com.android.systemui.smartspace.config.BcSmartspaceConfigProvider import com.android.systemui.util.mockito.whenever import junit.framework.Assert.assertFalse import junit.framework.Assert.assertTrue import org.junit.Before import org.junit.Test Loading @@ -45,16 +42,7 @@ class BcSmartspaceConfigProviderTest : SysuiTestCase() { } @Test fun isDefaultDateWeatherDisabled_flagIsTrue_returnsTrue() { whenever(featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)).thenReturn(true) fun isDefaultDateWeatherDisabled_returnsTrue() { assertTrue(configProvider.isDefaultDateWeatherDisabled) } @Test fun isDefaultDateWeatherDisabled_flagIsFalse_returnsFalse() { whenever(featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)).thenReturn(false) assertFalse(configProvider.isDefaultDateWeatherDisabled) } }
packages/SystemUI/tests/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceControllerTest.kt +33 −116 Original line number Diff line number Diff line Loading @@ -38,7 +38,6 @@ import com.android.keyguard.KeyguardUpdateMonitor import com.android.systemui.SysuiTestCase import com.android.systemui.dump.DumpManager import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags import com.android.systemui.plugins.ActivityStarter import com.android.systemui.plugins.BcSmartspaceConfigPlugin import com.android.systemui.plugins.BcSmartspaceDataPlugin Loading Loading @@ -205,10 +204,6 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { fun setUp() { MockitoAnnotations.initMocks(this) // Todo(b/261760571): flip the flag value here when feature is launched, and update relevant // tests. `when`(featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)).thenReturn(false) `when`(secureSettings.getUriFor(PRIVATE_LOCKSCREEN_SETTING)) .thenReturn(fakePrivateLockscreenSettingUri) `when`(secureSettings.getUriFor(NOTIF_ON_LOCKSCREEN_SETTING)) Loading Loading @@ -260,17 +255,6 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { deviceProvisionedListener = deviceProvisionedCaptor.value } @Test(expected = RuntimeException::class) fun testBuildAndConnectWeatherView_throwsIfDecouplingDisabled() { // GIVEN the feature flag is disabled `when`(featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)).thenReturn(false) // WHEN we try to build the view controller.buildAndConnectWeatherView(fakeParent) // THEN an exception is thrown } @Test fun testBuildAndConnectView_connectsOnlyAfterDeviceIsProvisioned() { // GIVEN an unprovisioned device and an attempt to connect Loading Loading @@ -332,6 +316,8 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { clearInvocations(plugin) // WHEN the session is closed controller.stateChangeListener.onViewDetachedFromWindow(dateSmartspaceView as View) controller.stateChangeListener.onViewDetachedFromWindow(weatherSmartspaceView as View) controller.stateChangeListener.onViewDetachedFromWindow(smartspaceView as View) controller.disconnect() Loading Loading @@ -375,20 +361,6 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { // WHEN the theme changes configChangeListener.onThemeChanged() // We update the new text color to match the wallpaper color verify(smartspaceView).setPrimaryTextColor(anyInt()) } @Test fun testThemeChange_ifDecouplingEnabled_updatesTextColor() { `when`(featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)).thenReturn(true) // GIVEN a connected smartspace session connectSession() // WHEN the theme changes configChangeListener.onThemeChanged() // We update the new text color to match the wallpaper color verify(dateSmartspaceView).setPrimaryTextColor(anyInt()) verify(weatherSmartspaceView).setPrimaryTextColor(anyInt()) Loading @@ -403,20 +375,6 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { // WHEN the doze amount changes statusBarStateListener.onDozeAmountChanged(0.1f, 0.7f) // We pass that along to the view verify(smartspaceView).setDozeAmount(0.7f) } @Test fun testDozeAmountChange_ifDecouplingEnabled_updatesViews() { `when`(featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)).thenReturn(true) // GIVEN a connected smartspace session connectSession() // WHEN the doze amount changes statusBarStateListener.onDozeAmountChanged(0.1f, 0.7f) // We pass that along to the view verify(dateSmartspaceView).setDozeAmount(0.7f) verify(weatherSmartspaceView).setDozeAmount(0.7f) Loading Loading @@ -472,7 +430,7 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { } @Test fun testAllTargetsAreFilteredExceptWeatherWhenNotificationsAreDisabled() { fun testAllTargetsAreFilteredInclWeatherWhenNotificationsAreDisabled() { // GIVEN the active user doesn't allow any notifications on lockscreen setShowNotifications(userHandlePrimary, false) connectSession() Loading @@ -488,7 +446,7 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { sessionListener.onTargetsAvailable(targets) // THEN all non-sensitive content is still shown verify(plugin).onTargetsAvailable(eq(listOf(targets[3]))) verify(plugin).onTargetsAvailable(emptyList()) } @Test Loading Loading @@ -519,8 +477,7 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { } @Test fun testSessionListener_ifDecouplingEnabled_weatherTargetIsFilteredOut() { `when`(featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)).thenReturn(true) fun testSessionListener_weatherTargetIsFilteredOut() { connectSession() // WHEN we receive a list of targets Loading Loading @@ -670,8 +627,7 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { } @Test fun testSessionListener_ifDecouplingEnabled_weatherDataUpdates() { `when`(featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)).thenReturn(true) fun testSessionListener_weatherDataUpdates() { connectSession() clock.setCurrentTimeMillis(SMARTSPACE_TIME_JUST_RIGHT) Loading @@ -698,33 +654,6 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { }) } @Test fun testSessionListener_ifDecouplingDisabled_weatherDataUpdates() { `when`(featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)).thenReturn(false) connectSession() clock.setCurrentTimeMillis(SMARTSPACE_TIME_JUST_RIGHT) // WHEN we receive a list of targets val targets = listOf( makeWeatherTargetWithExtras( id = 1, userHandle = userHandlePrimary, description = "Sunny", state = WeatherData.WeatherStateIcon.SUNNY.id, temperature = "32", useCelsius = false), makeTarget(2, userHandlePrimary, isSensitive = true) ) sessionListener.onTargetsAvailable(targets) verify(keyguardUpdateMonitor).sendWeatherData(argThat { w -> w.description == "Sunny" && w.state == WeatherData.WeatherStateIcon.SUNNY && w.temperature == 32 && !w.useCelsius }) } @Test fun testSettingsAreReloaded() { // GIVEN a connected session where the privacy settings later flip to false Loading Loading @@ -781,6 +710,8 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { connectSession() // WHEN we are told to cleanup controller.stateChangeListener.onViewDetachedFromWindow(dateSmartspaceView as View) controller.stateChangeListener.onViewDetachedFromWindow(weatherSmartspaceView as View) controller.stateChangeListener.onViewDetachedFromWindow(smartspaceView as View) controller.disconnect() Loading Loading @@ -815,16 +746,6 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { verify(smartspaceView2).registerConfigProvider(configPlugin) } @Test fun testWeatherViewUsesSameSession() { `when`(featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)).thenReturn(true) // GIVEN a connected session connectSession() // No checks is needed here, since connectSession() already checks internally that // createSmartspaceSession is invoked only once. } @Test fun testViewGetInitializedWithBypassEnabledState() { // GIVEN keyguard bypass is enabled. Loading Loading @@ -853,7 +774,6 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { } private fun connectSession() { if (controller.isDateWeatherDecoupled()) { val dateView = controller.buildAndConnectDateView(fakeParent) dateSmartspaceView = dateView as SmartspaceView fakeParent.addView(dateView) Loading @@ -877,7 +797,6 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { verify(weatherSmartspaceView).setPrimaryTextColor(anyInt()) verify(weatherSmartspaceView).setDozeAmount(0.5f) } val view = controller.buildAndConnectView(fakeParent) smartspaceView = view as SmartspaceView Loading Loading @@ -918,10 +837,8 @@ class LockscreenSmartspaceControllerTest : SysuiTestCase() { verify(smartspaceView).setPrimaryTextColor(anyInt()) verify(smartspaceView).setDozeAmount(0.5f) if (controller.isDateWeatherDecoupled()) { clearInvocations(dateSmartspaceView) clearInvocations(weatherSmartspaceView) } clearInvocations(smartspaceView) } Loading