Skip to content

Commit ea31b47

Browse files
scottamainAndroid (Google) Code Review
authored andcommitted
Merge "fix misc doc bugs from external issues" into jb-dev
2 parents 1022b99 + cb0b2df commit ea31b47

File tree

10 files changed

+24
-28
lines changed

10 files changed

+24
-28
lines changed

docs/html/guide/components/bound-services.jd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -640,12 +640,6 @@ href="{@docRoot}resources/samples/ApiDemos/index.html">ApiDemos</a>.</p>
640640

641641
<h2 id="Lifecycle">Managing the Lifecycle of a Bound Service</h2>
642642

643-
<div class="figure" style="width:588px">
644-
<img src="{@docRoot}images/fundamentals/service_binding_tree_lifecycle.png" alt="" />
645-
<p class="img-caption"><strong>Figure 1.</strong> The lifecycle for a service that is started
646-
and also allows binding.</p>
647-
</div>
648-
649643
<p>When a service is unbound from all clients, the Android system destroys it (unless it was also
650644
started with {@link android.app.Service#onStartCommand onStartCommand()}). As such, you don't have
651645
to manage the lifecycle of your service if it's purely a bound
@@ -667,6 +661,12 @@ onRebind()} returns void, but the client still receives the {@link android.os.IB
667661
{@link android.content.ServiceConnection#onServiceConnected onServiceConnected()} callback.
668662
Below, figure 1 illustrates the logic for this kind of lifecycle.</p>
669663

664+
665+
<img src="{@docRoot}images/fundamentals/service_binding_tree_lifecycle.png" alt="" />
666+
<p class="img-caption"><strong>Figure 1.</strong> The lifecycle for a service that is started
667+
and also allows binding.</p>
668+
669+
670670
<p>For more information about the lifecycle of an started service, see the <a
671671
href="{@docRoot}guide/components/services.html#Lifecycle">Services</a> document.</p>
672672

docs/html/guide/components/services.jd

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -755,15 +755,6 @@ stopSelf()} does not actually stop the service until all clients unbind. </p>
755755
changes in the service's state and perform work at the appropriate times. The following skeleton
756756
service demonstrates each of the lifecycle methods:</p>
757757

758-
759-
<div class="figure" style="width:432px">
760-
<img src="{@docRoot}images/service_lifecycle.png" alt="" />
761-
<p class="img-caption"><strong>Figure 2.</strong> The service lifecycle. The diagram on the left
762-
shows the lifecycle when the service is created with {@link android.content.Context#startService
763-
startService()} and the diagram on the right shows the lifecycle when the service is created
764-
with {@link android.content.Context#bindService bindService()}.</p>
765-
</div>
766-
767758
<pre>
768759
public class ExampleService extends Service {
769760
int mStartMode; // indicates how to behave if the service is killed
@@ -804,6 +795,12 @@ public class ExampleService extends Service {
804795
<p class="note"><strong>Note:</strong> Unlike the activity lifecycle callback methods, you are
805796
<em>not</em> required to call the superclass implementation of these callback methods.</p>
806797

798+
<img src="{@docRoot}images/service_lifecycle.png" alt="" />
799+
<p class="img-caption"><strong>Figure 2.</strong> The service lifecycle. The diagram on the left
800+
shows the lifecycle when the service is created with {@link android.content.Context#startService
801+
startService()} and the diagram on the right shows the lifecycle when the service is created
802+
with {@link android.content.Context#bindService bindService()}.</p>
803+
807804
<p>By implementing these methods, you can monitor two nested loops of the service's lifecycle: </p>
808805

809806
<ul>

docs/html/guide/webapps/targeting.jd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ density.</p>
270270

271271
<p>The density of a device's screen is based on the screen resolution, as defined by the number of
272272
dots per inch (dpi). There are three screen
273-
density categories supported by Android: low (ldpi), medium (mdpi), and high (mdpi). A screen
273+
density categories supported by Android: low (ldpi), medium (mdpi), and high (hdpi). A screen
274274
with low density has fewer available pixels per inch, whereas a screen with high density has more
275275
pixels per inch (compared to a medium density screen). The Android Browser and {@link
276276
android.webkit.WebView} target a medium density screen by default.</p>

docs/html/tools/help/adb.jd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,14 @@ Emulator 2, adb: 5557 ...
8888
<li>Serial number &mdash; A string created by adb to uniquely identify an emulator/device instance by its
8989
console port number. The format of the serial number is <code>&lt;type&gt;-&lt;consolePort&gt;</code>.
9090
Here's an example serial number: <code>emulator-5554</code></li>
91-
<li>State &mdash; The connection state of the instance. Three states are supported:
91+
<li>State &mdash; The connection state of the instance may be one of the following:
9292
<ul>
9393
<li><code>offline</code> &mdash; the instance is not connected to adb or is not responding.</li>
9494
<li><code>device</code> &mdash; the instance is now connected to the adb server. Note that this state does not
9595
imply that the Android system is fully booted and operational, since the instance connects to adb
9696
while the system is still booting. However, after boot-up, this is the normal operational state of
9797
an emulator/device instance.</li>
98+
<li><code>no device</code> &mdash; there is no emulator/device connected.
9899
</ul>
99100
</li>
100101
</ul>
@@ -111,7 +112,6 @@ emulator-5554&nbsp;&nbsp;device
111112
emulator-5556&nbsp;&nbsp;device
112113
emulator-5558&nbsp;&nbsp;device</pre>
113114

114-
<p>If there is no emulator/device running, adb returns <code>no device</code>.</p>
115115

116116

117117
<a name="directingcommands"></a>

docs/html/training/accessibility/service.jd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ In that method, use {@link
175175
android.view.accessibility.AccessibilityEvent#getEventType} to determine the
176176
type of event, and {@link
177177
android.view.accessibility.AccessibilityEvent#getContentDescription} to extract
178-
any label text associated with the fiew that fired the event.</pre>
178+
any label text associated with the view that fired the event.</pre>
179179

180180
<pre>
181181
&#64;Override

docs/html/training/basics/firstapp/starting-activity.jd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ the original {@code MainActivity.java} file.</p>
226226

227227
<p>Open the {@code DisplayMessageActivity.java} file. If you used Eclipse to create it, the class
228228
already includes an implementation of the required {@link android.app.Activity#onCreate onCreate()}
229-
method. There's also an implemtation of the {@link android.app.Activity#onCreateOptionsMenu
229+
method. There's also an implementation of the {@link android.app.Activity#onCreateOptionsMenu
230230
onCreateOptionsMenu()} method, but
231231
you won't need it for this app so you can remove it. The class should look like this:</p>
232232

docs/html/training/basics/intents/sending.jd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ next.link=result.html
3131
<p>One of Android's most important features is an app's ability to send the user to another app
3232
based on an "action" it would like to perform. For example, if
3333
your app has the address of a business that you'd like to show on a map, you don't have to build
34-
an activity in your app that shows a map. Instead, you can send a out a request to view the address
35-
using an {@link android.content.Intent}. The Android system then starts an app that's able to view
34+
an activity in your app that shows a map. Instead, you can create a request to view the address
35+
using an {@link android.content.Intent}. The Android system then starts an app that's able to show
3636
the address on a map.</p>
3737

38-
<p>As shown in the first class, <a href="{@docRoot}training/basics/firstapp/index.html">Building
38+
<p>As explained in the first class, <a href="{@docRoot}training/basics/firstapp/index.html">Building
3939
Your First App</a>, you must use intents to navigate between activities in your own app. You
4040
generally do so with an <em>explicit intent</em>, which defines the exact class name of the
4141
component you want to start. However, when you want to have a separate app perform an action, such

docs/html/training/basics/network-ops/managing.jd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ background data.</p>
116116
follows. The method {@link
117117
android.net.ConnectivityManager#getActiveNetworkInfo() getActiveNetworkInfo()}
118118
returns a {@link android.net.NetworkInfo} instance representing the first
119-
connected network interface it can find, or <code>null</code> if none if the
119+
connected network interface it can find, or <code>null</code> if none of the
120120
interfaces is connected (meaning that an
121121
internet connection is not available):</p>
122122

docs/html/training/cloudsync/gcm.jd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ your server.</p>
3737
<p>This lesson covers some of the best practices
3838
for integrating GCM into your application, and assumes you are already familiar
3939
with basic implementation of this service. If this is not the case, you can read the <a
40-
href="http://developer.google.com/android/gcm/demo">GCM
41-
Tutorial</a>.</p>
40+
href="{@docRoot}guide/google/gcm/demo.html">GCM demo app tutorial</a>.</p>
4241

4342
<h2 id="multicast">Send Multicast Messages Efficiently</h2>
4443
<p>One of the most useful features in GCM is support for up to 1,000 recipients for

docs/html/training/managing-audio/audio-focus.jd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ those events&mdash;and abandoning your audio focus. At that point, you would exp
135135
(pressing play in your app) to be required before you resume playing audio.</p>
136136

137137
<p>In the following code snippet, we pause the playback or our media player object if the audio
138-
loss is transien and resume it when we have regained the focus. If the loss is permanent, it
138+
loss is transient and resume it when we have regained the focus. If the loss is permanent, it
139139
unregisters our media button event receiver and stops monitoring audio focus changes.<p>
140140

141141
<pre>
@@ -169,7 +169,7 @@ lose focus, then returns it to its previous level when we regain focus.</p>
169169
<pre>
170170
OnAudioFocusChangeListener afChangeListener = new OnAudioFocusChangeListener() {
171171
public void onAudioFocusChange(int focusChange) {
172-
if (focusChange == AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK
172+
if (focusChange == AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK) {
173173
// Lower the volume
174174
} else if (focusChange == AudioManager.AUDIOFOCUS_GAIN) {
175175
// Raise it back to normal

0 commit comments

Comments
 (0)