Add smart space to custom clock faces.

This changes adds a hook to the ClockPlugin to allow the
custom clock to control the position of the smart space.

Still todo:
 - move out of the way for the lock icon
 - don't slide smart space down on lock screen when no
   notifs are showing

Bug: 129348218
Test: Manually checked custom clock faces.
Change-Id: I2472f6b2bb54f94e2e673f01c78170c0e7f87627
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index dd957b4..9ae2996 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -208,9 +208,9 @@
     private int mUnlockMoveDistance;
     private float mEmptyDragAmount;
 
-    private KeyguardClockPositionAlgorithm mClockPositionAlgorithm =
+    private final KeyguardClockPositionAlgorithm mClockPositionAlgorithm =
             new KeyguardClockPositionAlgorithm();
-    private KeyguardClockPositionAlgorithm.Result mClockPositionResult =
+    private final KeyguardClockPositionAlgorithm.Result mClockPositionResult =
             new KeyguardClockPositionAlgorithm.Result();
     private boolean mIsExpanding;
 
@@ -627,6 +627,7 @@
         } else {
             int totalHeight = getHeight();
             int bottomPadding = Math.max(mIndicationBottomPadding, mAmbientIndicationBottomPadding);
+            int clockPreferredY = mKeyguardStatusView.getClockPreferredY(totalHeight);
             mClockPositionAlgorithm.setup(
                     mStatusBarMinHeight,
                     totalHeight - bottomPadding,
@@ -634,6 +635,7 @@
                     getExpandedFraction(),
                     totalHeight,
                     mKeyguardStatusView.getHeight(),
+                    clockPreferredY,
                     mInterpolatedDarkAmount,
                     mStatusBar.isKeyguardCurrentlySecure(),
                     mEmptyDragAmount);
@@ -2830,7 +2832,7 @@
         mDozing = dozing;
         mNotificationStackScroller.setDark(mDozing, animate, wakeUpTouchLocation);
         if (mDozing) {
-            mNotificationStackScroller.setShowDarkShelf(!hasCustomClock());
+            mNotificationStackScroller.showDarkShelf();
         }
         mKeyguardBottomArea.setDozing(mDozing, animate);