Merge "Add logging for b/280105659" into udc-dev am: 4763e710fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23831186 Change-Id: Iaadb67557536f140dad258efa25da13ed4fe3637 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -3560,6 +3560,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
|
||||
}
|
||||
|
||||
private void endMotionEvent(MotionEvent event, float x, float y, boolean forceCancel) {
|
||||
mShadeLog.logEndMotionEvent("endMotionEvent called", forceCancel, false);
|
||||
mTrackingPointer = -1;
|
||||
mAmbientState.setSwipingUp(false);
|
||||
if ((mTracking && mTouchSlopExceeded) || Math.abs(x - mInitialExpandX) > mTouchSlop
|
||||
@@ -3581,15 +3582,19 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
|
||||
} else if (event.getActionMasked() == MotionEvent.ACTION_CANCEL || forceCancel) {
|
||||
if (onKeyguard) {
|
||||
expand = true;
|
||||
mShadeLog.logEndMotionEvent("endMotionEvent: cancel while on keyguard",
|
||||
forceCancel, expand);
|
||||
} else if (mCentralSurfaces.isBouncerShowingOverDream()) {
|
||||
expand = false;
|
||||
} else {
|
||||
// If we get a cancel, put the shade back to the state it was in when the
|
||||
// gesture started
|
||||
expand = !mPanelClosedOnDown;
|
||||
mShadeLog.logEndMotionEvent("endMotionEvent: cancel", forceCancel, expand);
|
||||
}
|
||||
} else {
|
||||
expand = flingExpands(vel, vectorVel, x, y);
|
||||
mShadeLog.logEndMotionEvent("endMotionEvent: flingExpands", forceCancel, expand);
|
||||
}
|
||||
|
||||
mDozeLog.traceFling(expand, mTouchAboveFalsingThreshold,
|
||||
@@ -4685,6 +4690,8 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
|
||||
mTouchSlopExceeded = mTouchSlopExceededBeforeDown;
|
||||
mMotionAborted = false;
|
||||
mPanelClosedOnDown = isFullyCollapsed();
|
||||
mShadeLog.logPanelClosedOnDown("intercept down touch", mPanelClosedOnDown,
|
||||
mExpandedFraction);
|
||||
mCollapsedAndHeadsUpOnDown = false;
|
||||
mHasLayoutedSinceDown = false;
|
||||
mUpdateFlingOnLayout = false;
|
||||
@@ -4898,6 +4905,8 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
|
||||
startExpandMotion(x, y, false /* startTracking */, mExpandedHeight);
|
||||
mMinExpandHeight = 0.0f;
|
||||
mPanelClosedOnDown = isFullyCollapsed();
|
||||
mShadeLog.logPanelClosedOnDown("handle down touch", mPanelClosedOnDown,
|
||||
mExpandedFraction);
|
||||
mHasLayoutedSinceDown = false;
|
||||
mUpdateFlingOnLayout = false;
|
||||
mMotionAborted = false;
|
||||
|
||||
@@ -90,7 +90,7 @@ class ShadeLogger @Inject constructor(@ShadeLog private val buffer: LogBuffer) {
|
||||
double1 = event.y.toDouble()
|
||||
},
|
||||
{
|
||||
"$str1\neventTime=$long1,downTime=$long2,y=$double1,action=$int1,class=$int2"
|
||||
"$str1: eventTime=$long1,downTime=$long2,y=$double1,action=$int1,class=$int2"
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -280,6 +280,42 @@ class ShadeLogger @Inject constructor(@ShadeLog private val buffer: LogBuffer) {
|
||||
)
|
||||
}
|
||||
|
||||
fun logEndMotionEvent(
|
||||
msg: String,
|
||||
forceCancel: Boolean,
|
||||
expand: Boolean,
|
||||
)
|
||||
{
|
||||
buffer.log(
|
||||
TAG,
|
||||
LogLevel.VERBOSE,
|
||||
{
|
||||
str1 = msg
|
||||
bool1 = forceCancel
|
||||
bool2 = expand
|
||||
},
|
||||
{ "$str1; force=$bool1; expand=$bool2" }
|
||||
)
|
||||
}
|
||||
|
||||
fun logPanelClosedOnDown(
|
||||
msg: String,
|
||||
panelClosedOnDown: Boolean,
|
||||
expandFraction: Float,
|
||||
)
|
||||
{
|
||||
buffer.log(
|
||||
TAG,
|
||||
LogLevel.VERBOSE,
|
||||
{
|
||||
str1 = msg
|
||||
bool1 = panelClosedOnDown
|
||||
double1 = expandFraction.toDouble()
|
||||
},
|
||||
{ "$str1; mPanelClosedOnDown=$bool1; mExpandedFraction=$double1" }
|
||||
)
|
||||
}
|
||||
|
||||
fun flingQs(flingType: Int, isClick: Boolean) {
|
||||
buffer.log(
|
||||
TAG,
|
||||
|
||||
Reference in New Issue
Block a user