commit | 5158d82340b6e222da1b9254c5b9667c600e002e | [log] [tgz] |
---|---|---|
author | Selim Cinek <cinek@google.com> | Wed Jun 04 13:20:41 2014 +0200 |
committer | Selim Cinek <cinek@google.com> | Wed Jun 04 17:22:53 2014 +0200 |
tree | 9aa4dba22bf86cb3b674ed2581b6e9b699c1ed87 | |
parent | 56109b0c9bfe6c1e416763fbe5c8affa367c84fd [diff] |
Disabled touch interaction when in Quick settings. Bug: 15308429 Change-Id: I7379b7e3d7145033ff733cef9a336e41793ab103
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java index e30117f..b8a46c4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -564,6 +564,7 @@ ? View.INVISIBLE : View.VISIBLE); mScrollView.setTouchEnabled(mQsExpanded); + mNotificationStackScroller.setTouchEnabled(!mQsExpanded); } private void setQsExpansion(float height) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java index 4e9a3a4..c29f105 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -162,7 +162,7 @@ * animating. */ private boolean mOnlyScrollingInThisMotion; - + private boolean mTouchEnabled = true; private ViewTreeObserver.OnPreDrawListener mChildrenUpdater = new ViewTreeObserver.OnPreDrawListener() { @Override @@ -1811,6 +1811,18 @@ return mTopPadding + getTranslationY(); } + public void setTouchEnabled(boolean touchEnabled) { + mTouchEnabled = touchEnabled; + } + + @Override + public boolean dispatchTouchEvent(MotionEvent ev) { + if (!mTouchEnabled) { + return false; + } + return super.dispatchTouchEvent(ev); + } + /** * A listener that is notified when some child locations might have changed. */