Merge "Zoom out the wallpaper as we pull QS" into sc-dev
This commit is contained in:
@@ -107,6 +107,13 @@ class NotificationShadeDepthController @Inject constructor(
|
||||
else 0)
|
||||
}
|
||||
|
||||
var qsPanelExpansion = 0f
|
||||
set(value) {
|
||||
if (field == value) return
|
||||
field = value
|
||||
scheduleUpdate()
|
||||
}
|
||||
|
||||
/**
|
||||
* When launching an app from the shade, the animations progress should affect how blurry the
|
||||
* shade is, overriding the expansion amount.
|
||||
@@ -158,8 +165,9 @@ class NotificationShadeDepthController @Inject constructor(
|
||||
updateScheduled = false
|
||||
val normalizedBlurRadius = MathUtils.constrain(shadeAnimation.radius,
|
||||
blurUtils.minBlurRadius, blurUtils.maxBlurRadius)
|
||||
val combinedBlur = (shadeSpring.radius * INTERACTION_BLUR_FRACTION +
|
||||
var combinedBlur = (shadeSpring.radius * INTERACTION_BLUR_FRACTION +
|
||||
normalizedBlurRadius * ANIMATION_BLUR_FRACTION).toInt()
|
||||
combinedBlur = max(combinedBlur, blurUtils.blurRadiusOfRatio(qsPanelExpansion))
|
||||
var shadeRadius = max(combinedBlur, wakeAndUnlockBlurRadius).toFloat()
|
||||
shadeRadius *= 1f - brightnessMirrorSpring.ratio
|
||||
val launchProgress = notificationLaunchAnimationParams?.linearProgress ?: 0f
|
||||
|
||||
@@ -111,6 +111,7 @@ import com.android.systemui.statusbar.GestureRecorder;
|
||||
import com.android.systemui.statusbar.KeyguardAffordanceView;
|
||||
import com.android.systemui.statusbar.KeyguardIndicationController;
|
||||
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
|
||||
import com.android.systemui.statusbar.NotificationShadeDepthController;
|
||||
import com.android.systemui.statusbar.NotificationShelfController;
|
||||
import com.android.systemui.statusbar.PulseExpansionHandler;
|
||||
import com.android.systemui.statusbar.RemoteInputController;
|
||||
@@ -481,6 +482,7 @@ public class NotificationPanelViewController extends PanelViewController {
|
||||
private final UserManager mUserManager;
|
||||
private final ShadeController mShadeController;
|
||||
private final MediaDataManager mMediaDataManager;
|
||||
private NotificationShadeDepthController mDepthController;
|
||||
private int mDisplayId;
|
||||
|
||||
/**
|
||||
@@ -580,6 +582,7 @@ public class NotificationPanelViewController extends PanelViewController {
|
||||
ScrimController scrimController,
|
||||
UserManager userManager,
|
||||
MediaDataManager mediaDataManager,
|
||||
NotificationShadeDepthController notificationShadeDepthController,
|
||||
AmbientState ambientState,
|
||||
FeatureFlags featureFlags) {
|
||||
super(view, falsingManager, dozeLog, keyguardStateController,
|
||||
@@ -598,6 +601,7 @@ public class NotificationPanelViewController extends PanelViewController {
|
||||
mNotificationIconAreaController = notificationIconAreaController;
|
||||
mKeyguardStatusViewComponentFactory = keyguardStatusViewComponentFactory;
|
||||
mKeyguardStatusBarViewComponentFactory = keyguardStatusBarViewComponentFactory;
|
||||
mDepthController = notificationShadeDepthController;
|
||||
mFeatureFlags = featureFlags;
|
||||
mKeyguardQsUserSwitchComponentFactory = keyguardQsUserSwitchComponentFactory;
|
||||
mKeyguardUserSwitcherComponentFactory = keyguardUserSwitcherComponentFactory;
|
||||
@@ -1997,6 +2001,7 @@ public class NotificationPanelViewController extends PanelViewController {
|
||||
mMediaHierarchyManager.setQsExpansion(qsExpansionFraction);
|
||||
mScrimController.setQsExpansion(qsExpansionFraction);
|
||||
mNotificationStackScrollLayoutController.setQsExpansionFraction(qsExpansionFraction);
|
||||
mDepthController.setQsPanelExpansion(qsExpansionFraction);
|
||||
}
|
||||
|
||||
private String determineAccessibilityPaneTitle() {
|
||||
|
||||
@@ -173,6 +173,13 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() {
|
||||
verify(shadeAnimation).animateTo(eq(0), any())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun setQsPanelExpansion_appliesBlur() {
|
||||
notificationShadeDepthController.qsPanelExpansion = 1f
|
||||
notificationShadeDepthController.updateBlurCallback.doFrame(0)
|
||||
verify(blurUtils).applyBlur(any(), eq(maxBlur))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun updateGlobalDialogVisibility_animatesBlur() {
|
||||
notificationShadeDepthController.updateGlobalDialogVisibility(0.5f, root)
|
||||
|
||||
@@ -82,6 +82,7 @@ import com.android.systemui.statusbar.CommandQueue;
|
||||
import com.android.systemui.statusbar.FeatureFlags;
|
||||
import com.android.systemui.statusbar.KeyguardAffordanceView;
|
||||
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
|
||||
import com.android.systemui.statusbar.NotificationShadeDepthController;
|
||||
import com.android.systemui.statusbar.NotificationShelfController;
|
||||
import com.android.systemui.statusbar.PulseExpansionHandler;
|
||||
import com.android.systemui.statusbar.StatusBarStateControllerImpl;
|
||||
@@ -219,6 +220,8 @@ public class NotificationPanelViewTest extends SysuiTestCase {
|
||||
@Mock
|
||||
private NotificationStackScrollLayoutController mNotificationStackScrollLayoutController;
|
||||
@Mock
|
||||
private NotificationShadeDepthController mNotificationShadeDepthController;
|
||||
@Mock
|
||||
private AuthController mAuthController;
|
||||
@Mock
|
||||
private ScrimController mScrimController;
|
||||
@@ -333,6 +336,7 @@ public class NotificationPanelViewTest extends SysuiTestCase {
|
||||
mScrimController,
|
||||
mUserManager,
|
||||
mMediaDataManager,
|
||||
mNotificationShadeDepthController,
|
||||
mAmbientState,
|
||||
mFeatureFlags);
|
||||
mNotificationPanelViewController.initDependencies(
|
||||
|
||||
Reference in New Issue
Block a user