Worked around a bug where the view could render blank
Heads up notifications could render blank due to a
bug with invalidation. This works around this issue
by manually invalidating the parent.
Change-Id: I858d1c95bc936f5b14fc3485b2d54d76717c2537
Fixes: 34660898
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
index b4c1af7..8274b9a7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
@@ -39,6 +39,7 @@
import android.view.NotificationHeaderView;
import android.view.View;
import android.view.ViewGroup;
+import android.view.ViewParent;
import android.view.ViewStub;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
@@ -1748,7 +1749,17 @@
@Override
public void setActualHeight(int height, boolean notifyListeners) {
+ boolean changed = height != getActualHeight();
super.setActualHeight(height, notifyListeners);
+ if (changed && isRemoved()) {
+ // TODO: remove this once we found the gfx bug for this.
+ // This is a hack since a removed view sometimes would just stay blank. it occured
+ // when sending yourself a message and then clicking on it.
+ ViewGroup parent = (ViewGroup) getParent();
+ if (parent != null) {
+ parent.invalidate();
+ }
+ }
if (mGuts != null && mGuts.isExposed()) {
mGuts.setActualHeight(height);
return;