summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorSelim Cinek <cinek@google.com>2015-05-05 23:54:21 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-05 23:54:22 +0000
commit1e139e86843b59839f9eb6f88466d152b7e23c03 (patch)
tree9f9011a89cdbcec964b761508daadf9ef6fc303e /packages
parent1690ec8e72876459da198a7228c6591df321df64 (diff)
parent173f2d0fad8dc889beefff67be96ec865465d1e0 (diff)
downloadframeworks_base-1e139e86843b59839f9eb6f88466d152b7e23c03.zip
frameworks_base-1e139e86843b59839f9eb6f88466d152b7e23c03.tar.gz
frameworks_base-1e139e86843b59839f9eb6f88466d152b7e23c03.tar.bz2
Merge "Enforcing the touchslop now when flinging open before intercepting" into mnc-dev
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
index 85f312c..38812ce 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -46,6 +46,7 @@ import java.io.PrintWriter;
public abstract class PanelView extends FrameLayout {
public static final boolean DEBUG = PanelBar.DEBUG;
public static final String TAG = PanelView.class.getSimpleName();
+
private final void logf(String fmt, Object... args) {
Log.v(TAG, (mViewName != null ? (mViewName + ": ") : "") + String.format(fmt, args));
}
@@ -77,6 +78,7 @@ public abstract class PanelView extends FrameLayout {
private boolean mTouchStartedInEmptyArea;
private boolean mMotionAborted;
private boolean mUpwardsWhenTresholdReached;
+ private boolean mAnimatingOnDown;
private ValueAnimator mHeightAnimator;
private ObjectAnimator mPeekAnimator;
@@ -459,8 +461,8 @@ public abstract class PanelView extends FrameLayout {
switch (event.getActionMasked()) {
case MotionEvent.ACTION_DOWN:
mStatusBar.userActivity();
- if (mHeightAnimator != null && !mHintAnimationRunning ||
- mPeekPending || mPeekAnimator != null) {
+ mAnimatingOnDown = mHeightAnimator != null;
+ if (mAnimatingOnDown && mClosing && !mHintAnimationRunning || mPeekPending || mPeekAnimator != null) {
cancelHeightAnimator();
cancelPeek();
mTouchSlopExceeded = true;
@@ -501,8 +503,10 @@ public abstract class PanelView extends FrameLayout {
case MotionEvent.ACTION_MOVE:
final float h = y - mInitialTouchY;
trackMovement(event);
- if (scrolledToBottom || mTouchStartedInEmptyArea) {
- if (h < -mTouchSlop && h < -Math.abs(x - mInitialTouchX)) {
+ if (scrolledToBottom || mTouchStartedInEmptyArea || mAnimatingOnDown) {
+ float hAbs = Math.abs(h);
+ if ((h < -mTouchSlop || (mAnimatingOnDown && hAbs > mTouchSlop))
+ && hAbs > Math.abs(x - mInitialTouchX)) {
cancelHeightAnimator();
startExpandMotion(x, y, true /* startTracking */, mExpandedHeight);
return true;