Last active
December 29, 2020 05:37
-
-
Save Dil3mm4/75fa988ef9e5f194581e5f542eb9605c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 1ae8bb10f896dd83b316530a7ef6eedae2fee9f1 Mon Sep 17 00:00:00 2001 | |
From: Dil3mm4 <dil3mm4.dev@gmail.com> | |
Date: Tue, 29 Dec 2020 04:34:44 +0000 | |
Subject: [PATCH] QuickStatusBarHeader: spawn blur if qs has been force | |
expanded | |
Test: | |
On lockscreen, drag statusbar down to show QS, observe blur spawn | |
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java | |
index 9dcec6a8363..54c6012a9b7 100644 | |
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java | |
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java | |
@@ -72,6 +72,7 @@ import com.android.systemui.BatteryMeterView; | |
import com.android.systemui.Dependency; | |
import com.android.systemui.DescendantSystemUIUtils; | |
import com.android.systemui.colorextraction.SysuiColorExtractor; | |
+import com.android.systemui.dump.DumpManager; | |
import com.android.systemui.Dependency; | |
import com.android.systemui.DualToneHandler; | |
import com.android.systemui.GpsTracker; | |
@@ -84,6 +85,7 @@ import com.android.systemui.qs.QSDetail.Callback; | |
import com.android.systemui.qs.QSPanel; | |
import com.android.systemui.settings.BrightnessController; | |
import com.android.systemui.qs.carrier.QSCarrierGroup; | |
+import com.android.systemui.statusbar.BlurUtils; | |
import com.android.systemui.statusbar.CommandQueue; | |
import com.android.systemui.statusbar.phone.StatusBarIconController; | |
import com.android.systemui.statusbar.phone.StatusBarIconController.TintedIconManager; | |
@@ -137,6 +139,7 @@ public class QuickStatusBarHeader extends RelativeLayout implements | |
private final ZenModeController mZenController; | |
private final StatusBarIconController mStatusBarIconController; | |
private final ActivityStarter mActivityStarter; | |
+ private final BlurUtils mBlurUtils; | |
private ScheduledExecutorService mScheduleUpdate; | |
private DeviceProvisionedController mDeviceProvisionedController; | |
@@ -239,6 +242,7 @@ public class QuickStatusBarHeader extends RelativeLayout implements | |
mCommandQueue = commandQueue; | |
mRingerModeTracker = ringerModeTracker; | |
mQuickQsBrightnessExpFrac = BRIGHTNESS_EXP_PORTRAIT; | |
+ mBlurUtils = new BlurUtils(mContext.getResources(), new DumpManager()); | |
} | |
@Override | |
@@ -690,8 +694,11 @@ public class QuickStatusBarHeader extends RelativeLayout implements | |
mQuickQsBrightness.setTranslationY(expansionFraction * mQuickQsBrightnessExpFrac); | |
mEdit.setAlpha(expansionFraction); | |
- | |
if (forceExpanded) { | |
+ if (mBlurUtils.supportsBlursOnWindows()) { | |
+ mBlurUtils.applyBlur(getViewRootImpl(), | |
+ mBlurUtils.blurRadiusOfRatio(expansionFraction)); | |
+ } | |
// If the keyguard is showing, we want to offset the text so that it comes in at the | |
// same time as the panel as it slides down. | |
//mHeaderTextContainerView.setTranslationY(panelTranslationY); | |
-- | |
2.20.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment