Fix RenderEffect getting applied during swipe up to bouncer

Previous condition was true even when we swipe up to the bouncer.

Test: verified manually using traces and logs
Bug: 392209635
Flag: com.android.systemui.bouncer_ui_revamp
Change-Id: If1a1b9182371a53f7fda138891870d41b57f3ae0
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
index 95c8e21..758c611 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
@@ -229,7 +229,7 @@
         ShadeSurface, Dumpable, BrightnessMirrorShowingInteractor {
 
     public static final String TAG = NotificationPanelView.class.getSimpleName();
-    private static final boolean DEBUG_LOGCAT = Compile.IS_DEBUG && Log.isLoggable(TAG, Log.DEBUG);
+    private static final boolean DEBUG_LOGCAT = Compile.IS_DEBUG || Log.isLoggable(TAG, Log.DEBUG);
     private static final boolean DEBUG_DRAWABLE = false;
     /** The parallax amount of the quick settings translation when dragging down the panel. */
     public static final float QS_PARALLAX_AMOUNT = 0.175f;
@@ -988,7 +988,7 @@
 
     private void handleBouncerShowingChanged(Boolean isBouncerShowing) {
         if (!com.android.systemui.Flags.bouncerUiRevamp()) return;
-        if (isBouncerShowing && isExpanded()) {
+        if (isBouncerShowing && mStatusBarStateController.getState() != KEYGUARD) {
             if (mBlurRenderEffect == null) {
                 mBlurRenderEffect = RenderEffect.createBlurEffect(
                         mBlurConfig.getMaxBlurRadiusPx(),
@@ -996,9 +996,12 @@
                         Shader.TileMode.CLAMP);
             }
             debugLog("Applying blur RenderEffect to shade.");
+            Trace.asyncTraceForTrackBegin(Trace.TRACE_TAG_APP, "ShadeBlurRenderEffect", "active",
+                    0);
             mView.setRenderEffect(mBlurRenderEffect);
         } else {
             debugLog("Resetting blur RenderEffect on shade.");
+            Trace.asyncTraceForTrackEnd(Trace.TRACE_TAG_APP, "ShadeBlurRenderEffect", 0);
             mView.setRenderEffect(null);
         }
     }