Merge changes Ia6156d7c,I396ac936 into nyc-dev
am: 6c5dddfdcf
* commit '6c5dddfdcfd9211c26465c396d9338e09b74f791':
Fixed a bug with autoredacted custom views.
Fixed a bug where notifications could become all white
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
index 51553be..93cb952 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
@@ -241,18 +241,22 @@
}
private void updateLimits() {
- boolean customView = getPrivateLayout().getContractedChild().getId()
+ updateLimitsForView(mPrivateLayout);
+ updateLimitsForView(mPublicLayout);
+ }
+
+ private void updateLimitsForView(NotificationContentView layout) {
+ boolean customView = layout.getContractedChild().getId()
!= com.android.internal.R.id.status_bar_latest_event_content;
boolean beforeN = mEntry.targetSdk < Build.VERSION_CODES.N;
int minHeight = customView && beforeN && !mIsSummaryWithChildren ?
mNotificationMinHeightLegacy : mNotificationMinHeight;
- boolean headsUpCustom = getPrivateLayout().getHeadsUpChild() != null &&
- getPrivateLayout().getHeadsUpChild().getId()
- != com.android.internal.R.id.status_bar_latest_event_content;
+ boolean headsUpCustom = layout.getHeadsUpChild() != null &&
+ layout.getHeadsUpChild().getId()
+ != com.android.internal.R.id.status_bar_latest_event_content;
int headsUpheight = headsUpCustom && beforeN ? mMaxHeadsUpHeightLegacy
: mMaxHeadsUpHeight;
- mPrivateLayout.setHeights(minHeight, headsUpheight, mNotificationMaxHeight);
- mPublicLayout.setHeights(minHeight, headsUpheight, mNotificationMaxHeight);
+ layout.setHeights(minHeight, headsUpheight, mNotificationMaxHeight);
}
public StatusBarNotification getStatusBarNotification() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ViewTransformationHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/ViewTransformationHelper.java
index 66f945e..f75f3574 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ViewTransformationHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ViewTransformationHelper.java
@@ -188,6 +188,9 @@
@Override
public void setVisible(boolean visible) {
+ if (mViewTransformationAnimation != null) {
+ mViewTransformationAnimation.cancel();
+ }
for (Integer viewType : mTransformedViews.keySet()) {
TransformState ownState = getCurrentState(viewType);
if (ownState != null) {