summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Selim Cinek <cinek@google.com> 2015-12-11 23:59:54 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2015-12-11 23:59:54 +0000
commit7b36ce17d1599756210c814fda61c0cbef8d4cbe (patch)
tree2675b708c8c68ea39381ac83d8d0d87828562c9b
parentb052aad297bd1d0e36c290eb20e262aea5d670c4 (diff)
parent652430a5cf8b591e818e01bbcf79e34fc43ff111 (diff)
Merge "Fixed a bug where not enough notifications were shown on lockscreen"
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java6
2 files changed, 7 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 57c56afdd1f0..39a33a56cf84 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -1323,9 +1323,9 @@ public abstract class BaseStatusBar extends SystemUI implements
}
/**
- * Called when the panel was layouted expanded for the first time after being collapsed.
+ * Called when the size of the notification panel changes
*/
- public void onPanelExpandedAndLayouted() {
+ public void onPanelHeightChanged() {
if (mState == StatusBarState.KEYGUARD) {
// Since the number of notifications is determined based on the height of the view, we
// need to update them.
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 21d803dd4e25..5e54ba7d9ce4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -82,6 +82,7 @@ public abstract class PanelView extends FrameLayout {
private boolean mMotionAborted;
private boolean mUpwardsWhenTresholdReached;
private boolean mAnimatingOnDown;
+ private int mLayoutHeight = 0;
private ValueAnimator mHeightAnimator;
private ObjectAnimator mPeekAnimator;
@@ -716,6 +717,10 @@ public abstract class PanelView extends FrameLayout {
@Override
protected void onLayout (boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
+ if (mLayoutHeight != getHeight()) {
+ mLayoutHeight = getHeight();
+ mStatusBar.onPanelHeightChanged();
+ }
requestPanelHeightUpdate();
mHasLayoutedSinceDown = true;
if (mUpdateFlingOnLayout) {
@@ -889,7 +894,6 @@ public abstract class PanelView extends FrameLayout {
if (mStatusBar.getStatusBarWindow().getHeight()
!= mStatusBar.getStatusBarHeight()) {
getViewTreeObserver().removeOnGlobalLayoutListener(this);
- mStatusBar.onPanelExpandedAndLayouted();
if (animate) {
mBar.startOpeningPanel(PanelView.this);
notifyExpandingStarted();