summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jorim Jaggi <jjaggi@google.com> 2014-05-12 00:00:52 +0200
committer Jorim Jaggi <jjaggi@google.com> 2014-05-12 15:25:24 +0200
commitbc5f496e470e64917367abf6730e68ace6def88e (patch)
tree48286a483d4ad23948203dfc209942ef8731abf7
parent890e1892feac29b5bfe9b5f172a006e161e588d2 (diff)
Fix QuickSettings header state on Keyguard.
It was in a weird state before when expanded. Now it is much better. Change-Id: I17555b77c70720b6ead512e4ef61a62cc3a73318
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java12
2 files changed, 9 insertions, 10 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 2d96373a18bb..8387e366cc02 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -414,11 +414,8 @@ public class NotificationPanelView extends PanelView implements
if (!mQsExpansionEnabled) {
return false;
}
- View headerView = mStatusBar.getBarState() == StatusBarState.KEYGUARD && !mQsExpanded
- ? mKeyguardStatusView
- : mHeader;
- boolean onHeader = x >= headerView.getLeft() && x <= headerView.getRight()
- && y >= headerView.getTop() && y <= headerView.getBottom();
+ boolean onHeader = x >= mHeader.getLeft() && x <= mHeader.getRight()
+ && y >= mHeader.getTop() && y <= mHeader.getBottom();
if (mQsExpanded) {
return onHeader || (mScrollView.isScrolledToBottom() && yDiff < 0);
} else {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
index 2b78a15d6afb..1af9a6b80057 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
@@ -114,10 +114,11 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL
}
private void updateHeights() {
+ boolean onKeyguardAndCollapsed = mKeyguardShowing && !mExpanded;
int height;
if (mExpanded) {
height = mExpandedHeight;
- } else if (mKeyguardShowing) {
+ } else if (onKeyguardAndCollapsed) {
height = mKeyguardHeight;
} else {
height = mCollapsedHeight;
@@ -127,7 +128,7 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL
lp.height = height;
setLayoutParams(lp);
}
- int systemIconsContainerHeight = mKeyguardShowing ? mKeyguardHeight : mCollapsedHeight;
+ int systemIconsContainerHeight = onKeyguardAndCollapsed ? mKeyguardHeight : mCollapsedHeight;
lp = mSystemIconsContainer.getLayoutParams();
if (lp.height != systemIconsContainerHeight) {
lp.height = systemIconsContainerHeight;
@@ -150,9 +151,10 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL
}
private void updateVisibilities() {
- mBackground.setVisibility(mKeyguardShowing ? View.INVISIBLE : View.VISIBLE);
- mDateTime.setVisibility(mKeyguardShowing ? View.INVISIBLE : View.VISIBLE);
- mKeyguardCarrierText.setVisibility(mKeyguardShowing ? View.VISIBLE : View.GONE);
+ boolean onKeyguardAndCollapsed = mKeyguardShowing && !mExpanded;
+ mBackground.setVisibility(onKeyguardAndCollapsed ? View.INVISIBLE : View.VISIBLE);
+ mDateTime.setVisibility(onKeyguardAndCollapsed ? View.INVISIBLE : View.VISIBLE);
+ mKeyguardCarrierText.setVisibility(onKeyguardAndCollapsed ? View.VISIBLE : View.GONE);
mDate.setVisibility(mExpanded ? View.VISIBLE : View.GONE);
mSettingsButton.setVisibility(mExpanded ? View.VISIBLE : View.GONE);
mBrightnessContainer.setVisibility(mExpanded ? View.VISIBLE : View.GONE);