@@ -123,7 +123,7 @@ moved to {@link android.provider.Settings.Global} when running on Android 4.2 an
123123<p>Daydream is a new interactive screensaver mode for Android devices. It activates automatically
124124when the device is inserted into a dock or when the device is left idle while plugged in to a
125125charger (instead of turning the screen off). Daydream displays one dream at a time, which may
126- be a purely visual, passive display that dismisses upon touch, or interactive and responsive
126+ be a purely visual, passive display that dismisses upon touch, or may be interactive and responsive
127127to the full suite of input events. Your dreams run in your app’s process and have full access to
128128the Android UI toolkit, including views, layouts, and animations, so they are more flexible and
129129powerful than either live wallpapers or app widgets.</p>
@@ -133,25 +133,26 @@ android.service.dreams.DreamService}. The {@link android.service.dreams.DreamSer
133133designed to be similar to those of {@link android.app.Activity}. To specify the UI for your
134134dream, pass a layout resource ID or {@link android.view.View} to {@link
135135android.service.dreams.DreamService#setContentView setContentView()} at any point after you have
136- a window (such as from the {@link android.service.dreams.DreamService#onAttachedToWindow()}
137- callback). You cannot initiate a {@link android.service.dreams.DreamService} from your
138- app—it is launched automatically by the system.</p>
136+ a window, such as from the {@link android.service.dreams.DreamService#onAttachedToWindow()}
137+ callback.</p>
139138
140139<p>The {@link android.service.dreams.DreamService} class provides other important lifecycle callback
141140methods on top of the base {@link android.app.Service} APIs, such as {@link
142141android.service.dreams.DreamService#onDreamingStarted()}, {@link
143142android.service.dreams.DreamService#onDreamingStopped()}, and {@link
144- android.service.dreams.DreamService#onDetachedFromWindow()}.</p>
143+ android.service.dreams.DreamService#onDetachedFromWindow()}.
144+ You cannot initiate a {@link android.service.dreams.DreamService} from your
145+ app—it is launched automatically by the system.</p>
145146
146147<p>If your dream is interactive, you can start an activity from the dream to send the user into
147- your full app’s UI for more detail or control. (Use {@link
148+ your app’s full UI for more detail or control. You can use {@link
148149android.service.dreams.DreamService#finish()} to end the dream so the user can see the
149- new Activity.) </p>
150+ new Activity.</p>
150151
151- <p>To make your daydream available to the system, in your manifest file, declare your {@link
152+ <p>To make your daydream available to the system, declare your {@link
152153android.service.dreams.DreamService} with a <a
153- href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> element.
154- You must then include an intent filter with the action {@code
154+ href="{@docRoot}guide/topics/manifest/service-element.html">{@code <service>}</a> element
155+ in your manifest file. You must then include an intent filter with the action {@code
155156"android.service.dreams.DreamService"}. For example:</p>
156157
157158<pre>
@@ -169,12 +170,12 @@ to be aware of:</p>
169170
170171<ul>
171172 <li>{@link android.service.dreams.DreamService#setInteractive(boolean)} controls whether
172- the daydream receives input events or exits immediately upon user input. If the dream is
173- interactive, the user may use the back or home buttons to exit the dream or you can call
173+ the dream receives input events or exits immediately upon user input. If the dream is
174+ interactive, the user may use the <em>Back</em> or <em>Home</em> buttons to exit the dream or you can call
174175{@link android.service.dreams.DreamService#finish()} to stop the dream.</li>
175- <li>If you need a fully immersive display, calling {@link
176+ <li>If you want a fully immersive display, you can call {@link
176177android.service.dreams.DreamService#setFullscreen
177- setFullscreen()} is a quick way to hide the status bar.</li>
178+ setFullscreen()} to hide the status bar.</li>
178179 <li>Before Daydream starts, the display dims to signal to the user that the idle timeout
179180is approaching. Calling {@link android.service.dreams.DreamService#setScreenBright
180181setScreenBright(true)} allows you to instead set the display at its usual brightness.</li>
@@ -195,14 +196,14 @@ setScreenBright(true)} allows you to instead set the display at its usual bright
195196<h2 id="SecondaryDisplays">Secondary Displays</h2>
196197
197198<p>Android now allows your app to display unique content on additional screens that are connected
198- to the user’s device. As an extension of {@link android.app.Dialog} class, the new {@link
199- android.app.Presentation} class provides a region for your app to display customized UI on a
200- secondary display rather than simply mirroring the UI from the device.</p>
201-
202- <p>To create unique content for a secondary display, extend the {@link android.app.Presentation}
199+ to the user’s device over either a wired connection or Wi-Fi.
200+ To create unique content for a secondary display, extend the {@link android.app.Presentation}
203201class and implement the {@link android.app.Presentation#onCreate onCreate()} callback. Within
204202{@link android.app.Presentation#onCreate onCreate()}, specify your UI for the secondary display
205- by calling {@link android.app.Presentation#setContentView setContentView()}.</p>
203+ by calling {@link android.app.Presentation#setContentView setContentView()}.
204+ As an extension of the {@link android.app.Dialog} class, the {@link
205+ android.app.Presentation} class provides the region in which your app can display a unique UI on the
206+ secondary display.</p>
206207
207208<p>To detect secondary displays where you can display your {@link android.app.Presentation},
208209use either the {@link android.hardware.display.DisplayManager} or {@link android.media.MediaRouter}
@@ -211,7 +212,7 @@ multiple displays that may be connected at once, you should usually use {@link
211212android.media.MediaRouter} instead to quickly access the system’s default display for
212213presentations.</p>
213214
214- <p>To get the default display for presentations , call {@link
215+ <p>To get the default display for your presentation , call {@link
215216android.media.MediaRouter#getSelectedRoute MediaRouter.getSelectedRoute()} and pass it
216217{@link android.media.MediaRouter#ROUTE_TYPE_LIVE_VIDEO}. This returns a {@link
217218android.media.MediaRouter.RouteInfo} object that describes the system’s currently selected route
0 commit comments