commit | 224577dfe094f0058aba82adfa0e30c112bb066d | [log] [tgz] |
---|---|---|
author | Mady Mellor <madym@google.com> | Fri Jan 11 12:00:38 2019 -0800 |
committer | Mady Mellor <madym@google.com> | Fri Jan 11 16:23:57 2019 -0800 |
tree | e37e0284ca64350a7f0ae129fae0f69edc53cc96 | |
parent | fb922e9bac265358e54729f75a785c4d7905a5b9 [diff] |
Protect against null expanded bubble & hide header for notifications Test: manual - dismiss an activity view based bubble - look at expanded notif based bubble Change-Id: Ie3db725d6fac522ea0f8cc50612404cca3b7afca
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedViewContainer.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedViewContainer.java index badefe1..71ae1f8 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedViewContainer.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedViewContainer.java
@@ -21,6 +21,7 @@ import android.content.res.Resources; import android.graphics.Color; import android.graphics.drawable.ShapeDrawable; +import android.text.TextUtils; import android.util.AttributeSet; import android.view.View; import android.widget.LinearLayout; @@ -88,6 +89,7 @@ */ public void setHeaderText(CharSequence text) { mHeaderView.setText(text); + mHeaderView.setVisibility(TextUtils.isEmpty(text) ? GONE : VISIBLE); } /**
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java index 3280a33..6706915 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
@@ -417,7 +417,8 @@ @Override public void onActivityViewDestroyed(ActivityView view) { - NotificationEntry entry = mExpandedBubble.getEntry(); + NotificationEntry entry = mExpandedBubble != null + ? mExpandedBubble.getEntry() : null; Log.d(TAG, "onActivityViewDestroyed(key=" + ((entry != null) ? entry.key : "(none)") + "): " + view); }