Skip to content

Commit 3a4d41a

Browse files
author
John Spurlock
committed
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
1 parent 135e5fb commit 3a4d41a

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

core/java/android/service/dreams/DreamService.java

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,30 @@
4747
*
4848
* <p>Dreams should be declared in the manifest as follows:</p>
4949
* <pre>
50-
* {@code
51-
* <service
50+
* &lt;service
5251
* android:name=".MyDream"
5352
* android:exported="true"
5453
* android:icon="@drawable/my_icon"
5554
* android:label="@string/my_dream_label" >
5655
*
57-
* <intent-filter>
58-
* <action android:name="android.intent.action.MAIN" />
59-
* <category android:name="android.intent.category.DREAM" />
60-
* </intent-filter>
56+
* &lt;intent-filter>
57+
* &lt;action android:name="android.service.dreams.DreamService" />
58+
* &lt;category android:name="android.intent.category.DEFAULT" />
59+
* &lt;/intent-filter>
6160
*
62-
* <!-- Point to additional information for this dream (optional) -->
63-
* <meta-data
61+
* &lt;!-- Point to additional information for this dream (optional) -->
62+
* &lt;meta-data
6463
* android:name="android.service.dream"
6564
* android:resource="@xml/my_dream" />
66-
* </service>
67-
* }
65+
* &lt;/service>
66+
* </pre>
67+
* <p>If specified, additional information for the dream is defined using the
68+
* <code>&lt;{@link android.R.styleable#Dream dream}&gt;</code> element. For example:</p>
69+
* <pre>
70+
* (in res/xml/my_dream.xml)
71+
*
72+
* &lt;dream xmlns:android="http://schemas.android.com/apk/res/android"
73+
* android:settingsActivity="com.example.app/.MyDreamSettingsActivity" />
6874
* </pre>
6975
*/
7076
public class DreamService extends Service implements Window.Callback {

0 commit comments

Comments
 (0)