diff options
author | Scott Main <smain@google.com> | 2012-08-10 12:36:34 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-08-10 12:36:34 -0700 |
commit | 68b3f065b617d6cdcf0e528cfe4bf92b89b20445 (patch) | |
tree | 9c465a1dded9f40ed5c3ee3a802178c9566c53d5 /docs/html/guide | |
parent | 30206968e99f48d311a90fed8b8591df2fef2c98 (diff) | |
parent | 922e038b087076260ae7e29facc8121d46e8ba3c (diff) | |
download | frameworks_base-68b3f065b617d6cdcf0e528cfe4bf92b89b20445.zip frameworks_base-68b3f065b617d6cdcf0e528cfe4bf92b89b20445.tar.gz frameworks_base-68b3f065b617d6cdcf0e528cfe4bf92b89b20445.tar.bz2 |
am 922e038b: am ea31b47a: Merge "fix misc doc bugs from external issues" into jb-dev
* commit '922e038b087076260ae7e29facc8121d46e8ba3c':
fix misc doc bugs from external issues
Diffstat (limited to 'docs/html/guide')
-rw-r--r-- | docs/html/guide/components/bound-services.jd | 12 | ||||
-rw-r--r-- | docs/html/guide/components/services.jd | 15 | ||||
-rw-r--r-- | docs/html/guide/webapps/targeting.jd | 2 |
3 files changed, 13 insertions, 16 deletions
diff --git a/docs/html/guide/components/bound-services.jd b/docs/html/guide/components/bound-services.jd index 43e6e5e..8d2bba5 100644 --- a/docs/html/guide/components/bound-services.jd +++ b/docs/html/guide/components/bound-services.jd @@ -640,12 +640,6 @@ href="{@docRoot}resources/samples/ApiDemos/index.html">ApiDemos</a>.</p> <h2 id="Lifecycle">Managing the Lifecycle of a Bound Service</h2> -<div class="figure" style="width:588px"> -<img src="{@docRoot}images/fundamentals/service_binding_tree_lifecycle.png" alt="" /> -<p class="img-caption"><strong>Figure 1.</strong> The lifecycle for a service that is started -and also allows binding.</p> -</div> - <p>When a service is unbound from all clients, the Android system destroys it (unless it was also started with {@link android.app.Service#onStartCommand onStartCommand()}). As such, you don't have 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 {@link android.content.ServiceConnection#onServiceConnected onServiceConnected()} callback. Below, figure 1 illustrates the logic for this kind of lifecycle.</p> + +<img src="{@docRoot}images/fundamentals/service_binding_tree_lifecycle.png" alt="" /> +<p class="img-caption"><strong>Figure 1.</strong> The lifecycle for a service that is started +and also allows binding.</p> + + <p>For more information about the lifecycle of an started service, see the <a href="{@docRoot}guide/components/services.html#Lifecycle">Services</a> document.</p> diff --git a/docs/html/guide/components/services.jd b/docs/html/guide/components/services.jd index b89914a..6e5dfd2 100644 --- a/docs/html/guide/components/services.jd +++ b/docs/html/guide/components/services.jd @@ -755,15 +755,6 @@ stopSelf()} does not actually stop the service until all clients unbind. </p> changes in the service's state and perform work at the appropriate times. The following skeleton service demonstrates each of the lifecycle methods:</p> - -<div class="figure" style="width:432px"> -<img src="{@docRoot}images/service_lifecycle.png" alt="" /> -<p class="img-caption"><strong>Figure 2.</strong> The service lifecycle. The diagram on the left -shows the lifecycle when the service is created with {@link android.content.Context#startService -startService()} and the diagram on the right shows the lifecycle when the service is created -with {@link android.content.Context#bindService bindService()}.</p> -</div> - <pre> public class ExampleService extends Service { int mStartMode; // indicates how to behave if the service is killed @@ -804,6 +795,12 @@ public class ExampleService extends Service { <p class="note"><strong>Note:</strong> Unlike the activity lifecycle callback methods, you are <em>not</em> required to call the superclass implementation of these callback methods.</p> +<img src="{@docRoot}images/service_lifecycle.png" alt="" /> +<p class="img-caption"><strong>Figure 2.</strong> The service lifecycle. The diagram on the left +shows the lifecycle when the service is created with {@link android.content.Context#startService +startService()} and the diagram on the right shows the lifecycle when the service is created +with {@link android.content.Context#bindService bindService()}.</p> + <p>By implementing these methods, you can monitor two nested loops of the service's lifecycle: </p> <ul> diff --git a/docs/html/guide/webapps/targeting.jd b/docs/html/guide/webapps/targeting.jd index 46f769c..7410202 100644 --- a/docs/html/guide/webapps/targeting.jd +++ b/docs/html/guide/webapps/targeting.jd @@ -270,7 +270,7 @@ density.</p> <p>The density of a device's screen is based on the screen resolution, as defined by the number of dots per inch (dpi). There are three screen -density categories supported by Android: low (ldpi), medium (mdpi), and high (mdpi). A screen +density categories supported by Android: low (ldpi), medium (mdpi), and high (hdpi). A screen with low density has fewer available pixels per inch, whereas a screen with high density has more pixels per inch (compared to a medium density screen). The Android Browser and {@link android.webkit.WebView} target a medium density screen by default.</p> |