Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationMenuRow.java +20 −9 Original line number Diff line number Diff line Loading @@ -100,6 +100,7 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl private boolean mShouldShowMenu; private NotificationSwipeActionHelper mSwipeHelper; private boolean mIsUserTouching; public NotificationMenuRow(Context context) { mContext = context; Loading Loading @@ -202,8 +203,11 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl } else { mIconsPlaced = false; setMenuLocation(); if (!mIsUserTouching) { // If the # of items showing changed we need to update the snap position showMenu(mParent, mOnLeft ? getSpaceForMenu() : -getSpaceForMenu(), 0 /* velocity */); showMenu(mParent, mOnLeft ? getSpaceForMenu() : -getSpaceForMenu(), 0 /* velocity */); } } } Loading Loading @@ -233,6 +237,7 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl mHandler.removeCallbacks(mCheckForDrag); mCheckForDrag = null; mPrevX = ev.getRawX(); mIsUserTouching = true; break; case MotionEvent.ACTION_MOVE: Loading Loading @@ -265,7 +270,12 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl break; case MotionEvent.ACTION_UP: mIsUserTouching = false; return handleUpEvent(ev, view, velocity); case MotionEvent.ACTION_CANCEL: mIsUserTouching = false; cancelDrag(); return false; } return false; } Loading Loading @@ -354,23 +364,24 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl } private void snapBack(View animView, float velocity) { if (mFadeAnimator != null) { mFadeAnimator.cancel(); } mHandler.removeCallbacks(mCheckForDrag); cancelDrag(); mMenuSnappedTo = false; mSnapping = true; mSwipeHelper.snap(animView, 0 /* leftTarget */, velocity); } private void dismiss(View animView, float velocity) { cancelDrag(); mMenuSnappedTo = false; mDismissing = true; mSwipeHelper.dismiss(animView, velocity); } private void cancelDrag() { if (mFadeAnimator != null) { mFadeAnimator.cancel(); } mHandler.removeCallbacks(mCheckForDrag); mMenuSnappedTo = false; mDismissing = true; mSwipeHelper.dismiss(animView, velocity); } /** Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +2 −1 Original line number Diff line number Diff line Loading @@ -4344,10 +4344,10 @@ public class NotificationStackScrollLayout extends ViewGroup @Override public void onDownUpdate(View currView, MotionEvent ev) { mTranslatingParentView = currView; mCurrMenuRow = null; if (mCurrMenuRow != null) { mCurrMenuRow.onTouchEvent(currView, ev, 0 /* velocity */); } mCurrMenuRow = null; mHandler.removeCallbacks(mFalsingCheck); // Slide back any notifications that might be showing a menu Loading @@ -4358,6 +4358,7 @@ public class NotificationStackScrollLayout extends ViewGroup mCurrMenuRow = row.createMenu(); mCurrMenuRow.setSwipeActionHelper(NotificationSwipeHelper.this); mCurrMenuRow.setMenuClickListener(NotificationStackScrollLayout.this); mCurrMenuRow.onTouchEvent(currView, ev, 0 /* velocity */); } } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationMenuRow.java +20 −9 Original line number Diff line number Diff line Loading @@ -100,6 +100,7 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl private boolean mShouldShowMenu; private NotificationSwipeActionHelper mSwipeHelper; private boolean mIsUserTouching; public NotificationMenuRow(Context context) { mContext = context; Loading Loading @@ -202,8 +203,11 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl } else { mIconsPlaced = false; setMenuLocation(); if (!mIsUserTouching) { // If the # of items showing changed we need to update the snap position showMenu(mParent, mOnLeft ? getSpaceForMenu() : -getSpaceForMenu(), 0 /* velocity */); showMenu(mParent, mOnLeft ? getSpaceForMenu() : -getSpaceForMenu(), 0 /* velocity */); } } } Loading Loading @@ -233,6 +237,7 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl mHandler.removeCallbacks(mCheckForDrag); mCheckForDrag = null; mPrevX = ev.getRawX(); mIsUserTouching = true; break; case MotionEvent.ACTION_MOVE: Loading Loading @@ -265,7 +270,12 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl break; case MotionEvent.ACTION_UP: mIsUserTouching = false; return handleUpEvent(ev, view, velocity); case MotionEvent.ACTION_CANCEL: mIsUserTouching = false; cancelDrag(); return false; } return false; } Loading Loading @@ -354,23 +364,24 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl } private void snapBack(View animView, float velocity) { if (mFadeAnimator != null) { mFadeAnimator.cancel(); } mHandler.removeCallbacks(mCheckForDrag); cancelDrag(); mMenuSnappedTo = false; mSnapping = true; mSwipeHelper.snap(animView, 0 /* leftTarget */, velocity); } private void dismiss(View animView, float velocity) { cancelDrag(); mMenuSnappedTo = false; mDismissing = true; mSwipeHelper.dismiss(animView, velocity); } private void cancelDrag() { if (mFadeAnimator != null) { mFadeAnimator.cancel(); } mHandler.removeCallbacks(mCheckForDrag); mMenuSnappedTo = false; mDismissing = true; mSwipeHelper.dismiss(animView, velocity); } /** Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +2 −1 Original line number Diff line number Diff line Loading @@ -4344,10 +4344,10 @@ public class NotificationStackScrollLayout extends ViewGroup @Override public void onDownUpdate(View currView, MotionEvent ev) { mTranslatingParentView = currView; mCurrMenuRow = null; if (mCurrMenuRow != null) { mCurrMenuRow.onTouchEvent(currView, ev, 0 /* velocity */); } mCurrMenuRow = null; mHandler.removeCallbacks(mFalsingCheck); // Slide back any notifications that might be showing a menu Loading @@ -4358,6 +4358,7 @@ public class NotificationStackScrollLayout extends ViewGroup mCurrMenuRow = row.createMenu(); mCurrMenuRow.setSwipeActionHelper(NotificationSwipeHelper.this); mCurrMenuRow.setMenuClickListener(NotificationStackScrollLayout.this); mCurrMenuRow.onTouchEvent(currView, ev, 0 /* velocity */); } } Loading