Fixed a bug where the single line view would be invisible
When updating a child notification, the single line view was
removed leading to invisible group children.
Bug: 27137268
Change-Id: Id9e6ce2ae081ec746118f4367644ea8843d51f10
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
index 76e522e..5e0e620 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
@@ -248,14 +248,16 @@
public void reset(boolean resetActualHeight) {
if (mContractedChild != null) {
mContractedChild.animate().cancel();
+ removeView(mContractedChild);
}
if (mExpandedChild != null) {
mExpandedChild.animate().cancel();
+ removeView(mExpandedChild);
}
if (mHeadsUpChild != null) {
mHeadsUpChild.animate().cancel();
+ removeView(mHeadsUpChild);
}
- removeAllViews();
mContractedChild = null;
mExpandedChild = null;
mHeadsUpChild = null;
@@ -569,6 +571,9 @@
if (mIsChildInGroup) {
mSingleLineView = mHybridViewManager.bindFromNotification(
mSingleLineView, mStatusBarNotification.getNotification());
+ } else if (mSingleLineView != null) {
+ removeView(mSingleLineView);
+ mSingleLineView = null;
}
}
@@ -685,4 +690,12 @@
public void requestSelectLayout(boolean needsAnimation) {
selectLayout(needsAnimation, false);
}
+
+ public void reInflateViews() {
+ if (mIsChildInGroup && mSingleLineView != null) {
+ removeView(mSingleLineView);
+ mSingleLineView = null;
+ updateSingleLineView();
+ }
+ }
}