summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2012-10-01 09:30:49 -0400
committerJohn Spurlock <jspurlock@google.com>2012-10-01 16:57:13 -0400
commit3a4d41a654bf00972da9013854ba0e15b2c01fe9 (patch)
treede294331dcc0b80affc478427e7990e53e62f056 /core/java/android
parent135e5fb71242b1151929e2ea7bf221ff421e6ad2 (diff)
downloadframeworks_base-3a4d41a654bf00972da9013854ba0e15b2c01fe9.zip
frameworks_base-3a4d41a654bf00972da9013854ba0e15b2c01fe9.tar.gz
frameworks_base-3a4d41a654bf00972da9013854ba0e15b2c01fe9.tar.bz2
Update javadocs for DreamService.
Reflect the new intent-filter protocol, and add a bit about <dream>. Also escape xml so it's visible in generated html. Bug:7256474 Change-Id: Id270eeb70601b492458834f19216801b428af4cb
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/service/dreams/DreamService.java26
1 files changed, 16 insertions, 10 deletions
diff --git a/core/java/android/service/dreams/DreamService.java b/core/java/android/service/dreams/DreamService.java
index f97354f..03b685b 100644
--- a/core/java/android/service/dreams/DreamService.java
+++ b/core/java/android/service/dreams/DreamService.java
@@ -47,24 +47,30 @@ import com.android.internal.policy.PolicyManager;
*
* <p>Dreams should be declared in the manifest as follows:</p>
* <pre>
- * {@code
- * <service
+ * &lt;service
* android:name=".MyDream"
* android:exported="true"
* android:icon="@drawable/my_icon"
* android:label="@string/my_dream_label" >
*
- * <intent-filter>
- * <action android:name="android.intent.action.MAIN" />
- * <category android:name="android.intent.category.DREAM" />
- * </intent-filter>
+ * &lt;intent-filter>
+ * &lt;action android:name="android.service.dreams.DreamService" />
+ * &lt;category android:name="android.intent.category.DEFAULT" />
+ * &lt;/intent-filter>
*
- * <!-- Point to additional information for this dream (optional) -->
- * <meta-data
+ * &lt;!-- Point to additional information for this dream (optional) -->
+ * &lt;meta-data
* android:name="android.service.dream"
* android:resource="@xml/my_dream" />
- * </service>
- * }
+ * &lt;/service>
+ * </pre>
+ * <p>If specified, additional information for the dream is defined using the
+ * <code>&lt;{@link android.R.styleable#Dream dream}&gt;</code> element. For example:</p>
+ * <pre>
+ * (in res/xml/my_dream.xml)
+ *
+ * &lt;dream xmlns:android="http://schemas.android.com/apk/res/android"
+ * android:settingsActivity="com.example.app/.MyDreamSettingsActivity" />
* </pre>
*/
public class DreamService extends Service implements Window.Callback {