Bouncer shouldn't be translated when occluded

Only checking if the bouncer should be scrimmed isn't enough
since it might have been initialized for performance reasons,
but is hidden at the bottom of the keyguard.

Change-Id: If92083e2c385d51febe0ec3a5e5d3484476caf81
Fixes: 80101176
Test: atest packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
Test: manual
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 e2e5b32..8340ab2 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
@@ -162,6 +162,14 @@
         verify(mBouncer, never()).show(eq(false), eq(false));
     }
 
+    @Test
+    public void onPanelExpansionChanged_neverTranslatesBouncerWhenOccluded() {
+        mStatusBarKeyguardViewManager.setOccluded(true /* occluded */, false /* animate */);
+        mStatusBarKeyguardViewManager.onPanelExpansionChanged(0.5f /* expansion */,
+                true /* tracking */);
+        verify(mBouncer, never()).setExpansion(eq(0.5f));
+    }
+
     private class TestableStatusBarKeyguardViewManager extends StatusBarKeyguardViewManager {
 
         public TestableStatusBarKeyguardViewManager(Context context,