From 7a1d461d334701bcf000a762274bee1b1d9fd700 Mon Sep 17 00:00:00 2001 From: Shawn Lee Date: Tue, 9 May 2023 18:05:24 -0700 Subject: [PATCH] Adding logging for shade fling expansion direction Bug: 281520937 Test: N/A Change-Id: I32301ddd1a2f800ae147b08c3576792a16ee38f5 --- .../NotificationPanelViewController.java | 3 +++ .../com/android/systemui/shade/ShadeLogger.kt | 25 +++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java index af12bc2ca9f8f..fc51229f1d6a6 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java @@ -2109,6 +2109,9 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump ? QUICK_SETTINGS : ( mKeyguardStateController.canDismissLockScreen() ? UNLOCK : BOUNCER_UNLOCK); if (!isFalseTouch(x, y, interactionType)) { + mShadeLog.logFlingExpands(vel, vectorVel, interactionType, + this.mFlingAnimationUtils.getMinVelocityPxPerSecond(), + mExpandedFraction > 0.5f, mAllowExpandForSmallExpansion); if (Math.abs(vectorVel) < this.mFlingAnimationUtils.getMinVelocityPxPerSecond()) { expands = shouldExpandWhenNotFlinging(); } else { diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeLogger.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeLogger.kt index 25073c1b64db8..2b772e372f777 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/ShadeLogger.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeLogger.kt @@ -253,6 +253,31 @@ class ShadeLogger @Inject constructor(@ShadeLog private val buffer: LogBuffer) { ) } + fun logFlingExpands( + vel: Float, + vectorVel: Float, + interactionType: Int, + minVelocityPxPerSecond: Float, + expansionOverHalf: Boolean, + allowExpandForSmallExpansion: Boolean + ) { + buffer.log( + TAG, + LogLevel.VERBOSE, + { + int1 = interactionType + long1 = vel.toLong() + long2 = vectorVel.toLong() + double1 = minVelocityPxPerSecond.toDouble() + bool1 = expansionOverHalf + bool2 = allowExpandForSmallExpansion + }, + { "NPVC flingExpands called with vel: $long1, vectorVel: $long2, " + + "interactionType: $int1, minVelocityPxPerSecond: $double1 " + + "expansionOverHalf: $bool1, allowExpandForSmallExpansion: $bool2" } + ) + } + fun flingQs(flingType: Int, isClick: Boolean) { buffer.log( TAG,