From 45028616b78de9c1cee204805fbc1493ebc69c29 Mon Sep 17 00:00:00 2001 From: Alejandro Nijamkin Date: Sun, 19 Mar 2023 09:37:12 -0700 Subject: [PATCH] Removes unused getBouncerContainer method. Bug: 274159734 Test: code still builds. Change-Id: Icb761be844f1b14736984dcab8815ea1aff8f0ff --- .../shade/NotificationShadeWindowViewController.java | 7 ------- .../systemui/statusbar/phone/CentralSurfaces.java | 2 -- .../systemui/statusbar/phone/CentralSurfacesImpl.java | 5 ----- .../statusbar/phone/StatusBarKeyguardViewManager.java | 1 - .../NotificationShadeWindowViewControllerTest.kt | 11 +---------- .../phone/StatusBarKeyguardViewManagerTest.java | 1 - 6 files changed, 1 insertion(+), 26 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java index 788908fd71b91..0318fa570a787 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java +++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java @@ -196,13 +196,6 @@ public class NotificationShadeWindowViewController { } } - /** - * @return Location where to place the KeyguardBouncer - */ - public ViewGroup getBouncerContainer() { - return mView.findViewById(R.id.keyguard_bouncer_container); - } - /** * @return Location where to place the KeyguardMessageArea */ diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java index 55fa47951fe1a..7f8c1351aa7a5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java @@ -217,8 +217,6 @@ public interface CentralSurfaces extends Dumpable, ActivityStarter, LifecycleOwn NotificationPanelViewController getNotificationPanelViewController(); - ViewGroup getBouncerContainer(); - /** Get the Keyguard Message Area that displays auth messages. */ AuthKeyguardMessageArea getKeyguardMessageArea(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java index 5e3c1c59666d8..2f404873dc7a4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java @@ -1721,11 +1721,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { return mNotificationPanelViewController; } - @Override - public ViewGroup getBouncerContainer() { - return mNotificationShadeWindowViewController.getBouncerContainer(); - } - @Override public AuthKeyguardMessageArea getKeyguardMessageArea() { return mNotificationShadeWindowViewController.getKeyguardMessageArea(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java index 06d0758c90eb4..f06b5db845885 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -381,7 +381,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb mCentralSurfaces = centralSurfaces; mBiometricUnlockController = biometricUnlockController; - ViewGroup container = mCentralSurfaces.getBouncerContainer(); mPrimaryBouncerCallbackInteractor.addBouncerExpansionCallback(mExpansionCallback); mNotificationPanelViewController = notificationPanelViewController; if (shadeExpansionStateManager != null) { diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt index f3dc7b56d6e84..5f34b2f0f87ff 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt @@ -63,13 +63,12 @@ import org.junit.Test import org.junit.runner.RunWith import org.mockito.ArgumentCaptor import org.mockito.Mock -import org.mockito.Mockito import org.mockito.Mockito.anyFloat import org.mockito.Mockito.mock import org.mockito.Mockito.never import org.mockito.Mockito.verify -import org.mockito.Mockito.`when` as whenever import org.mockito.MockitoAnnotations +import org.mockito.Mockito.`when` as whenever @OptIn(ExperimentalCoroutinesApi::class) @SmallTest @@ -323,14 +322,6 @@ class NotificationShadeWindowViewControllerTest : SysuiTestCase() { assertThat(shouldIntercept).isTrue() } - @Test - fun testGetBouncerContainer() = - testScope.runTest { - Mockito.clearInvocations(view) - underTest.bouncerContainer - verify(view).findViewById(R.id.keyguard_bouncer_container) - } - @Test fun testGetKeyguardMessageArea() = testScope.runTest { diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java index d9546877a861d..14aee4e13a8f1 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java @@ -154,7 +154,6 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase { @Before public void setUp() { MockitoAnnotations.initMocks(this); - when(mCentralSurfaces.getBouncerContainer()).thenReturn(mContainer); when(mContainer.findViewById(anyInt())).thenReturn(mKeyguardMessageArea); when(mKeyguardMessageAreaFactory.create(any(KeyguardMessageArea.class))) .thenReturn(mKeyguardMessageAreaController);