Fixed several bugs with redaction.
The Notification row was in most cases directly referring to
the private layout which lead to numerous bugs.
Bug: 15107339
Bug: 15536865
Bug: 15181880
Change-Id: Id1021eb853d67db168c9471d7dacbe5265c4ba2f
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
index 530b32f..5bad602 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
@@ -209,7 +209,7 @@
}
public int getMaxExpandHeight() {
- return mMaxExpandHeight;
+ return mShowingPublic ? mRowMinHeight : mMaxExpandHeight;
}
/**
@@ -221,30 +221,35 @@
@Override
public boolean isContentExpandable() {
- return mPrivateLayout.isContentExpandable();
+ NotificationContentView showingLayout = getShowingLayout();
+ return showingLayout.isContentExpandable();
}
@Override
public void setActualHeight(int height, boolean notifyListeners) {
mPrivateLayout.setActualHeight(height);
+ mPublicLayout.setActualHeight(height);
invalidate();
super.setActualHeight(height, notifyListeners);
}
@Override
public int getMaxHeight() {
- return mPrivateLayout.getMaxHeight();
+ NotificationContentView showingLayout = getShowingLayout();
+ return showingLayout.getMaxHeight();
}
@Override
public int getMinHeight() {
- return mPrivateLayout.getMinHeight();
+ NotificationContentView showingLayout = getShowingLayout();
+ return showingLayout.getMinHeight();
}
@Override
public void setClipTopAmount(int clipTopAmount) {
super.setClipTopAmount(clipTopAmount);
mPrivateLayout.setClipTopAmount(clipTopAmount);
+ mPublicLayout.setClipTopAmount(clipTopAmount);
}
public boolean isBelowSpeedBump() {
@@ -256,11 +261,16 @@
}
public void notifyContentUpdated() {
+ mPublicLayout.notifyContentUpdated();
mPrivateLayout.notifyContentUpdated();
}
public boolean isShowingLayoutLayouted() {
- View showingLayout = mShowingPublic ? mPublicLayout : mPrivateLayout;
+ NotificationContentView showingLayout = getShowingLayout();
return showingLayout.getWidth() != 0;
}
+
+ private NotificationContentView getShowingLayout() {
+ return mShowingPublic ? mPublicLayout : mPrivateLayout;
+ }
}