summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorSelim Cinek <cinek@google.com>2014-06-10 15:51:59 +0200
committerSelim Cinek <cinek@google.com>2014-06-10 16:03:46 +0200
commit7d447726e2cb9fae80db417012039828daab8fe7 (patch)
tree04669ae1bb254e7bc6f9cf83d9c9c91a35603e9d /packages
parentc0ce82daa4715822e2a37e53df7c34f157a96517 (diff)
downloadframeworks_base-7d447726e2cb9fae80db417012039828daab8fe7.zip
frameworks_base-7d447726e2cb9fae80db417012039828daab8fe7.tar.gz
frameworks_base-7d447726e2cb9fae80db417012039828daab8fe7.tar.bz2
Fixed an issue where holes in the notification shade could appear.
When redaction was turned on, holes could appear. Bug: 15107339 Change-Id: I8c2830caaa78f03c8ccada1a7160f73c906365d7
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java10
2 files changed, 14 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
index 84005d1..530b32f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
@@ -258,4 +258,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
public void notifyContentUpdated() {
mPrivateLayout.notifyContentUpdated();
}
+
+ public boolean isShowingLayoutLayouted() {
+ View showingLayout = mShowingPublic ? mPublicLayout : mPrivateLayout;
+ return showingLayout.getWidth() != 0;
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java
index a48cab8..b9346c3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java
@@ -657,7 +657,7 @@ public class StackScrollAlgorithm {
} else {
// We are expanding the shade, expand it to its full height.
- if (mFirstChildWhileExpanding.getWidth() == 0) {
+ if (!isMaxSizeInitialized(mFirstChildWhileExpanding)) {
// This child was not layouted yet, wait for a layout pass
mFirstChildWhileExpanding
@@ -684,6 +684,14 @@ public class StackScrollAlgorithm {
}
}
+ private boolean isMaxSizeInitialized(ExpandableView child) {
+ if (child instanceof ExpandableNotificationRow) {
+ ExpandableNotificationRow row = (ExpandableNotificationRow) child;
+ return row.isShowingLayoutLayouted();
+ }
+ return child == null || child.getWidth() != 0;
+ }
+
private View findFirstVisibleChild(ViewGroup container) {
int childCount = container.getChildCount();
for (int i = 0; i < childCount; i++) {