summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorSelim Cinek <cinek@google.com>2019-01-24 16:09:41 -0800
committerSelim Cinek <cinek@google.com>2019-01-24 16:09:41 -0800
commit0e06994b73c4f88b66fd73de4e4c7341e90e5b4c (patch)
tree1bccb7ef5c4996ef7ca514d41a956fbc8c5b6046 /core/java/android
parent95b6e959fca26ddf77d4af0c57c5f5cfb92b09d3 (diff)
Fixes an issue where the ambient layout could be null
Change-Id: I0dd190b2349445fbaafe4a5b612619e2dd002539 Fixes: 123247127
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/app/Notification.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index b8d748dce9e6..b405d0ccc3d1 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -5257,7 +5257,11 @@ public class Notification implements Parcelable
* @hide
*/
public RemoteViews makeAmbientNotification() {
- return createHeadsUpContentView(false /* increasedHeight */);
+ RemoteViews headsUpContentView = createHeadsUpContentView(false /* increasedHeight */);
+ if (headsUpContentView != null) {
+ return headsUpContentView;
+ }
+ return createContentView();
}
private void hideLine1Text(RemoteViews result) {