Merge "Add additional logging for b/227115380" into tm-qpr-dev
This commit is contained in:
@@ -2164,7 +2164,8 @@ public final class NotificationPanelViewController {
|
|||||||
mShadeLog.logMotionEvent(event,
|
mShadeLog.logMotionEvent(event,
|
||||||
"onQsIntercept: move ignored because qs tracking disabled");
|
"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)
|
&& Math.abs(h) > Math.abs(x - mInitialTouchX)
|
||||||
&& shouldQuickSettingsIntercept(mInitialTouchX, mInitialTouchY, h)) {
|
&& shouldQuickSettingsIntercept(mInitialTouchX, mInitialTouchY, h)) {
|
||||||
if (DEBUG_LOGCAT) Log.d(TAG, "onQsIntercept - start tracking expansion");
|
if (DEBUG_LOGCAT) Log.d(TAG, "onQsIntercept - start tracking expansion");
|
||||||
@@ -2179,6 +2180,9 @@ public final class NotificationPanelViewController {
|
|||||||
mInitialTouchX = x;
|
mInitialTouchX = x;
|
||||||
mNotificationStackScrollLayoutController.cancelLongPress();
|
mNotificationStackScrollLayoutController.cancelLongPress();
|
||||||
return true;
|
return true;
|
||||||
|
} else {
|
||||||
|
mShadeLog.logQsTrackingNotStarted(mInitialTouchY, y, h, touchSlop, mQsExpanded,
|
||||||
|
mCollapsedOnDown, mKeyguardShowing, isQsExpansionEnabled());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -11,10 +11,7 @@ import javax.inject.Inject
|
|||||||
private const val TAG = "systemui.shade"
|
private const val TAG = "systemui.shade"
|
||||||
|
|
||||||
/** Lightweight logging utility for the Shade. */
|
/** Lightweight logging utility for the Shade. */
|
||||||
class ShadeLogger @Inject constructor(
|
class ShadeLogger @Inject constructor(@ShadeLog private val buffer: LogBuffer) {
|
||||||
@ShadeLog
|
|
||||||
private val buffer: LogBuffer
|
|
||||||
) {
|
|
||||||
fun v(@CompileTimeConstant msg: String) {
|
fun v(@CompileTimeConstant msg: String) {
|
||||||
buffer.log(TAG, LogLevel.VERBOSE, msg)
|
buffer.log(TAG, LogLevel.VERBOSE, msg)
|
||||||
}
|
}
|
||||||
@@ -28,21 +25,51 @@ class ShadeLogger @Inject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun onQsInterceptMoveQsTrackingEnabled(h: Float) {
|
fun onQsInterceptMoveQsTrackingEnabled(h: Float) {
|
||||||
log(LogLevel.VERBOSE,
|
log(
|
||||||
|
LogLevel.VERBOSE,
|
||||||
{ double1 = h.toDouble() },
|
{ double1 = h.toDouble() },
|
||||||
{ "onQsIn[tercept: move action, QS tracking enabled. h = $double1" })
|
{ "onQsIntercept: move action, QS tracking enabled. h = $double1" })
|
||||||
|
}
|
||||||
|
|
||||||
|
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) {
|
fun logMotionEvent(event: MotionEvent, message: String) {
|
||||||
log(LogLevel.VERBOSE, {
|
log(
|
||||||
|
LogLevel.VERBOSE,
|
||||||
|
{
|
||||||
str1 = message
|
str1 = message
|
||||||
long1 = event.eventTime
|
long1 = event.eventTime
|
||||||
long2 = event.downTime
|
long2 = event.downTime
|
||||||
int1 = event.action
|
int1 = event.action
|
||||||
int2 = event.classification
|
int2 = event.classification
|
||||||
double1 = event.y.toDouble()
|
double1 = event.y.toDouble()
|
||||||
}, {
|
},
|
||||||
"$str1\neventTime=$long1,downTime=$long2,y=$double1,action=$int1,classification=$int2"
|
{ "$str1\neventTime=$long1,downTime=$long2,y=$double1,action=$int1,classification=$int2" })
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user