Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Dil3mm4/f1ddf9eafb868bc8cb08c0fd512379f1 to your computer and use it in GitHub Desktop.
Save Dil3mm4/f1ddf9eafb868bc8cb08c0fd512379f1 to your computer and use it in GitHub Desktop.
From 4431109ef29f90c4d2f3b60b969a5a694ab14c2e Mon Sep 17 00:00:00 2001
From: Dil3mm4 <dil3mm4.dev@gmail.com>
Date: Tue, 29 Dec 2020 01:26:07 +0000
Subject: [PATCH] NotificationShadeDepthController: updateShadeBlur if keyguard
is going away
Test:
- from a secured lockscreen expand a notification to trigger qs panel expansion, observe blur correct spawn
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt
index 294813c8e65..82e69bfe593 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt
@@ -377,7 +377,7 @@ class NotificationShadeDepthController @Inject constructor(
private fun updateShadeBlur() {
var newBlur = 0
- if (isOnKeyguardNotDismissing()) {
+ if (isOnKeyguardNotDismissing() || isOnKeyguardDismissingAndSecure()) {
newBlur = blurUtils.blurRadiusOfRatio(shadeExpansion)
}
shadeSpring.animateTo(newBlur)
@@ -398,6 +398,10 @@ class NotificationShadeDepthController @Inject constructor(
!keyguardStateController.isKeyguardFadingAway
}
+ private fun isOnKeyguardDismissingAndSecure() : Boolean {
+ return keyguardStateController.isKeyguardFadingAway && keyguardStateController.isMethodSecure()
+ }
+
fun updateGlobalDialogVisibility(visibility: Float, dialogView: View?) {
globalActionsSpring.animateTo(blurUtils.blurRadiusOfRatio(visibility), dialogView)
}
--
2.20.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment