Fixes an issue where the ambient layout could be null

Change-Id: I0dd190b2349445fbaafe4a5b612619e2dd002539
Fixes: 123247127
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index b8d748d..b405d0c 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -5257,7 +5257,11 @@
          * @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) {