summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Justin Weir <justinweir@google.com> 2022-10-17 17:59:02 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-10-17 17:59:02 +0000
commit5bfca3578a4aa43d87eb87bef21755656fc001bb (patch)
tree9fdb37d6360547f72e6528e9d45e4f6be6e74fe2
parentcf49d6f46f8e07de9ec28bdff8684916f5710bec (diff)
parentb9b3c7e1d961f8332d856ba3f6109006b01dee37 (diff)
Merge "Add additional logging for b/227115380" into tm-qpr-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/ShadeLogger.kt87
2 files changed, 62 insertions, 31 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
index 200579ad17ce..a49b7f03acc6 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
@@ -2164,7 +2164,8 @@ public final class NotificationPanelViewController {
mShadeLog.logMotionEvent(event,
"onQsIntercept: move ignored because qs tracking disabled");
}
- if ((h > getTouchSlop(event) || (h < -getTouchSlop(event) && mQsExpanded))
+ float touchSlop = getTouchSlop(event);
+ if ((h > touchSlop || (h < -touchSlop && mQsExpanded))
&& Math.abs(h) > Math.abs(x - mInitialTouchX)
&& shouldQuickSettingsIntercept(mInitialTouchX, mInitialTouchY, h)) {
if (DEBUG_LOGCAT) Log.d(TAG, "onQsIntercept - start tracking expansion");
@@ -2179,6 +2180,9 @@ public final class NotificationPanelViewController {
mInitialTouchX = x;
mNotificationStackScrollLayoutController.cancelLongPress();
return true;
+ } else {
+ mShadeLog.logQsTrackingNotStarted(mInitialTouchY, y, h, touchSlop, mQsExpanded,
+ mCollapsedOnDown, mKeyguardShowing, isQsExpansionEnabled());
}
break;
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeLogger.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeLogger.kt
index f1e44ce5736e..7bee0ba17afc 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeLogger.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeLogger.kt
@@ -11,38 +11,65 @@ import javax.inject.Inject
private const val TAG = "systemui.shade"
/** Lightweight logging utility for the Shade. */
-class ShadeLogger @Inject constructor(
- @ShadeLog
- private val buffer: LogBuffer
-) {
- fun v(@CompileTimeConstant msg: String) {
- buffer.log(TAG, LogLevel.VERBOSE, msg)
- }
+class ShadeLogger @Inject constructor(@ShadeLog private val buffer: LogBuffer) {
+ fun v(@CompileTimeConstant msg: String) {
+ buffer.log(TAG, LogLevel.VERBOSE, msg)
+ }
- private inline fun log(
- logLevel: LogLevel,
- initializer: LogMessage.() -> Unit,
- noinline printer: LogMessage.() -> String
- ) {
- buffer.log(TAG, logLevel, initializer, printer)
- }
+ private inline fun log(
+ logLevel: LogLevel,
+ initializer: LogMessage.() -> Unit,
+ noinline printer: LogMessage.() -> String
+ ) {
+ buffer.log(TAG, logLevel, initializer, printer)
+ }
- fun onQsInterceptMoveQsTrackingEnabled(h: Float) {
- log(LogLevel.VERBOSE,
- { double1 = h.toDouble() },
- { "onQsIn[tercept: move action, QS tracking enabled. h = $double1" })
- }
+ fun onQsInterceptMoveQsTrackingEnabled(h: Float) {
+ log(
+ LogLevel.VERBOSE,
+ { double1 = h.toDouble() },
+ { "onQsIntercept: move action, QS tracking enabled. h = $double1" })
+ }
- fun logMotionEvent(event: MotionEvent, message: String) {
- log(LogLevel.VERBOSE, {
- str1 = message
- long1 = event.eventTime
- long2 = event.downTime
- int1 = event.action
- int2 = event.classification
- double1 = event.y.toDouble()
- }, {
- "$str1\neventTime=$long1,downTime=$long2,y=$double1,action=$int1,classification=$int2"
+ fun logQsTrackingNotStarted(
+ initialTouchY: Float,
+ y: Float,
+ h: Float,
+ touchSlop: Float,
+ qsExpanded: Boolean,
+ collapsedOnDown: Boolean,
+ keyguardShowing: Boolean,
+ qsExpansionEnabled: Boolean
+ ) {
+ log(
+ LogLevel.VERBOSE,
+ {
+ int1 = initialTouchY.toInt()
+ int2 = y.toInt()
+ long1 = h.toLong()
+ double1 = touchSlop.toDouble()
+ bool1 = qsExpanded
+ bool2 = collapsedOnDown
+ bool3 = keyguardShowing
+ bool4 = qsExpansionEnabled
+ },
+ {
+ "QsTrackingNotStarted: initTouchY=$int1,y=$int2,h=$long1,slop=$double1,qsExpanded=" +
+ "$bool1,collapsedDown=$bool2,keyguardShowing=$bool3,qsExpansion=$bool4"
})
- }
+ }
+
+ fun logMotionEvent(event: MotionEvent, message: String) {
+ log(
+ LogLevel.VERBOSE,
+ {
+ str1 = message
+ long1 = event.eventTime
+ long2 = event.downTime
+ int1 = event.action
+ int2 = event.classification
+ double1 = event.y.toDouble()
+ },
+ { "$str1\neventTime=$long1,downTime=$long2,y=$double1,action=$int1,classification=$int2" })
+ }
}