diff options
author | Selim Cinek <cinek@google.com> | 2015-04-14 20:31:54 -0700 |
---|---|---|
committer | Selim Cinek <cinek@google.com> | 2015-04-15 13:14:34 -0700 |
commit | d8535869933dfc0e5f0478e3e8f05aed5094a3a5 (patch) | |
tree | 96696e9465ae9768c253341d1dc8ffa7b4fb2f48 /packages/SystemUI/src/com/android/systemui/statusbar | |
parent | aac932591d7aa05bae61d2b47ed7647f35da0001 (diff) | |
download | frameworks_base-d8535869933dfc0e5f0478e3e8f05aed5094a3a5.zip frameworks_base-d8535869933dfc0e5f0478e3e8f05aed5094a3a5.tar.gz frameworks_base-d8535869933dfc0e5f0478e3e8f05aed5094a3a5.tar.bz2 |
Finishing up heads up changes
Fixed a bug where the QS could be expanded when collapsed.
More refactorings, removed todos
Change-Id: I6dea262456c529d7f4a8a4a6a4fdc0e46597bafe
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java | 11 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java | 9 |
2 files changed, 9 insertions, 11 deletions
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 e101197..c266467 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -537,7 +537,7 @@ public class NotificationPanelView extends PanelView implements mExpansionIsFromHeadsUp = true; return true; } - if (onQsIntercept(event)) { + if (!isShadeCollapsed() && onQsIntercept(event)) { return true; } return super.onInterceptTouchEvent(event); @@ -708,7 +708,7 @@ public class NotificationPanelView extends PanelView implements mInitialTouchY = event.getX(); mInitialTouchX = event.getY(); } - if (mExpandedHeight != 0) { + if (!isShadeCollapsed()) { handleQsDown(event); } if (!mQsExpandImmediate && mQsTracking) { @@ -1446,7 +1446,7 @@ public class NotificationPanelView extends PanelView implements updateHeader(); updateUnlockIcon(); updateNotificationTranslucency(); - mHeadsUpManager.setIsExpanded(expandedHeight != 0); + mHeadsUpManager.setIsExpanded(!isShadeCollapsed()); mNotificationStackScroller.setShadeExpanded(!isShadeCollapsed()); if (DEBUG) { invalidate(); @@ -1668,8 +1668,7 @@ public class NotificationPanelView extends PanelView implements mHeadsUpManager.onExpandingFinished(); mIsExpanding = false; mScrollYOverride = -1; - // TODO: look into whether this is still correct - if (mExpandedHeight == 0f) { + if (isShadeCollapsed()) { setListening(false); } else { setListening(true); @@ -2171,7 +2170,7 @@ public class NotificationPanelView extends PanelView implements @Override protected boolean isShadeCollapsed() { - return mExpandedHeight == 0 || mHeadsUpManager.hasPinnedHeadsUp(); + return mExpandedHeight == 0; } @Override 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 b19535b..ddce9d5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java @@ -234,7 +234,7 @@ public abstract class PanelView extends FrameLayout { final float y = event.getY(pointerIndex); if (event.getActionMasked() == MotionEvent.ACTION_DOWN) { - mGestureWaitForTouchSlop = mExpandedHeight == 0f; + mGestureWaitForTouchSlop = isShadeCollapsed(); } boolean waitForTouchSlop = hasConflictingGestures() || mGestureWaitForTouchSlop; @@ -242,7 +242,7 @@ public abstract class PanelView extends FrameLayout { case MotionEvent.ACTION_DOWN: startExpandMotion(x, y, false /* startTracking */, mExpandedHeight); mJustPeeked = false; - mPanelClosedOnDown = mExpandedHeight == 0.0f; + mPanelClosedOnDown = isShadeCollapsed(); mHasLayoutedSinceDown = false; mUpdateFlingOnLayout = false; mMotionAborted = false; @@ -260,7 +260,7 @@ public abstract class PanelView extends FrameLayout { || mPeekPending || mPeekAnimator != null; onTrackingStarted(); } - if (mExpandedHeight == 0) { + if (isShadeCollapsed()) { schedulePeek(); } break; @@ -448,7 +448,7 @@ public abstract class PanelView extends FrameLayout { mTouchSlopExceeded = false; mJustPeeked = false; mMotionAborted = false; - mPanelClosedOnDown = mExpandedHeight == 0.0f; + mPanelClosedOnDown = isShadeCollapsed(); mHasLayoutedSinceDown = false; mUpdateFlingOnLayout = false; mTouchAboveFalsingThreshold = false; @@ -730,7 +730,6 @@ public abstract class PanelView extends FrameLayout { } public boolean isFullyCollapsed() { - // TODO: look into whether this is still correct with HUN's return mExpandedHeight <= 0; } |