Ignore ACTION_DOWN events when mTracking is true
This is a partial fix for b/198553252 that lessens the effects and prevents possible side effects but does not address the root cause, which is the fact that these events are ACTION_DOWN instead of ACTION_POINTER_DOWN. The second finger touches do cause the height of the shade to jump, which is not ideal, but it was unanimously preferred over dismissing the shade when I polled the team. Test: manual and atest Bug: 198553252 Change-Id: I8b087bd435622dcc66e98c731cee1558272be515
This commit is contained in:
@@ -6135,6 +6135,11 @@ public final class NotificationPanelViewController implements Dumpable {
|
||||
|
||||
switch (event.getActionMasked()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
if (mTracking) {
|
||||
// TODO(b/247126247) fix underlying issue. Should be ACTION_POINTER_DOWN.
|
||||
mShadeLog.d("Don't intercept down event while already tracking");
|
||||
return false;
|
||||
}
|
||||
mCentralSurfaces.userActivity();
|
||||
mAnimatingOnDown = mHeightAnimator != null && !mIsSpringBackAnimation;
|
||||
mMinExpandHeight = 0.0f;
|
||||
@@ -6222,6 +6227,11 @@ public final class NotificationPanelViewController implements Dumpable {
|
||||
"onTouch: duplicate down event detected... ignoring");
|
||||
return true;
|
||||
}
|
||||
if (mTracking) {
|
||||
// TODO(b/247126247) fix underlying issue. Should be ACTION_POINTER_DOWN.
|
||||
mShadeLog.d("Don't handle down event while already tracking");
|
||||
return true;
|
||||
}
|
||||
mLastTouchDownTime = event.getDownTime();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user