diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml
index c5ba3d2a36cf4..7f645ba816647 100644
--- a/packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_status_view.xml
@@ -20,12 +20,14 @@
+ systemui:layout_constraintStart_toStartOf="parent"
+ systemui:layout_constraintEnd_toEndOf="parent"
+ systemui:layout_constraintTop_toTopOf="parent"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content">
+
diff --git a/packages/SystemUI/res/layout/status_bar_expanded.xml b/packages/SystemUI/res/layout/status_bar_expanded.xml
index 46a698a092e38..52995ea41b030 100644
--- a/packages/SystemUI/res/layout/status_bar_expanded.xml
+++ b/packages/SystemUI/res/layout/status_bar_expanded.xml
@@ -37,10 +37,6 @@
android:layout_height="match_parent"
android:layout_width="match_parent" />
-
-
+
+
Unit)? = null
- var view: MediaHeaderView? = null
- private set
/**
- * Attach this controller to a media view, initializing its state
+ * single pane media container placed at the top of the notifications list
*/
- fun attach(mediaView: MediaHeaderView) {
- view = mediaView
+ var singlePaneContainer: MediaHeaderView? = null
+ private set
+ private var splitShadeContainer: ViewGroup? = null
+ private var useSplitShadeContainer: () -> Boolean = { false }
+
+ /**
+ * Attaches media container in single pane mode, situated at the top of the notifications list
+ */
+ fun attachSinglePaneContainer(mediaView: MediaHeaderView?) {
+ singlePaneContainer = mediaView
// First let's set the desired state that we want for this host
- mediaHost.addVisibilityChangeListener { updateVisibility() }
- mediaHost.expansion = 0.0f
+ mediaHost.expansion = MediaHostState.COLLAPSED
mediaHost.showsOnlyActiveMedia = true
mediaHost.falsingProtectionNeeded = true
// Let's now initialize this view, which also creates the host view for us.
mediaHost.init(MediaHierarchyManager.LOCATION_LOCKSCREEN)
- mediaView.setContentView(mediaHost.hostView)
-
- // Ensure the visibility is correct
- updateVisibility()
+ // Required to show it for the first time, afterwards visibility is managed automatically
+ mediaHost.visible = true
+ mediaHost.addVisibilityChangeListener { visible ->
+ refreshMediaPosition()
+ if (visible) {
+ mediaHost.hostView.layoutParams.apply {
+ height = ViewGroup.LayoutParams.WRAP_CONTENT
+ width = ViewGroup.LayoutParams.MATCH_PARENT
+ }
+ }
+ }
+ refreshMediaPosition()
}
- private fun updateVisibility() {
+ /**
+ * Attaches media container in split shade mode, situated to the left of notifications
+ */
+ fun attachSplitShadeContainer(container: ViewGroup, useContainer: () -> Boolean) {
+ splitShadeContainer = container
+ useSplitShadeContainer = useContainer
+ }
+
+ fun refreshMediaPosition() {
val keyguardOrUserSwitcher = (statusBarStateController.state == StatusBarState.KEYGUARD ||
statusBarStateController.state == StatusBarState.FULLSCREEN_USER_SWITCHER)
+ // mediaHost.visible required for proper animations handling
val shouldBeVisible = mediaHost.visible &&
!bypassController.bypassEnabled &&
keyguardOrUserSwitcher &&
notifLockscreenUserManager.shouldShowLockscreenNotifications()
- val previousVisibility = view?.visibility ?: View.GONE
- val newVisibility = if (shouldBeVisible) View.VISIBLE else View.GONE
+ if (shouldBeVisible) {
+ showMediaPlayer()
+ } else {
+ hideMediaPlayer()
+ }
+ }
+
+ private fun showMediaPlayer() {
+ if (useSplitShadeContainer()) {
+ showMediaPlayer(
+ activeContainer = splitShadeContainer,
+ inactiveContainer = singlePaneContainer)
+ } else {
+ showMediaPlayer(
+ activeContainer = singlePaneContainer,
+ inactiveContainer = splitShadeContainer)
+ }
+ }
+
+ private fun showMediaPlayer(activeContainer: ViewGroup?, inactiveContainer: ViewGroup?) {
+ if (inactiveContainer?.childCount == 1) {
+ inactiveContainer.removeAllViews()
+ }
+ // might be called a few times for the same view, no need to add hostView again
+ if (activeContainer?.childCount == 0) {
+ activeContainer.addView(mediaHost.hostView)
+ }
+ setVisibility(activeContainer, View.VISIBLE)
+ setVisibility(inactiveContainer, View.GONE)
+ }
+
+ private fun hideMediaPlayer() {
+ if (useSplitShadeContainer()) {
+ setVisibility(splitShadeContainer, View.GONE)
+ } else {
+ setVisibility(singlePaneContainer, View.GONE)
+ }
+ }
+
+ private fun setVisibility(view: ViewGroup?, newVisibility: Int) {
+ val previousVisibility = view?.visibility
view?.visibility = newVisibility
if (previousVisibility != newVisibility) {
- visibilityChangedListener?.invoke(shouldBeVisible)
+ visibilityChangedListener?.invoke(newVisibility == View.VISIBLE)
}
}
}
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaHost.kt b/packages/SystemUI/src/com/android/systemui/media/MediaHost.kt
index 8c12a305992e3..2347481d1c3de 100644
--- a/packages/SystemUI/src/com/android/systemui/media/MediaHost.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/MediaHost.kt
@@ -264,15 +264,20 @@ class MediaHost constructor(
*/
interface MediaHostState {
+ companion object {
+ const val EXPANDED: Float = 1.0f
+ const val COLLAPSED: Float = 0.0f
+ }
+
/**
- * The last measurement input that this state was measured with. Infers with and height of
+ * The last measurement input that this state was measured with. Infers width and height of
* the players.
*/
var measurementInput: MeasurementInput?
/**
- * The expansion of the player, 0 for fully collapsed (up to 3 actions), 1 for fully expanded
- * (up to 5 actions.)
+ * The expansion of the player, [COLLAPSED] for fully collapsed (up to 3 actions),
+ * [EXPANDED] for fully expanded (up to 5 actions).
*/
var expansion: Float
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/MediaHeaderView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/MediaHeaderView.java
index 040f707e12f10..0247a99bc6c0d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/MediaHeaderView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/MediaHeaderView.java
@@ -19,7 +19,6 @@ package com.android.systemui.statusbar.notification.stack;
import android.animation.AnimatorListenerAdapter;
import android.content.Context;
import android.util.AttributeSet;
-import android.view.ViewGroup;
import com.android.systemui.statusbar.notification.row.ExpandableView;
@@ -43,11 +42,4 @@ public class MediaHeaderView extends ExpandableView {
public void performAddAnimation(long delay, long duration, boolean isHeadsUpAppear) {
// No animation, it doesn't need it, this would be local
}
-
- public void setContentView(ViewGroup contentView) {
- addView(contentView);
- ViewGroup.LayoutParams layoutParams = contentView.getLayoutParams();
- layoutParams.height = ViewGroup.LayoutParams.WRAP_CONTENT;
- layoutParams.width = ViewGroup.LayoutParams.MATCH_PARENT;
- }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManager.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManager.kt
index b06f7d25db163..45ce20a1f08fd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManager.kt
@@ -138,7 +138,7 @@ class NotificationSectionsManager @Inject internal constructor(
incomingHeaderController.reinflateView(parent)
mediaControlsView =
reinflateView(mediaControlsView, layoutInflater, R.layout.keyguard_media_header)
- .also(keyguardMediaController::attach)
+ keyguardMediaController.attachSinglePaneContainer(mediaControlsView)
}
override fun beginsSection(view: View, previous: View?): Boolean =
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
index 36a370c712166..527443eff1687 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
@@ -708,9 +708,10 @@ public class NotificationStackScrollLayoutController {
mView.setKeyguardMediaControllorVisible(visible);
if (visible) {
mView.generateAddAnimation(
- mKeyguardMediaController.getView(), false /*fromMoreCard */);
+ mKeyguardMediaController.getSinglePaneContainer(),
+ false /*fromMoreCard */);
} else {
- mView.generateRemoveAnimation(mKeyguardMediaController.getView());
+ mView.generateRemoveAnimation(mKeyguardMediaController.getSinglePaneContainer());
}
mView.requestChildrenUpdate();
return Unit.INSTANCE;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java
index 481b2db16964e..069c19770aef1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithm.java
@@ -155,6 +155,8 @@ public class KeyguardClockPositionAlgorithm {
private int mLockScreenMode;
+ private boolean mIsSplitShade;
+
/**
* Refreshes the dimension values.
*/
@@ -180,7 +182,7 @@ public class KeyguardClockPositionAlgorithm {
int keyguardStatusHeight, int userSwitchHeight, int clockPreferredY,
int userSwitchPreferredY, boolean hasCustomClock, boolean hasVisibleNotifs, float dark,
float emptyDragAmount, boolean bypassEnabled, int unlockedStackScrollerPadding,
- float qsExpansion, int cutoutTopInset) {
+ float qsExpansion, int cutoutTopInset, boolean isSplitShade) {
mMinTopMargin = keyguardStatusBarHeaderHeight + Math.max(mContainerTopPadding,
userSwitchHeight);
mMaxShadeBottom = maxShadeBottom;
@@ -199,6 +201,7 @@ public class KeyguardClockPositionAlgorithm {
mUnlockedStackScrollerPadding = unlockedStackScrollerPadding;
mQsExpansion = qsExpansion;
mCutoutTopInset = cutoutTopInset;
+ mIsSplitShade = isSplitShade;
}
public void run(Result result) {
@@ -208,14 +211,23 @@ public class KeyguardClockPositionAlgorithm {
result.clockYFullyDozing = getClockY(
1.0f /* panelExpansion */, 1.0f /* darkAmount */);
result.clockAlpha = getClockAlpha(y);
- result.stackScrollerPadding = mBypassEnabled ? mUnlockedStackScrollerPadding
- : y + mKeyguardStatusHeight;
+ result.stackScrollerPadding = getStackScrollerPadding(y);
result.stackScrollerPaddingExpanded = mBypassEnabled ? mUnlockedStackScrollerPadding
: getClockY(1.0f, mDarkAmount) + mKeyguardStatusHeight;
result.clockX = (int) interpolate(0, burnInPreventionOffsetX(), mDarkAmount);
result.clockScale = interpolate(getBurnInScale(), 1.0f, 1.0f - mDarkAmount);
}
+ private int getStackScrollerPadding(int clockYPosition) {
+ if (mBypassEnabled) {
+ return mUnlockedStackScrollerPadding;
+ } else if (mIsSplitShade) {
+ return clockYPosition;
+ } else {
+ return clockYPosition + mKeyguardStatusHeight;
+ }
+ }
+
/**
* Update lock screen mode for testing different layouts
*/
@@ -232,15 +244,11 @@ public class KeyguardClockPositionAlgorithm {
return mHeight / 2 - mKeyguardStatusHeight - mClockNotificationsMargin;
}
- private int getPreferredClockY() {
- return mClockPreferredY;
- }
-
private int getExpandedPreferredClockY() {
if (mLockScreenMode != KeyguardUpdateMonitor.LOCK_SCREEN_MODE_NORMAL) {
return mMinTopMargin + mUserSwitchHeight;
}
- return (mHasCustomClock && (!mHasVisibleNotifs || mBypassEnabled)) ? getPreferredClockY()
+ return (mHasCustomClock && (!mHasVisibleNotifs || mBypassEnabled)) ? mClockPreferredY
: getExpandedClockPosition();
}
@@ -271,7 +279,7 @@ public class KeyguardClockPositionAlgorithm {
private int getClockY(float panelExpansion, float darkAmount) {
// Dark: Align the bottom edge of the clock at about half of the screen:
- float clockYDark = (mHasCustomClock ? getPreferredClockY() : getMaxClockY())
+ float clockYDark = (mHasCustomClock ? mClockPreferredY : getMaxClockY())
+ burnInPreventionOffsetY();
clockYDark = MathUtils.max(0, clockYDark);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java
index d85be1df1b999..8574830e642ce 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java
@@ -28,6 +28,7 @@ import static com.android.systemui.classifier.Classifier.QS_COLLAPSE;
import static com.android.systemui.classifier.Classifier.QUICK_SETTINGS;
import static com.android.systemui.statusbar.StatusBarState.KEYGUARD;
import static com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout.ROWS_ALL;
+import static com.android.systemui.util.Utils.shouldUseSplitNotificationShade;
import static java.lang.Float.isNaN;
@@ -99,6 +100,7 @@ import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.doze.DozeLog;
import com.android.systemui.fragments.FragmentHostManager;
import com.android.systemui.fragments.FragmentHostManager.FragmentListener;
+import com.android.systemui.media.KeyguardMediaController;
import com.android.systemui.media.MediaDataManager;
import com.android.systemui.media.MediaHierarchyManager;
import com.android.systemui.plugins.FalsingManager;
@@ -527,6 +529,7 @@ public class NotificationPanelViewController extends PanelViewController {
private int mLockScreenMode = KeyguardUpdateMonitor.LOCK_SCREEN_MODE_NORMAL;
private int mScrimCornerRadius;
+ private KeyguardMediaController mKeyguardMediaController;
private View.AccessibilityDelegate mAccessibilityDelegate = new View.AccessibilityDelegate() {
@Override
@@ -597,6 +600,7 @@ public class NotificationPanelViewController extends PanelViewController {
LockIconViewController lockIconViewController,
FeatureFlags featureFlags,
QuickAccessWalletClient quickAccessWalletClient,
+ KeyguardMediaController keyguardMediaController,
@Main Executor uiExecutor) {
super(view, falsingManager, dozeLog, keyguardStateController,
(SysuiStatusBarStateController) statusBarStateController, vibratorHelper,
@@ -604,6 +608,7 @@ public class NotificationPanelViewController extends PanelViewController {
statusBarTouchableRegionManager, ambientState);
mView = view;
mVibratorHelper = vibratorHelper;
+ mKeyguardMediaController = keyguardMediaController;
mMetricsLogger = metricsLogger;
mActivityManager = activityManager;
mConfigurationController = configurationController;
@@ -771,7 +776,6 @@ public class NotificationPanelViewController extends PanelViewController {
});
mView.setAccessibilityDelegate(mAccessibilityDelegate);
- // dynamically apply the split shade value overrides.
if (mShouldUseSplitNotificationShade) {
updateResources();
}
@@ -889,13 +893,17 @@ public class NotificationPanelViewController extends PanelViewController {
constraintSet.connect(
R.id.notification_stack_scroller, START,
R.id.qs_edge_guideline, START);
+ constraintSet.connect(R.id.keyguard_status_view, END, R.id.qs_edge_guideline, END);
} else {
constraintSet.connect(R.id.qs_frame, END, PARENT_ID, END);
constraintSet.connect(R.id.notification_stack_scroller, START, PARENT_ID, START);
+ constraintSet.connect(R.id.keyguard_status_view, END, PARENT_ID, END);
}
constraintSet.getConstraint(R.id.notification_stack_scroller).layout.mWidth = panelWidth;
constraintSet.getConstraint(R.id.qs_frame).layout.mWidth = qsWidth;
constraintSet.applyTo(mNotificationContainerParent);
+
+ mKeyguardMediaController.refreshMediaPosition();
}
private static void ensureAllViewsHaveIds(ViewGroup parentView) {
@@ -929,12 +937,18 @@ public class NotificationPanelViewController extends PanelViewController {
private void reInflateViews() {
if (DEBUG) Log.d(TAG, "reInflateViews");
// Re-inflate the status view group.
- KeyguardStatusView keyguardStatusView = mView.findViewById(R.id.keyguard_status_view);
- int index = mView.indexOfChild(keyguardStatusView);
- mView.removeView(keyguardStatusView);
+ KeyguardStatusView keyguardStatusView =
+ mNotificationContainerParent.findViewById(R.id.keyguard_status_view);
+ int statusIndex = mNotificationContainerParent.indexOfChild(keyguardStatusView);
+ mNotificationContainerParent.removeView(keyguardStatusView);
keyguardStatusView = (KeyguardStatusView) mLayoutInflater.inflate(
- R.layout.keyguard_status_view, mView, false);
- mView.addView(keyguardStatusView, index);
+ R.layout.keyguard_status_view, mNotificationContainerParent, false);
+ mNotificationContainerParent.addView(keyguardStatusView, statusIndex);
+ attachSplitShadeMediaPlayerContainer(
+ keyguardStatusView.findViewById(R.id.status_view_media_container));
+
+ // we need to update KeyguardStatusView constraints after reinflating it
+ updateResources();
// Re-inflate the keyguard user switcher group.
boolean isUserSwitcherEnabled = mUserManager.isUserSwitcherEnabled();
@@ -956,11 +970,11 @@ public class NotificationPanelViewController extends PanelViewController {
showKeyguardUserSwitcher /* enabled */);
mBigClockContainer.removeAllViews();
- updateViewControllers(
- keyguardStatusView, userAvatarView, mKeyguardStatusBar, keyguardUserSwitcherView);
+ updateViewControllers(mView.findViewById(R.id.keyguard_status_view), userAvatarView,
+ mKeyguardStatusBar, keyguardUserSwitcherView);
// Update keyguard bottom area
- index = mView.indexOfChild(mKeyguardBottomArea);
+ int index = mView.indexOfChild(mKeyguardBottomArea);
mView.removeView(mKeyguardBottomArea);
KeyguardBottomAreaView oldBottomArea = mKeyguardBottomArea;
mKeyguardBottomArea = (KeyguardBottomAreaView) mLayoutInflater.inflate(
@@ -998,6 +1012,11 @@ public class NotificationPanelViewController extends PanelViewController {
setKeyguardBottomAreaVisibility(mBarState, false);
}
+ private void attachSplitShadeMediaPlayerContainer(FrameLayout container) {
+ mKeyguardMediaController.attachSplitShadeContainer(container,
+ () -> mShouldUseSplitNotificationShade);
+ }
+
private void initBottomArea() {
mAffordanceHelper = new KeyguardAffordanceHelper(
mKeyguardAffordanceHelperCallback, mView.getContext(), mFalsingManager);
@@ -1110,7 +1129,8 @@ public class NotificationPanelViewController extends PanelViewController {
hasVisibleNotifications, mInterpolatedDarkAmount, mEmptyDragAmount,
bypassEnabled, getUnlockedStackScrollerPadding(),
getQsExpansionFraction(),
- mDisplayCutoutTopInset);
+ mDisplayCutoutTopInset,
+ shouldUseSplitNotificationShade(mFeatureFlags, mResources));
mClockPositionAlgorithm.run(mClockPositionResult);
mKeyguardStatusViewController.updatePosition(
mClockPositionResult.clockX, mClockPositionResult.clockY,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/KeyguardMediaControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/KeyguardMediaControllerTest.kt
index 730c941cc4140..1403b7674d097 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/KeyguardMediaControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/KeyguardMediaControllerTest.kt
@@ -27,13 +27,10 @@ import com.android.systemui.statusbar.StatusBarState
import com.android.systemui.statusbar.SysuiStatusBarStateController
import com.android.systemui.statusbar.notification.stack.MediaHeaderView
import com.android.systemui.statusbar.phone.KeyguardBypassController
-import com.android.systemui.util.mockito.capture
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
-import org.mockito.ArgumentCaptor
-import org.mockito.Captor
import org.mockito.Mock
import org.mockito.Mockito.`when`
import org.mockito.Mockito.atLeastOnce
@@ -54,8 +51,6 @@ class KeyguardMediaControllerTest : SysuiTestCase() {
private lateinit var notificationLockscreenUserManager: NotificationLockscreenUserManager
@Mock
private lateinit var mediaHeaderView: MediaHeaderView
- @Captor
- private lateinit var visibilityListener: ArgumentCaptor<((Boolean) -> Unit)>
@JvmField @Rule
val mockito = MockitoJUnit.rule()
private lateinit var keyguardMediaController: KeyguardMediaController
@@ -69,7 +64,8 @@ class KeyguardMediaControllerTest : SysuiTestCase() {
@Test
fun testAttach_hiddenWhenHostIsHidden() {
`when`(mediaHost.visible).thenReturn(false)
- triggerVisibilityListener()
+
+ keyguardMediaController.attachSinglePaneContainer(mediaHeaderView)
verify(mediaHeaderView, atLeastOnce()).visibility = eq(GONE)
}
@@ -79,7 +75,8 @@ class KeyguardMediaControllerTest : SysuiTestCase() {
`when`(statusBarStateController.state).thenReturn(StatusBarState.KEYGUARD)
`when`(notificationLockscreenUserManager.shouldShowLockscreenNotifications())
.thenReturn(true)
- triggerVisibilityListener()
+
+ keyguardMediaController.attachSinglePaneContainer(mediaHeaderView)
verify(mediaHeaderView, atLeastOnce()).visibility = eq(VISIBLE)
}
@@ -89,14 +86,9 @@ class KeyguardMediaControllerTest : SysuiTestCase() {
`when`(statusBarStateController.state).thenReturn(StatusBarState.KEYGUARD)
`when`(notificationLockscreenUserManager.shouldShowLockscreenNotifications())
.thenReturn(false)
- triggerVisibilityListener()
+
+ keyguardMediaController.attachSinglePaneContainer(mediaHeaderView)
verify(mediaHeaderView, atLeastOnce()).visibility = eq(GONE)
}
-
- private fun triggerVisibilityListener() {
- keyguardMediaController.attach(mediaHeaderView)
- verify(mediaHost).addVisibilityChangeListener(capture(visibilityListener))
- visibilityListener.value.invoke(true)
- }
}
\ No newline at end of file
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithmTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithmTest.java
index 02e2e4c793bcc..71519ce03a422 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithmTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardClockPositionAlgorithmTest.java
@@ -53,6 +53,7 @@ public class KeyguardClockPositionAlgorithmTest extends SysuiTestCase {
private boolean mHasVisibleNotifs;
private float mQsExpansion;
private int mCutoutTopInset = 0; // in pixels
+ private boolean mIsSplitShade = false;
@Before
public void setUp() {
@@ -397,7 +398,7 @@ public class KeyguardClockPositionAlgorithmTest extends SysuiTestCase {
0 /* userSwitchHeight */, mPreferredClockY, 0 /* userSwitchPreferredY */,
mHasCustomClock, mHasVisibleNotifs, mDark, ZERO_DRAG, false /* bypassEnabled */,
0 /* unlockedStackScrollerPadding */, mQsExpansion,
- mCutoutTopInset);
+ mCutoutTopInset, mIsSplitShade);
mClockPositionAlgorithm.run(mClockPosition);
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewTest.java
index 2e4d253fad56d..63086e4d9e94d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewTest.java
@@ -75,6 +75,7 @@ import com.android.systemui.biometrics.AuthController;
import com.android.systemui.classifier.FalsingCollectorFake;
import com.android.systemui.classifier.FalsingManagerFake;
import com.android.systemui.doze.DozeLog;
+import com.android.systemui.media.KeyguardMediaController;
import com.android.systemui.media.MediaDataManager;
import com.android.systemui.media.MediaHierarchyManager;
import com.android.systemui.qs.QSDetailDisplayer;
@@ -240,6 +241,8 @@ public class NotificationPanelViewTest extends SysuiTestCase {
private LockIconViewController mLockIconViewController;
@Mock
private QuickAccessWalletClient mQuickAccessWalletClient;
+ @Mock
+ private KeyguardMediaController mKeyguardMediaController;
private SysuiStatusBarStateController mStatusBarStateController;
private NotificationPanelViewController mNotificationPanelViewController;
@@ -346,6 +349,7 @@ public class NotificationPanelViewTest extends SysuiTestCase {
mLockIconViewController,
mFeatureFlags,
mQuickAccessWalletClient,
+ mKeyguardMediaController,
new FakeExecutor(new FakeSystemClock()));
mNotificationPanelViewController.initDependencies(
mStatusBar,