Merge "Clean up excessive ShadeLogger output" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6a8551c397
@@ -4813,7 +4813,9 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
|
|||||||
|
|
||||||
if (!mHeadsUpTouchHelper.isTrackingHeadsUp() && mQsController.handleTouch(
|
if (!mHeadsUpTouchHelper.isTrackingHeadsUp() && mQsController.handleTouch(
|
||||||
event, isFullyCollapsed(), isShadeOrQsHeightAnimationRunning())) {
|
event, isFullyCollapsed(), isShadeOrQsHeightAnimationRunning())) {
|
||||||
mShadeLog.logMotionEvent(event, "onTouch: handleQsTouch handled event");
|
if (event.getActionMasked() != MotionEvent.ACTION_MOVE) {
|
||||||
|
mShadeLog.logMotionEvent(event, "onTouch: handleQsTouch handled event");
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (event.getActionMasked() == MotionEvent.ACTION_DOWN && isFullyCollapsed()) {
|
if (event.getActionMasked() == MotionEvent.ACTION_DOWN && isFullyCollapsed()) {
|
||||||
@@ -4827,7 +4829,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
|
|||||||
}
|
}
|
||||||
|
|
||||||
handled |= handleTouch(event);
|
handled |= handleTouch(event);
|
||||||
mShadeLog.logOnTouchEventLastReturn(event, !mDozing, handled);
|
|
||||||
return !mDozing || handled;
|
return !mDozing || handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5010,7 +5011,6 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
mShadeLog.logHandleTouchLastReturn(event, !mGestureWaitForTouchSlop, mTracking);
|
|
||||||
return !mGestureWaitForTouchSlop || mTracking;
|
return !mGestureWaitForTouchSlop || mTracking;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1186,7 +1186,6 @@ public class QuickSettingsController implements Dumpable {
|
|||||||
mClippingAnimationEndBounds.left, fraction);
|
mClippingAnimationEndBounds.left, fraction);
|
||||||
int animTop = (int) MathUtils.lerp(startTop,
|
int animTop = (int) MathUtils.lerp(startTop,
|
||||||
mClippingAnimationEndBounds.top, fraction);
|
mClippingAnimationEndBounds.top, fraction);
|
||||||
logClippingTopBound("interpolated top bound", top);
|
|
||||||
int animRight = (int) MathUtils.lerp(startRight,
|
int animRight = (int) MathUtils.lerp(startRight,
|
||||||
mClippingAnimationEndBounds.right, fraction);
|
mClippingAnimationEndBounds.right, fraction);
|
||||||
int animBottom = (int) MathUtils.lerp(startBottom,
|
int animBottom = (int) MathUtils.lerp(startBottom,
|
||||||
@@ -1337,8 +1336,6 @@ public class QuickSettingsController implements Dumpable {
|
|||||||
// the screen without clipping.
|
// the screen without clipping.
|
||||||
return -mAmbientState.getStackTopMargin();
|
return -mAmbientState.getStackTopMargin();
|
||||||
} else {
|
} else {
|
||||||
logNotificationsClippingTopBound(qsTop,
|
|
||||||
mNotificationStackScrollLayoutController.getTop());
|
|
||||||
return qsTop - mNotificationStackScrollLayoutController.getTop();
|
return qsTop - mNotificationStackScrollLayoutController.getTop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1380,25 +1377,21 @@ public class QuickSettingsController implements Dumpable {
|
|||||||
keyguardNotificationStaticPadding, maxQsPadding) : maxQsPadding;
|
keyguardNotificationStaticPadding, maxQsPadding) : maxQsPadding;
|
||||||
topPadding = (int) MathUtils.lerp((float) getMinExpansionHeight(),
|
topPadding = (int) MathUtils.lerp((float) getMinExpansionHeight(),
|
||||||
(float) max, expandedFraction);
|
(float) max, expandedFraction);
|
||||||
logNotificationsTopPadding("keyguard and expandImmediate", topPadding);
|
|
||||||
return topPadding;
|
return topPadding;
|
||||||
} else if (isSizeChangeAnimationRunning()) {
|
} else if (isSizeChangeAnimationRunning()) {
|
||||||
topPadding = Math.max((int) mSizeChangeAnimator.getAnimatedValue(),
|
topPadding = Math.max((int) mSizeChangeAnimator.getAnimatedValue(),
|
||||||
keyguardNotificationStaticPadding);
|
keyguardNotificationStaticPadding);
|
||||||
logNotificationsTopPadding("size change animation running", topPadding);
|
|
||||||
return topPadding;
|
return topPadding;
|
||||||
} else if (keyguardShowing) {
|
} else if (keyguardShowing) {
|
||||||
// We can only do the smoother transition on Keyguard when we also are not collapsing
|
// We can only do the smoother transition on Keyguard when we also are not collapsing
|
||||||
// from a scrolled quick settings.
|
// from a scrolled quick settings.
|
||||||
topPadding = MathUtils.lerp((float) keyguardNotificationStaticPadding,
|
topPadding = MathUtils.lerp((float) keyguardNotificationStaticPadding,
|
||||||
(float) (getMaxExpansionHeight()), computeExpansionFraction());
|
(float) (getMaxExpansionHeight()), computeExpansionFraction());
|
||||||
logNotificationsTopPadding("keyguard", topPadding);
|
|
||||||
return topPadding;
|
return topPadding;
|
||||||
} else {
|
} else {
|
||||||
topPadding = Math.max(mQsFrameTranslateController.getNotificationsTopPadding(
|
topPadding = Math.max(mQsFrameTranslateController.getNotificationsTopPadding(
|
||||||
mExpansionHeight, mNotificationStackScrollLayoutController),
|
mExpansionHeight, mNotificationStackScrollLayoutController),
|
||||||
mQuickQsHeaderHeight);
|
mQuickQsHeaderHeight);
|
||||||
logNotificationsTopPadding("default case", topPadding);
|
|
||||||
return topPadding;
|
return topPadding;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1446,38 +1439,6 @@ public class QuickSettingsController implements Dumpable {
|
|||||||
- mAmbientState.getScrollY());
|
- mAmbientState.getScrollY());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** TODO(b/273591201): remove after bug resolved */
|
|
||||||
private void logNotificationsTopPadding(String message, float rawPadding) {
|
|
||||||
int padding = ((int) rawPadding / 10) * 10;
|
|
||||||
if (mBarState != KEYGUARD && padding != mLastNotificationsTopPadding && !mExpanded) {
|
|
||||||
mLastNotificationsTopPadding = padding;
|
|
||||||
mShadeLog.logNotificationsTopPadding(message, padding);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** TODO(b/273591201): remove after bug resolved */
|
|
||||||
private void logClippingTopBound(String message, int top) {
|
|
||||||
top = (top / 10) * 10;
|
|
||||||
if (mBarState != KEYGUARD && mShadeExpandedFraction == 1
|
|
||||||
&& top != mLastClippingTopBound && !mExpanded) {
|
|
||||||
mLastClippingTopBound = top;
|
|
||||||
mShadeLog.logClippingTopBound(message, top);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** TODO(b/273591201): remove after bug resolved */
|
|
||||||
private void logNotificationsClippingTopBound(int top, int nsslTop) {
|
|
||||||
top = (top / 10) * 10;
|
|
||||||
nsslTop = (nsslTop / 10) * 10;
|
|
||||||
if (mBarState == SHADE && mShadeExpandedFraction == 1
|
|
||||||
&& (top != mLastNotificationsClippingTopBound
|
|
||||||
|| nsslTop != mLastNotificationsClippingTopBoundNssl) && !mExpanded) {
|
|
||||||
mLastNotificationsClippingTopBound = top;
|
|
||||||
mLastNotificationsClippingTopBoundNssl = nsslTop;
|
|
||||||
mShadeLog.logNotificationsClippingTopBound(top, nsslTop);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private int calculateTopClippingBound(int qsPanelBottomY) {
|
private int calculateTopClippingBound(int qsPanelBottomY) {
|
||||||
int top;
|
int top;
|
||||||
if (mSplitShadeEnabled) {
|
if (mSplitShadeEnabled) {
|
||||||
@@ -1487,7 +1448,6 @@ public class QuickSettingsController implements Dumpable {
|
|||||||
// If we're transitioning, let's use the actual value. The else case
|
// If we're transitioning, let's use the actual value. The else case
|
||||||
// can be wrong during transitions when waiting for the keyguard to unlock
|
// can be wrong during transitions when waiting for the keyguard to unlock
|
||||||
top = mTransitionToFullShadePosition;
|
top = mTransitionToFullShadePosition;
|
||||||
logClippingTopBound("set while transitioning to full shade", top);
|
|
||||||
} else {
|
} else {
|
||||||
final float notificationTop = getEdgePosition();
|
final float notificationTop = getEdgePosition();
|
||||||
if (mBarState == KEYGUARD) {
|
if (mBarState == KEYGUARD) {
|
||||||
@@ -1496,10 +1456,8 @@ public class QuickSettingsController implements Dumpable {
|
|||||||
// this should go away once we unify the stackY position and don't have
|
// this should go away once we unify the stackY position and don't have
|
||||||
// to do this min anymore below.
|
// to do this min anymore below.
|
||||||
top = qsPanelBottomY;
|
top = qsPanelBottomY;
|
||||||
logClippingTopBound("bypassing keyguard", top);
|
|
||||||
} else {
|
} else {
|
||||||
top = (int) Math.min(qsPanelBottomY, notificationTop);
|
top = (int) Math.min(qsPanelBottomY, notificationTop);
|
||||||
logClippingTopBound("keyguard default case", top);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
top = (int) notificationTop;
|
top = (int) notificationTop;
|
||||||
@@ -1507,14 +1465,12 @@ public class QuickSettingsController implements Dumpable {
|
|||||||
}
|
}
|
||||||
// TODO (b/265193930): remove dependency on NPVC
|
// TODO (b/265193930): remove dependency on NPVC
|
||||||
top += mPanelViewControllerLazy.get().getOverStretchAmount();
|
top += mPanelViewControllerLazy.get().getOverStretchAmount();
|
||||||
logClippingTopBound("including overstretch", top);
|
|
||||||
// Correction for instant expansion caused by HUN pull down/
|
// Correction for instant expansion caused by HUN pull down/
|
||||||
float minFraction = mPanelViewControllerLazy.get().getMinFraction();
|
float minFraction = mPanelViewControllerLazy.get().getMinFraction();
|
||||||
if (minFraction > 0f && minFraction < 1f) {
|
if (minFraction > 0f && minFraction < 1f) {
|
||||||
float realFraction = (mShadeExpandedFraction
|
float realFraction = (mShadeExpandedFraction
|
||||||
- minFraction) / (1f - minFraction);
|
- minFraction) / (1f - minFraction);
|
||||||
top *= MathUtils.saturate(realFraction / minFraction);
|
top *= MathUtils.saturate(realFraction / minFraction);
|
||||||
logClippingTopBound("after adjusted fraction", top);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return top;
|
return top;
|
||||||
@@ -1654,15 +1610,11 @@ public class QuickSettingsController implements Dumpable {
|
|||||||
// as sometimes the qsExpansionFraction can be a tiny value instead of 0 when in QQS.
|
// as sometimes the qsExpansionFraction can be a tiny value instead of 0 when in QQS.
|
||||||
if (!mSplitShadeEnabled && !mLastShadeFlingWasExpanding
|
if (!mSplitShadeEnabled && !mLastShadeFlingWasExpanding
|
||||||
&& computeExpansionFraction() <= 0.01 && mShadeExpandedFraction < 1.0) {
|
&& computeExpansionFraction() <= 0.01 && mShadeExpandedFraction < 1.0) {
|
||||||
mShadeLog.logMotionEvent(event,
|
|
||||||
"handleQsTouch: shade touched while shade collapsing, QS tracking disabled");
|
|
||||||
mTracking = false;
|
mTracking = false;
|
||||||
}
|
}
|
||||||
if (!isExpandImmediate() && mTracking) {
|
if (!isExpandImmediate() && mTracking) {
|
||||||
onTouch(event);
|
onTouch(event);
|
||||||
if (!mConflictingExpansionGesture && !mSplitShadeEnabled) {
|
if (!mConflictingExpansionGesture && !mSplitShadeEnabled) {
|
||||||
mShadeLog.logMotionEvent(event,
|
|
||||||
"handleQsTouch: not immediate expand or conflicting gesture");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1756,7 +1708,6 @@ public class QuickSettingsController implements Dumpable {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MotionEvent.ACTION_MOVE:
|
case MotionEvent.ACTION_MOVE:
|
||||||
mShadeLog.logMotionEvent(event, "onQsTouch: move action, setting QS expansion");
|
|
||||||
setExpansionHeight(h + mInitialHeightOnTouch);
|
setExpansionHeight(h + mInitialHeightOnTouch);
|
||||||
// TODO (b/265193930): remove dependency on NPVC
|
// TODO (b/265193930): remove dependency on NPVC
|
||||||
if (h >= mPanelViewControllerLazy.get().getFalsingThreshold()) {
|
if (h >= mPanelViewControllerLazy.get().getFalsingThreshold()) {
|
||||||
@@ -1844,17 +1795,14 @@ public class QuickSettingsController implements Dumpable {
|
|||||||
final float h = y - mInitialTouchY;
|
final float h = y - mInitialTouchY;
|
||||||
trackMovement(event);
|
trackMovement(event);
|
||||||
if (mTracking) {
|
if (mTracking) {
|
||||||
|
|
||||||
// Already tracking because onOverscrolled was called. We need to update here
|
// Already tracking because onOverscrolled was called. We need to update here
|
||||||
// so we don't stop for a frame until the next touch event gets handled in
|
// so we don't stop for a frame until the next touch event gets handled in
|
||||||
// onTouchEvent.
|
// onTouchEvent.
|
||||||
setExpansionHeight(h + mInitialHeightOnTouch);
|
setExpansionHeight(h + mInitialHeightOnTouch);
|
||||||
trackMovement(event);
|
trackMovement(event);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
|
||||||
mShadeLog.logMotionEvent(event,
|
|
||||||
"onQsIntercept: move ignored because qs tracking disabled");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO (b/265193930): remove dependency on NPVC
|
// TODO (b/265193930): remove dependency on NPVC
|
||||||
float touchSlop = event.getClassification()
|
float touchSlop = event.getClassification()
|
||||||
== MotionEvent.CLASSIFICATION_AMBIGUOUS_GESTURE
|
== MotionEvent.CLASSIFICATION_AMBIGUOUS_GESTURE
|
||||||
@@ -1878,7 +1826,7 @@ public class QuickSettingsController implements Dumpable {
|
|||||||
} else {
|
} else {
|
||||||
mShadeLog.logQsTrackingNotStarted(mInitialTouchY, y, h, touchSlop,
|
mShadeLog.logQsTrackingNotStarted(mInitialTouchY, y, h, touchSlop,
|
||||||
getExpanded(), mPanelViewControllerLazy.get().isKeyguardShowing(),
|
getExpanded(), mPanelViewControllerLazy.get().isKeyguardShowing(),
|
||||||
isExpansionEnabled());
|
isExpansionEnabled(), event.getDownTime());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,8 @@ class ShadeLogger @Inject constructor(@ShadeLog private val buffer: LogBuffer) {
|
|||||||
touchSlop: Float,
|
touchSlop: Float,
|
||||||
qsExpanded: Boolean,
|
qsExpanded: Boolean,
|
||||||
keyguardShowing: Boolean,
|
keyguardShowing: Boolean,
|
||||||
qsExpansionEnabled: Boolean
|
qsExpansionEnabled: Boolean,
|
||||||
|
downTime: Long
|
||||||
) {
|
) {
|
||||||
buffer.log(
|
buffer.log(
|
||||||
TAG,
|
TAG,
|
||||||
@@ -67,10 +68,11 @@ class ShadeLogger @Inject constructor(@ShadeLog private val buffer: LogBuffer) {
|
|||||||
bool1 = qsExpanded
|
bool1 = qsExpanded
|
||||||
bool2 = keyguardShowing
|
bool2 = keyguardShowing
|
||||||
bool3 = qsExpansionEnabled
|
bool3 = qsExpansionEnabled
|
||||||
|
str1 = downTime.toString()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"QsTrackingNotStarted: initTouchY=$int1,y=$int2,h=$long1,slop=$double1,qsExpanded" +
|
"QsTrackingNotStarted: downTime=$str1,initTouchY=$int1,y=$int2,h=$long1," +
|
||||||
"=$bool1,keyguardShowing=$bool2,qsExpansion=$bool3"
|
"slop=$double1,qsExpanded=$bool1,keyguardShowing=$bool2,qsExpansion=$bool3"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -306,91 +308,6 @@ class ShadeLogger @Inject constructor(@ShadeLog private val buffer: LogBuffer) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun logNotificationsTopPadding(message: String, padding: Int) {
|
|
||||||
buffer.log(
|
|
||||||
TAG,
|
|
||||||
LogLevel.VERBOSE,
|
|
||||||
{
|
|
||||||
str1 = message
|
|
||||||
int1 = padding
|
|
||||||
},
|
|
||||||
{ "QSC NotificationsTopPadding $str1: $int1"}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun logClippingTopBound(message: String, top: Int) {
|
|
||||||
buffer.log(
|
|
||||||
TAG,
|
|
||||||
LogLevel.VERBOSE,
|
|
||||||
{
|
|
||||||
str1 = message
|
|
||||||
int1 = top
|
|
||||||
},
|
|
||||||
{ "QSC ClippingTopBound $str1: $int1" }
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun logNotificationsClippingTopBound(top: Int, nsslTop: Int) {
|
|
||||||
buffer.log(
|
|
||||||
TAG,
|
|
||||||
LogLevel.VERBOSE,
|
|
||||||
{
|
|
||||||
int1 = top
|
|
||||||
int2 = nsslTop
|
|
||||||
},
|
|
||||||
{ "QSC NotificationsClippingTopBound set to $int1 - $int2" }
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun logOnTouchEventLastReturn(
|
|
||||||
event: MotionEvent,
|
|
||||||
dozing: Boolean,
|
|
||||||
handled: Boolean,
|
|
||||||
) {
|
|
||||||
buffer.log(
|
|
||||||
TAG,
|
|
||||||
LogLevel.VERBOSE,
|
|
||||||
{
|
|
||||||
bool1 = dozing
|
|
||||||
bool2 = handled
|
|
||||||
long1 = event.eventTime
|
|
||||||
long2 = event.downTime
|
|
||||||
int1 = event.action
|
|
||||||
int2 = event.classification
|
|
||||||
double1 = event.y.toDouble()
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"NPVC onTouchEvent last return: !mDozing: $bool1 || handled: $bool2 " +
|
|
||||||
"\neventTime=$long1,downTime=$long2,y=$double1,action=$int1,class=$int2"
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun logHandleTouchLastReturn(
|
|
||||||
event: MotionEvent,
|
|
||||||
gestureWaitForTouchSlop: Boolean,
|
|
||||||
tracking: Boolean,
|
|
||||||
) {
|
|
||||||
buffer.log(
|
|
||||||
TAG,
|
|
||||||
LogLevel.VERBOSE,
|
|
||||||
{
|
|
||||||
bool1 = gestureWaitForTouchSlop
|
|
||||||
bool2 = tracking
|
|
||||||
long1 = event.eventTime
|
|
||||||
long2 = event.downTime
|
|
||||||
int1 = event.action
|
|
||||||
int2 = event.classification
|
|
||||||
double1 = event.y.toDouble()
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"NPVC handleTouch last return: !mGestureWaitForTouchSlop: $bool1 " +
|
|
||||||
"|| mTracking: $bool2 " +
|
|
||||||
"\neventTime=$long1,downTime=$long2,y=$double1,action=$int1,class=$int2"
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun logUpdateNotificationPanelTouchState(
|
fun logUpdateNotificationPanelTouchState(
|
||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
isGoingToSleep: Boolean,
|
isGoingToSleep: Boolean,
|
||||||
|
|||||||
Reference in New Issue
Block a user