Merge "Revert "Remove zoom from wake-up transition"" into sc-dev
This commit is contained in:
@@ -89,6 +89,9 @@ class NotificationShadeDepthController @Inject constructor(
|
|||||||
private var prevShadeDirection = 0
|
private var prevShadeDirection = 0
|
||||||
private var prevShadeVelocity = 0f
|
private var prevShadeVelocity = 0f
|
||||||
|
|
||||||
|
// Only for dumpsys
|
||||||
|
private var lastAppliedBlur = 0
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
var shadeSpring = DepthAnimation()
|
var shadeSpring = DepthAnimation()
|
||||||
var shadeAnimation = DepthAnimation()
|
var shadeAnimation = DepthAnimation()
|
||||||
@@ -201,6 +204,7 @@ class NotificationShadeDepthController @Inject constructor(
|
|||||||
val opaque = scrimsVisible && !blursDisabledForAppLaunch
|
val opaque = scrimsVisible && !blursDisabledForAppLaunch
|
||||||
Trace.traceCounter(Trace.TRACE_TAG_APP, "shade_blur_radius", blur)
|
Trace.traceCounter(Trace.TRACE_TAG_APP, "shade_blur_radius", blur)
|
||||||
blurUtils.applyBlur(blurRoot?.viewRootImpl ?: root.viewRootImpl, blur, opaque)
|
blurUtils.applyBlur(blurRoot?.viewRootImpl ?: root.viewRootImpl, blur, opaque)
|
||||||
|
lastAppliedBlur = blur
|
||||||
try {
|
try {
|
||||||
if (root.isAttachedToWindow && root.windowToken != null) {
|
if (root.isAttachedToWindow && root.windowToken != null) {
|
||||||
wallpaperManager.setWallpaperZoomOut(root.windowToken, zoomOut)
|
wallpaperManager.setWallpaperZoomOut(root.windowToken, zoomOut)
|
||||||
@@ -271,6 +275,11 @@ class NotificationShadeDepthController @Inject constructor(
|
|||||||
brightnessMirrorSpring.finishIfRunning()
|
brightnessMirrorSpring.finishIfRunning()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onDozeAmountChanged(linear: Float, eased: Float) {
|
||||||
|
wakeAndUnlockBlurRadius = blurUtils.blurRadiusOfRatio(eased)
|
||||||
|
scheduleUpdate()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
@@ -428,6 +437,9 @@ class NotificationShadeDepthController @Inject constructor(
|
|||||||
it.println("brightnessMirrorRadius: ${brightnessMirrorSpring.radius}")
|
it.println("brightnessMirrorRadius: ${brightnessMirrorSpring.radius}")
|
||||||
it.println("wakeAndUnlockBlur: $wakeAndUnlockBlurRadius")
|
it.println("wakeAndUnlockBlur: $wakeAndUnlockBlurRadius")
|
||||||
it.println("blursDisabledForAppLaunch: $blursDisabledForAppLaunch")
|
it.println("blursDisabledForAppLaunch: $blursDisabledForAppLaunch")
|
||||||
|
it.println("qsPanelExpansion: $qsPanelExpansion")
|
||||||
|
it.println("transitionToFullShadeProgress: $transitionToFullShadeProgress")
|
||||||
|
it.println("lastAppliedBlur: $lastAppliedBlur")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -195,6 +195,13 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() {
|
|||||||
verify(blurUtils).applyBlur(any(), eq(maxBlur), eq(false))
|
verify(blurUtils).applyBlur(any(), eq(maxBlur), eq(false))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun onDozeAmountChanged_appliesBlur() {
|
||||||
|
statusBarStateListener.onDozeAmountChanged(1f, 1f)
|
||||||
|
notificationShadeDepthController.updateBlurCallback.doFrame(0)
|
||||||
|
verify(blurUtils).applyBlur(any(), eq(maxBlur), eq(false))
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun setFullShadeTransition_appliesBlur_onlyIfSupported() {
|
fun setFullShadeTransition_appliesBlur_onlyIfSupported() {
|
||||||
reset(blurUtils)
|
reset(blurUtils)
|
||||||
|
|||||||
Reference in New Issue
Block a user