From f604899693c61ad15ab14b42d977cb6247a3e6d9 Mon Sep 17 00:00:00 2001 From: Hawkwood Glazier Date: Mon, 9 May 2022 19:58:54 +0000 Subject: [PATCH] Revert "Scrim now only scales horizontally" This reverts commit a2e5077e22374fe7ddf5a0855d705040fc7735e1. Reason for revert: Created other bad behavior Change-Id: I1a0abb7ae11c051793360cc5d8a52f6b45300b9b --- .../src/com/android/systemui/media/MediaControlPanel.java | 4 ---- .../src/com/android/systemui/media/MediaControlPanelTest.kt | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java b/packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java index d65940172b174..2fec49955c2d2 100644 --- a/packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java +++ b/packages/SystemUI/src/com/android/systemui/media/MediaControlPanel.java @@ -636,10 +636,6 @@ public class MediaControlPanel { mIsArtworkBound = isArtworkBound; } - // Scrim bounds are set manually so it scales as expected - albumView.getForeground().setBounds(0, 0, - Math.max(width, height), Math.max(width, height)); - // Transition Colors to current color scheme mColorSchemeTransition.updateColorScheme(colorScheme, mIsArtworkBound); diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/MediaControlPanelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/MediaControlPanelTest.kt index 0ed579f9c10b6..f9fb8657d0f6f 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/media/MediaControlPanelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/media/MediaControlPanelTest.kt @@ -21,6 +21,7 @@ import android.animation.AnimatorSet import android.app.PendingIntent import android.app.smartspace.SmartspaceAction import android.content.Context +import org.mockito.Mockito.`when` as whenever import android.content.Intent import android.content.pm.ApplicationInfo import android.content.pm.PackageManager @@ -66,8 +67,8 @@ import com.android.systemui.statusbar.policy.KeyguardStateController import com.android.systemui.util.animation.TransitionLayout import com.android.systemui.util.concurrency.FakeExecutor import com.android.systemui.util.mockito.KotlinArgumentCaptor -import com.android.systemui.util.mockito.any import com.android.systemui.util.mockito.argumentCaptor +import com.android.systemui.util.mockito.any import com.android.systemui.util.mockito.eq import com.android.systemui.util.mockito.nullable import com.android.systemui.util.mockito.withArgCaptor @@ -91,7 +92,6 @@ import org.mockito.Mockito.reset import org.mockito.Mockito.times import org.mockito.Mockito.verify import org.mockito.junit.MockitoJUnit -import org.mockito.Mockito.`when` as whenever private const val KEY = "TEST_KEY" private const val PACKAGE = "PKG" @@ -339,7 +339,6 @@ public class MediaControlPanelTest : SysuiTestCase() { whenever(viewHolder.player).thenReturn(view) whenever(viewHolder.appIcon).thenReturn(appIcon) whenever(viewHolder.albumView).thenReturn(albumView) - whenever(albumView.foreground).thenReturn(mock(Drawable::class.java)) whenever(viewHolder.titleText).thenReturn(titleText) whenever(viewHolder.artistText).thenReturn(artistText) whenever(seamlessBackground.getDrawable(0)).thenReturn(mock(GradientDrawable::class.java))