allow rich notifications in the heads up.

new shouldInterrupt logic: screen on, not locked, not dreaming, and
  priority above HIGH and noisy, or has fullscreen intent
draft of API allowing devs to give hints about head up display

reuse inflateViews()
add an expand helper to the heads up space
move some things into Entry for reuse

don't allow touches in first second
delay decay if touched
make decay time a resource

add a custom viewgroup for notification rows to get view management
out of the NotificationData class.

Change-Id: I36464f110cfa0dabc3f35db7db6c35c27e8ee2ba
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index bffbb51..781b94e 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -457,6 +457,30 @@
     public static final String EXTRA_PEOPLE = "android.people";
 
     /**
+     * Notification extra to specify heads up display preference.
+     * @hide
+     */
+    public static final String EXTRA_AS_HEADS_UP = "headsup";
+
+    /**
+     * Value for {@link #EXTRA_AS_HEADS_UP} indicating that heads up display is not appropriate.
+     * @hide
+     */
+    public static final int HEADS_UP_NEVER = 0;
+
+    /**
+     * Default value for {@link #EXTRA_AS_HEADS_UP} indicating that heads up display is appropriate.
+     * @hide
+     */
+    public static final int HEADS_UP_ALLOWED = 1;
+
+    /**
+     * Value for {@link #EXTRA_AS_HEADS_UP} that advocates for heads up display.
+     * @hide
+     */
+    public static final int HEADS_UP_REQUESTED = 2;
+
+    /**
      * Structure to encapsulate an "action", including title and icon, that can be attached to a Notification.
      */
     public static class Action implements Parcelable {