am aca1a03b: am dd26d8b2: Fix listening states for two-finger and fast-double swipe

* commit 'aca1a03b6f6c5a923ea91273df61a575de425d9a':
  Fix listening states for two-finger and fast-double swipe
This commit is contained in:
Jorim Jaggi
2014-08-15 11:34:37 +00:00
committed by Android Git Automerger

View File

@@ -602,6 +602,10 @@ public class NotificationPanelView extends PanelView implements
&& event.getY(event.getActionIndex()) < mStatusBarMinHeight) {
mTwoFingerQsExpand = true;
requestPanelHeightUpdate();
// Normally, we start listening when the panel is expanded, but here we need to start
// earlier so the state is already up to date when dragging down.
setListening(true);
}
super.onTouchEvent(event);
return true;
@@ -621,6 +625,11 @@ public class NotificationPanelView extends PanelView implements
mInitialHeightOnTouch = mQsExpansionHeight;
mInitialTouchY = event.getX();
mInitialTouchX = event.getY();
// If we interrupt an expansion gesture here, make sure to update the state correctly.
if (mIsExpanding) {
onExpandingFinished();
}
}
}