summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2014-05-12 15:35:58 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-12 15:35:59 +0000
commit87db385943481dbeb681fbfbee3d0b693520d1b3 (patch)
tree1ef9505a262af77ca781b865a1c465ec7815a0c0 /packages/SystemUI/src
parent542576548c4d1f7b59c314360414190cab5a9a05 (diff)
parentbc5f496e470e64917367abf6730e68ace6def88e (diff)
downloadframeworks_base-87db385943481dbeb681fbfbee3d0b693520d1b3.zip
frameworks_base-87db385943481dbeb681fbfbee3d0b693520d1b3.tar.gz
frameworks_base-87db385943481dbeb681fbfbee3d0b693520d1b3.tar.bz2
Merge "Fix QuickSettings header state on Keyguard."
Diffstat (limited to 'packages/SystemUI/src')
-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 2d96373..8387e36 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 2b78a15..1af9a6b 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);