Merge "Don't blur during app launch animations" into sc-dev
This commit is contained in:
@@ -159,6 +159,7 @@ class ActivityLaunchAnimator(
|
|||||||
// If we expect an animation, post a timeout to cancel it in case the remote animation is
|
// If we expect an animation, post a timeout to cancel it in case the remote animation is
|
||||||
// never started.
|
// never started.
|
||||||
if (willAnimate) {
|
if (willAnimate) {
|
||||||
|
keyguardHandler.disableKeyguardBlurs()
|
||||||
runner.postTimeout()
|
runner.postTimeout()
|
||||||
|
|
||||||
// Hide the keyguard using the launch animation instead of the default unlock animation.
|
// Hide the keyguard using the launch animation instead of the default unlock animation.
|
||||||
@@ -218,6 +219,9 @@ class ActivityLaunchAnimator(
|
|||||||
|
|
||||||
/** Hide the keyguard and animate using [runner]. */
|
/** Hide the keyguard and animate using [runner]. */
|
||||||
fun hideKeyguardWithAnimation(runner: IRemoteAnimationRunner)
|
fun hideKeyguardWithAnimation(runner: IRemoteAnimationRunner)
|
||||||
|
|
||||||
|
/** Disable window blur so they don't overlap with the window launch animation **/
|
||||||
|
fun disableKeyguardBlurs()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ import com.android.systemui.navigationbar.NavigationModeController;
|
|||||||
import com.android.systemui.plugins.statusbar.StatusBarStateController;
|
import com.android.systemui.plugins.statusbar.StatusBarStateController;
|
||||||
import com.android.systemui.shared.system.QuickStepContract;
|
import com.android.systemui.shared.system.QuickStepContract;
|
||||||
import com.android.systemui.statusbar.CommandQueue;
|
import com.android.systemui.statusbar.CommandQueue;
|
||||||
|
import com.android.systemui.statusbar.NotificationShadeDepthController;
|
||||||
import com.android.systemui.statusbar.SysuiStatusBarStateController;
|
import com.android.systemui.statusbar.SysuiStatusBarStateController;
|
||||||
import com.android.systemui.statusbar.phone.BiometricUnlockController;
|
import com.android.systemui.statusbar.phone.BiometricUnlockController;
|
||||||
import com.android.systemui.statusbar.phone.DozeParameters;
|
import com.android.systemui.statusbar.phone.DozeParameters;
|
||||||
@@ -240,6 +241,7 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable,
|
|||||||
private final SysuiStatusBarStateController mStatusBarStateController;
|
private final SysuiStatusBarStateController mStatusBarStateController;
|
||||||
private final Executor mUiBgExecutor;
|
private final Executor mUiBgExecutor;
|
||||||
private final UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController;
|
private final UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController;
|
||||||
|
private final Lazy<NotificationShadeDepthController> mNotificationShadeDepthController;
|
||||||
|
|
||||||
private boolean mSystemReady;
|
private boolean mSystemReady;
|
||||||
private boolean mBootCompleted;
|
private boolean mBootCompleted;
|
||||||
@@ -810,13 +812,15 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable,
|
|||||||
SysuiStatusBarStateController statusBarStateController,
|
SysuiStatusBarStateController statusBarStateController,
|
||||||
KeyguardStateController keyguardStateController,
|
KeyguardStateController keyguardStateController,
|
||||||
Lazy<KeyguardUnlockAnimationController> keyguardUnlockAnimationControllerLazy,
|
Lazy<KeyguardUnlockAnimationController> keyguardUnlockAnimationControllerLazy,
|
||||||
UnlockedScreenOffAnimationController unlockedScreenOffAnimationController) {
|
UnlockedScreenOffAnimationController unlockedScreenOffAnimationController,
|
||||||
|
Lazy<NotificationShadeDepthController> notificationShadeDepthController) {
|
||||||
super(context);
|
super(context);
|
||||||
mFalsingCollector = falsingCollector;
|
mFalsingCollector = falsingCollector;
|
||||||
mLockPatternUtils = lockPatternUtils;
|
mLockPatternUtils = lockPatternUtils;
|
||||||
mBroadcastDispatcher = broadcastDispatcher;
|
mBroadcastDispatcher = broadcastDispatcher;
|
||||||
mKeyguardViewControllerLazy = statusBarKeyguardViewManagerLazy;
|
mKeyguardViewControllerLazy = statusBarKeyguardViewManagerLazy;
|
||||||
mDismissCallbackRegistry = dismissCallbackRegistry;
|
mDismissCallbackRegistry = dismissCallbackRegistry;
|
||||||
|
mNotificationShadeDepthController = notificationShadeDepthController;
|
||||||
mUiBgExecutor = uiBgExecutor;
|
mUiBgExecutor = uiBgExecutor;
|
||||||
mUpdateMonitor = keyguardUpdateMonitor;
|
mUpdateMonitor = keyguardUpdateMonitor;
|
||||||
mPM = powerManager;
|
mPM = powerManager;
|
||||||
@@ -1657,6 +1661,14 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable,
|
|||||||
hideLocked();
|
hideLocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disable notification shade background blurs until the keyguard is dismissed.
|
||||||
|
* (Used during app launch animations)
|
||||||
|
*/
|
||||||
|
public void disableBlursUntilHidden() {
|
||||||
|
mNotificationShadeDepthController.get().setIgnoreShadeBlurUntilHidden(true);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isSecure() {
|
public boolean isSecure() {
|
||||||
return isSecure(KeyguardUpdateMonitor.getCurrentUser());
|
return isSecure(KeyguardUpdateMonitor.getCurrentUser());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ import com.android.systemui.keyguard.KeyguardUnlockAnimationController;
|
|||||||
import com.android.systemui.keyguard.KeyguardViewMediator;
|
import com.android.systemui.keyguard.KeyguardViewMediator;
|
||||||
import com.android.systemui.navigationbar.NavigationModeController;
|
import com.android.systemui.navigationbar.NavigationModeController;
|
||||||
import com.android.systemui.plugins.statusbar.StatusBarStateController;
|
import com.android.systemui.plugins.statusbar.StatusBarStateController;
|
||||||
|
import com.android.systemui.statusbar.NotificationShadeDepthController;
|
||||||
import com.android.systemui.statusbar.NotificationShadeWindowController;
|
import com.android.systemui.statusbar.NotificationShadeWindowController;
|
||||||
import com.android.systemui.statusbar.SysuiStatusBarStateController;
|
import com.android.systemui.statusbar.SysuiStatusBarStateController;
|
||||||
import com.android.systemui.statusbar.phone.DozeParameters;
|
import com.android.systemui.statusbar.phone.DozeParameters;
|
||||||
@@ -99,7 +100,8 @@ public class KeyguardModule {
|
|||||||
SysuiStatusBarStateController statusBarStateController,
|
SysuiStatusBarStateController statusBarStateController,
|
||||||
KeyguardStateController keyguardStateController,
|
KeyguardStateController keyguardStateController,
|
||||||
Lazy<KeyguardUnlockAnimationController> keyguardUnlockAnimationController,
|
Lazy<KeyguardUnlockAnimationController> keyguardUnlockAnimationController,
|
||||||
UnlockedScreenOffAnimationController unlockedScreenOffAnimationController) {
|
UnlockedScreenOffAnimationController unlockedScreenOffAnimationController,
|
||||||
|
Lazy<NotificationShadeDepthController> notificationShadeDepthController) {
|
||||||
return new KeyguardViewMediator(
|
return new KeyguardViewMediator(
|
||||||
context,
|
context,
|
||||||
falsingCollector,
|
falsingCollector,
|
||||||
@@ -119,7 +121,8 @@ public class KeyguardModule {
|
|||||||
statusBarStateController,
|
statusBarStateController,
|
||||||
keyguardStateController,
|
keyguardStateController,
|
||||||
keyguardUnlockAnimationController,
|
keyguardUnlockAnimationController,
|
||||||
unlockedScreenOffAnimationController
|
unlockedScreenOffAnimationController,
|
||||||
|
notificationShadeDepthController
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ import com.android.systemui.animation.Interpolators
|
|||||||
import com.android.systemui.dagger.SysUISingleton
|
import com.android.systemui.dagger.SysUISingleton
|
||||||
import com.android.systemui.dump.DumpManager
|
import com.android.systemui.dump.DumpManager
|
||||||
import com.android.systemui.plugins.statusbar.StatusBarStateController
|
import com.android.systemui.plugins.statusbar.StatusBarStateController
|
||||||
import com.android.systemui.statusbar.notification.ExpandAnimationParameters
|
|
||||||
import com.android.systemui.statusbar.phone.BiometricUnlockController
|
import com.android.systemui.statusbar.phone.BiometricUnlockController
|
||||||
import com.android.systemui.statusbar.phone.BiometricUnlockController.MODE_WAKE_AND_UNLOCK
|
import com.android.systemui.statusbar.phone.BiometricUnlockController.MODE_WAKE_AND_UNLOCK
|
||||||
import com.android.systemui.statusbar.phone.DozeParameters
|
import com.android.systemui.statusbar.phone.DozeParameters
|
||||||
@@ -79,7 +78,6 @@ class NotificationShadeDepthController @Inject constructor(
|
|||||||
private var notificationAnimator: Animator? = null
|
private var notificationAnimator: Animator? = null
|
||||||
private var updateScheduled: Boolean = false
|
private var updateScheduled: Boolean = false
|
||||||
private var shadeExpansion = 0f
|
private var shadeExpansion = 0f
|
||||||
private var ignoreShadeBlurUntilHidden: Boolean = false
|
|
||||||
private var isClosed: Boolean = true
|
private var isClosed: Boolean = true
|
||||||
private var isOpen: Boolean = false
|
private var isOpen: Boolean = false
|
||||||
private var isBlurred: Boolean = false
|
private var isBlurred: Boolean = false
|
||||||
@@ -119,18 +117,17 @@ class NotificationShadeDepthController @Inject constructor(
|
|||||||
* When launching an app from the shade, the animations progress should affect how blurry the
|
* When launching an app from the shade, the animations progress should affect how blurry the
|
||||||
* shade is, overriding the expansion amount.
|
* shade is, overriding the expansion amount.
|
||||||
*/
|
*/
|
||||||
var notificationLaunchAnimationParams: ExpandAnimationParameters? = null
|
var ignoreShadeBlurUntilHidden: Boolean = false
|
||||||
set(value) {
|
set(value) {
|
||||||
field = value
|
if (field == value) {
|
||||||
if (value != null) {
|
|
||||||
scheduleUpdate()
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
field = value
|
||||||
|
scheduleUpdate()
|
||||||
|
|
||||||
if (shadeSpring.radius == 0 && shadeAnimation.radius == 0) {
|
if (shadeSpring.radius == 0 && shadeAnimation.radius == 0) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ignoreShadeBlurUntilHidden = true
|
|
||||||
shadeSpring.animateTo(0)
|
shadeSpring.animateTo(0)
|
||||||
shadeSpring.finishIfRunning()
|
shadeSpring.finishIfRunning()
|
||||||
|
|
||||||
@@ -171,8 +168,6 @@ class NotificationShadeDepthController @Inject constructor(
|
|||||||
combinedBlur = max(combinedBlur, blurUtils.blurRadiusOfRatio(qsPanelExpansion))
|
combinedBlur = max(combinedBlur, blurUtils.blurRadiusOfRatio(qsPanelExpansion))
|
||||||
combinedBlur = max(combinedBlur, blurUtils.blurRadiusOfRatio(transitionToFullShadeProgress))
|
combinedBlur = max(combinedBlur, blurUtils.blurRadiusOfRatio(transitionToFullShadeProgress))
|
||||||
var shadeRadius = max(combinedBlur, wakeAndUnlockBlurRadius).toFloat()
|
var shadeRadius = max(combinedBlur, wakeAndUnlockBlurRadius).toFloat()
|
||||||
val launchProgress = notificationLaunchAnimationParams?.linearProgress ?: 0f
|
|
||||||
shadeRadius *= (1f - launchProgress) * (1f - launchProgress)
|
|
||||||
|
|
||||||
if (ignoreShadeBlurUntilHidden) {
|
if (ignoreShadeBlurUntilHidden) {
|
||||||
if (shadeRadius == 0f) {
|
if (shadeRadius == 0f) {
|
||||||
@@ -195,7 +190,8 @@ class NotificationShadeDepthController @Inject constructor(
|
|||||||
blur = 0
|
blur = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
blurUtils.applyBlur(blurRoot?.viewRootImpl ?: root.viewRootImpl, blur, scrimsVisible)
|
val opaque = scrimsVisible && !ignoreShadeBlurUntilHidden
|
||||||
|
blurUtils.applyBlur(blurRoot?.viewRootImpl ?: root.viewRootImpl, blur, opaque)
|
||||||
val zoomOut = blurUtils.ratioOfBlurRadius(blur)
|
val zoomOut = blurUtils.ratioOfBlurRadius(blur)
|
||||||
try {
|
try {
|
||||||
if (root.isAttachedToWindow && root.windowToken != null) {
|
if (root.isAttachedToWindow && root.windowToken != null) {
|
||||||
@@ -430,8 +426,6 @@ class NotificationShadeDepthController @Inject constructor(
|
|||||||
it.println("shadeAnimation: ${shadeAnimation.radius}")
|
it.println("shadeAnimation: ${shadeAnimation.radius}")
|
||||||
it.println("globalActionsRadius: ${globalActionsSpring.radius}")
|
it.println("globalActionsRadius: ${globalActionsSpring.radius}")
|
||||||
it.println("wakeAndUnlockBlur: $wakeAndUnlockBlurRadius")
|
it.println("wakeAndUnlockBlur: $wakeAndUnlockBlurRadius")
|
||||||
it.println("notificationLaunchAnimationProgress: " +
|
|
||||||
"${notificationLaunchAnimationParams?.linearProgress}")
|
|
||||||
it.println("ignoreShadeBlurUntilHidden: $ignoreShadeBlurUntilHidden")
|
it.println("ignoreShadeBlurUntilHidden: $ignoreShadeBlurUntilHidden")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package com.android.systemui.statusbar.notification
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import com.android.internal.jank.InteractionJankMonitor
|
import com.android.internal.jank.InteractionJankMonitor
|
||||||
import com.android.systemui.animation.ActivityLaunchAnimator
|
import com.android.systemui.animation.ActivityLaunchAnimator
|
||||||
import com.android.systemui.statusbar.NotificationShadeDepthController
|
|
||||||
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
|
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
|
||||||
import com.android.systemui.statusbar.notification.stack.NotificationListContainer
|
import com.android.systemui.statusbar.notification.stack.NotificationListContainer
|
||||||
import com.android.systemui.statusbar.phone.HeadsUpManagerPhone
|
import com.android.systemui.statusbar.phone.HeadsUpManagerPhone
|
||||||
@@ -15,7 +14,6 @@ import kotlin.math.max
|
|||||||
class NotificationLaunchAnimatorControllerProvider(
|
class NotificationLaunchAnimatorControllerProvider(
|
||||||
private val notificationShadeWindowViewController: NotificationShadeWindowViewController,
|
private val notificationShadeWindowViewController: NotificationShadeWindowViewController,
|
||||||
private val notificationListContainer: NotificationListContainer,
|
private val notificationListContainer: NotificationListContainer,
|
||||||
private val depthController: NotificationShadeDepthController,
|
|
||||||
private val headsUpManager: HeadsUpManagerPhone
|
private val headsUpManager: HeadsUpManagerPhone
|
||||||
) {
|
) {
|
||||||
fun getAnimatorController(
|
fun getAnimatorController(
|
||||||
@@ -24,7 +22,6 @@ class NotificationLaunchAnimatorControllerProvider(
|
|||||||
return NotificationLaunchAnimatorController(
|
return NotificationLaunchAnimatorController(
|
||||||
notificationShadeWindowViewController,
|
notificationShadeWindowViewController,
|
||||||
notificationListContainer,
|
notificationListContainer,
|
||||||
depthController,
|
|
||||||
notification,
|
notification,
|
||||||
headsUpManager
|
headsUpManager
|
||||||
)
|
)
|
||||||
@@ -39,7 +36,6 @@ class NotificationLaunchAnimatorControllerProvider(
|
|||||||
class NotificationLaunchAnimatorController(
|
class NotificationLaunchAnimatorController(
|
||||||
private val notificationShadeWindowViewController: NotificationShadeWindowViewController,
|
private val notificationShadeWindowViewController: NotificationShadeWindowViewController,
|
||||||
private val notificationListContainer: NotificationListContainer,
|
private val notificationListContainer: NotificationListContainer,
|
||||||
private val depthController: NotificationShadeDepthController,
|
|
||||||
private val notification: ExpandableNotificationRow,
|
private val notification: ExpandableNotificationRow,
|
||||||
private val headsUpManager: HeadsUpManagerPhone
|
private val headsUpManager: HeadsUpManagerPhone
|
||||||
) : ActivityLaunchAnimator.Controller {
|
) : ActivityLaunchAnimator.Controller {
|
||||||
@@ -128,7 +124,6 @@ class NotificationLaunchAnimatorController(
|
|||||||
private fun applyParams(params: ExpandAnimationParameters?) {
|
private fun applyParams(params: ExpandAnimationParameters?) {
|
||||||
notification.applyExpandAnimationParams(params)
|
notification.applyExpandAnimationParams(params)
|
||||||
notificationListContainer.applyExpandAnimationParams(params)
|
notificationListContainer.applyExpandAnimationParams(params)
|
||||||
depthController.notificationLaunchAnimationParams = params
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onLaunchAnimationProgress(
|
override fun onLaunchAnimationProgress(
|
||||||
|
|||||||
@@ -1424,7 +1424,6 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|||||||
mNotificationAnimationProvider = new NotificationLaunchAnimatorControllerProvider(
|
mNotificationAnimationProvider = new NotificationLaunchAnimatorControllerProvider(
|
||||||
mNotificationShadeWindowViewController,
|
mNotificationShadeWindowViewController,
|
||||||
mStackScrollerController.getNotificationListContainer(),
|
mStackScrollerController.getNotificationListContainer(),
|
||||||
mNotificationShadeDepthControllerLazy.get(),
|
|
||||||
mHeadsUpManager
|
mHeadsUpManager
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -2122,6 +2121,11 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|||||||
mKeyguardViewMediator.hideWithAnimation(runner);
|
mKeyguardViewMediator.hideWithAnimation(runner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void disableKeyguardBlurs() {
|
||||||
|
mMainThreadHandler.post(mKeyguardViewMediator::disableBlursUntilHidden);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isDeviceInVrMode() {
|
public boolean isDeviceInVrMode() {
|
||||||
return mPresenter.isDeviceInVrMode();
|
return mPresenter.isDeviceInVrMode();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,6 +123,7 @@ class ActivityLaunchAnimatorTest : SysuiTestCase() {
|
|||||||
|
|
||||||
waitForIdleSync()
|
waitForIdleSync()
|
||||||
verify(controller).onIntentStarted(willAnimateCaptor.capture())
|
verify(controller).onIntentStarted(willAnimateCaptor.capture())
|
||||||
|
verify(keyguardHandler).disableKeyguardBlurs()
|
||||||
verify(keyguardHandler).hideKeyguardWithAnimation(any())
|
verify(keyguardHandler).hideKeyguardWithAnimation(any())
|
||||||
|
|
||||||
assertTrue(willAnimateCaptor.value)
|
assertTrue(willAnimateCaptor.value)
|
||||||
@@ -189,6 +190,10 @@ private class TestLaunchAnimatorKeyguardHandler(
|
|||||||
) : ActivityLaunchAnimator.KeyguardHandler {
|
) : ActivityLaunchAnimator.KeyguardHandler {
|
||||||
override fun isOnKeyguard(): Boolean = isOnKeyguard
|
override fun isOnKeyguard(): Boolean = isOnKeyguard
|
||||||
|
|
||||||
|
override fun disableKeyguardBlurs() {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
override fun hideKeyguardWithAnimation(runner: IRemoteAnimationRunner) {
|
override fun hideKeyguardWithAnimation(runner: IRemoteAnimationRunner) {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ import com.android.systemui.broadcast.BroadcastDispatcher;
|
|||||||
import com.android.systemui.classifier.FalsingCollectorFake;
|
import com.android.systemui.classifier.FalsingCollectorFake;
|
||||||
import com.android.systemui.dump.DumpManager;
|
import com.android.systemui.dump.DumpManager;
|
||||||
import com.android.systemui.navigationbar.NavigationModeController;
|
import com.android.systemui.navigationbar.NavigationModeController;
|
||||||
|
import com.android.systemui.statusbar.NotificationShadeDepthController;
|
||||||
import com.android.systemui.statusbar.SysuiStatusBarStateController;
|
import com.android.systemui.statusbar.SysuiStatusBarStateController;
|
||||||
import com.android.systemui.statusbar.phone.DozeParameters;
|
import com.android.systemui.statusbar.phone.DozeParameters;
|
||||||
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
|
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
|
||||||
@@ -82,6 +83,7 @@ public class KeyguardViewMediatorTest extends SysuiTestCase {
|
|||||||
private @Mock DozeParameters mDozeParameters;
|
private @Mock DozeParameters mDozeParameters;
|
||||||
private @Mock SysuiStatusBarStateController mStatusBarStateController;
|
private @Mock SysuiStatusBarStateController mStatusBarStateController;
|
||||||
private @Mock KeyguardStateController mKeyguardStateController;
|
private @Mock KeyguardStateController mKeyguardStateController;
|
||||||
|
private @Mock NotificationShadeDepthController mNotificationShadeDepthController;
|
||||||
private @Mock KeyguardUnlockAnimationController mKeyguardUnlockAnimationController;
|
private @Mock KeyguardUnlockAnimationController mKeyguardUnlockAnimationController;
|
||||||
private @Mock UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController;
|
private @Mock UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController;
|
||||||
private DeviceConfigProxy mDeviceConfig = new DeviceConfigProxyFake();
|
private DeviceConfigProxy mDeviceConfig = new DeviceConfigProxyFake();
|
||||||
@@ -104,7 +106,7 @@ public class KeyguardViewMediatorTest extends SysuiTestCase {
|
|||||||
mPowerManager, mTrustManager, mDeviceConfig, mNavigationModeController,
|
mPowerManager, mTrustManager, mDeviceConfig, mNavigationModeController,
|
||||||
mKeyguardDisplayManager, mDozeParameters, mStatusBarStateController,
|
mKeyguardDisplayManager, mDozeParameters, mStatusBarStateController,
|
||||||
mKeyguardStateController, () -> mKeyguardUnlockAnimationController,
|
mKeyguardStateController, () -> mKeyguardUnlockAnimationController,
|
||||||
mUnlockedScreenOffAnimationController);
|
mUnlockedScreenOffAnimationController, () -> mNotificationShadeDepthController);
|
||||||
mViewMediator.start();
|
mViewMediator.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ import androidx.test.filters.SmallTest
|
|||||||
import com.android.systemui.SysuiTestCase
|
import com.android.systemui.SysuiTestCase
|
||||||
import com.android.systemui.dump.DumpManager
|
import com.android.systemui.dump.DumpManager
|
||||||
import com.android.systemui.plugins.statusbar.StatusBarStateController
|
import com.android.systemui.plugins.statusbar.StatusBarStateController
|
||||||
import com.android.systemui.statusbar.notification.ExpandAnimationParameters
|
|
||||||
import com.android.systemui.statusbar.phone.BiometricUnlockController
|
import com.android.systemui.statusbar.phone.BiometricUnlockController
|
||||||
import com.android.systemui.statusbar.phone.DozeParameters
|
import com.android.systemui.statusbar.phone.DozeParameters
|
||||||
import com.android.systemui.statusbar.phone.ScrimController
|
import com.android.systemui.statusbar.phone.ScrimController
|
||||||
@@ -237,12 +236,10 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun updateBlurCallback_appLaunchAnimation_overridesZoom() {
|
fun updateBlurCallback_ignoreShadeBlurUntilHidden_overridesZoom() {
|
||||||
`when`(shadeSpring.radius).thenReturn(maxBlur)
|
`when`(shadeSpring.radius).thenReturn(maxBlur)
|
||||||
`when`(shadeAnimation.radius).thenReturn(maxBlur)
|
`when`(shadeAnimation.radius).thenReturn(maxBlur)
|
||||||
val animProgress = ExpandAnimationParameters()
|
notificationShadeDepthController.ignoreShadeBlurUntilHidden = true
|
||||||
animProgress.linearProgress = 1f
|
|
||||||
notificationShadeDepthController.notificationLaunchAnimationParams = animProgress
|
|
||||||
notificationShadeDepthController.updateBlurCallback.doFrame(0)
|
notificationShadeDepthController.updateBlurCallback.doFrame(0)
|
||||||
verify(blurUtils).applyBlur(any(), eq(0), eq(false))
|
verify(blurUtils).applyBlur(any(), eq(0), eq(false))
|
||||||
}
|
}
|
||||||
@@ -263,21 +260,17 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun setNotificationLaunchAnimationParams_schedulesFrame() {
|
fun ignoreShadeBlurUntilHidden_schedulesFrame() {
|
||||||
val animProgress = ExpandAnimationParameters()
|
notificationShadeDepthController.ignoreShadeBlurUntilHidden = true
|
||||||
animProgress.linearProgress = 0.5f
|
|
||||||
notificationShadeDepthController.notificationLaunchAnimationParams = animProgress
|
|
||||||
verify(choreographer).postFrameCallback(
|
verify(choreographer).postFrameCallback(
|
||||||
eq(notificationShadeDepthController.updateBlurCallback))
|
eq(notificationShadeDepthController.updateBlurCallback))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun setNotificationLaunchAnimationParams_whennNull_ignoresIfShadeHasNoBlur() {
|
fun ignoreShadeBlurUntilHidden_whennNull_ignoresIfShadeHasNoBlur() {
|
||||||
val animProgress = ExpandAnimationParameters()
|
|
||||||
animProgress.linearProgress = 0.5f
|
|
||||||
`when`(shadeSpring.radius).thenReturn(0)
|
`when`(shadeSpring.radius).thenReturn(0)
|
||||||
`when`(shadeAnimation.radius).thenReturn(0)
|
`when`(shadeAnimation.radius).thenReturn(0)
|
||||||
notificationShadeDepthController.notificationLaunchAnimationParams = animProgress
|
notificationShadeDepthController.ignoreShadeBlurUntilHidden = true
|
||||||
verify(shadeSpring, never()).animateTo(anyInt(), any())
|
verify(shadeSpring, never()).animateTo(anyInt(), any())
|
||||||
verify(shadeAnimation, never()).animateTo(anyInt(), any())
|
verify(shadeAnimation, never()).animateTo(anyInt(), any())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ import com.android.systemui.statusbar.NotificationClickNotifier;
|
|||||||
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
|
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
|
||||||
import com.android.systemui.statusbar.NotificationPresenter;
|
import com.android.systemui.statusbar.NotificationPresenter;
|
||||||
import com.android.systemui.statusbar.NotificationRemoteInputManager;
|
import com.android.systemui.statusbar.NotificationRemoteInputManager;
|
||||||
import com.android.systemui.statusbar.NotificationShadeDepthController;
|
|
||||||
import com.android.systemui.statusbar.RemoteInputController;
|
import com.android.systemui.statusbar.RemoteInputController;
|
||||||
import com.android.systemui.statusbar.StatusBarState;
|
import com.android.systemui.statusbar.StatusBarState;
|
||||||
import com.android.systemui.statusbar.notification.NotificationActivityStarter;
|
import com.android.systemui.statusbar.notification.NotificationActivityStarter;
|
||||||
@@ -191,7 +190,6 @@ public class StatusBarNotificationActivityStarterTest extends SysuiTestCase {
|
|||||||
new NotificationLaunchAnimatorControllerProvider(
|
new NotificationLaunchAnimatorControllerProvider(
|
||||||
mock(NotificationShadeWindowViewController.class), mock(
|
mock(NotificationShadeWindowViewController.class), mock(
|
||||||
NotificationListContainer.class),
|
NotificationListContainer.class),
|
||||||
mock(NotificationShadeDepthController.class),
|
|
||||||
headsUpManager);
|
headsUpManager);
|
||||||
|
|
||||||
mNotificationActivityStarter =
|
mNotificationActivityStarter =
|
||||||
|
|||||||
Reference in New Issue
Block a user