From ff2c6554e3e95f5654a639292b2b9fd36b9df236 Mon Sep 17 00:00:00 2001 From: Matt Pietal Date: Fri, 10 Sep 2021 16:03:04 -0400 Subject: [PATCH] Update test for smartspace disconnect The views are no longer removed, only the controller disconnected. Fixes: 198417199 Test: atest KeyguardClockSwitchControllerTest Change-Id: I23969115ae33694714e12a05913128b208530a01 --- .../android/keyguard/KeyguardClockSwitchControllerTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java index 06b0bb25e01c1..8d615f050af91 100644 --- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java @@ -226,7 +226,7 @@ public class KeyguardClockSwitchControllerTest extends SysuiTestCase { } @Test - public void testDetachRemovesSmartspaceView() { + public void testDetachDisconnectsSmartspace() { when(mSmartspaceController.isEnabled()).thenReturn(true); when(mSmartspaceController.buildAndConnectView(any())).thenReturn(mFakeSmartspaceView); mController.init(); @@ -237,7 +237,7 @@ public class KeyguardClockSwitchControllerTest extends SysuiTestCase { verify(mView).addOnAttachStateChangeListener(listenerArgumentCaptor.capture()); listenerArgumentCaptor.getValue().onViewDetachedFromWindow(mView); - verify(mView).removeView(mFakeSmartspaceView); + verify(mSmartspaceController).disconnect(); } @Test