From 831ca9d3bc73e37f555f6c07babde270f83044fe Mon Sep 17 00:00:00 2001 From: Griff Hazen Date: Tue, 17 Jun 2014 00:38:38 -0700 Subject: [PATCH] Document best practices for display intent activities. Bug: 15412926 Change-Id: I1c3082dfde85cd03ffc97be6383a0608f925edcf --- core/java/android/app/Notification.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index 32284e8399fe3..2ea679dfda58c 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -3102,14 +3102,16 @@ public class Notification implements Parcelable * .build(); * *

The activity to launch needs to allow embedding, must be exported, and - * should have an empty task affinity. + * should have an empty task affinity. It is also recommended to use the device + * default light theme. * *

Example AndroidManifest.xml entry: *

          * <activity android:name="com.example.MyDisplayActivity"
          *     android:exported="true"
          *     android:allowEmbedded="true"
-         *     android:taskAffinity="" />
+ * android:taskAffinity="" + * android:theme="@android:style/Theme.DeviceDefault.Light" /> * * @param intent the {@link PendingIntent} for an activity * @return this object for method chaining