diff options
author | Scott Main <smain@google.com> | 2012-08-09 11:49:50 -0700 |
---|---|---|
committer | Scott Main <smain@google.com> | 2012-08-09 16:38:12 -0700 |
commit | cb0b2df11464b1035ded39a06722242ee6c595b4 (patch) | |
tree | ec77021f6dc56230ed4d01174be05d0ac86e48cb /docs/html/guide/components | |
parent | 2f8cc17f5fbc2e05ac0889fbbddf4e530750087b (diff) | |
download | frameworks_base-cb0b2df11464b1035ded39a06722242ee6c595b4.zip frameworks_base-cb0b2df11464b1035ded39a06722242ee6c595b4.tar.gz frameworks_base-cb0b2df11464b1035ded39a06722242ee6c595b4.tar.bz2 |
fix misc doc bugs from external issues
Change-Id: I11b1d524dd2159b58c65d3ef7a76af15624ae365
Diffstat (limited to 'docs/html/guide/components')
-rw-r--r-- | docs/html/guide/components/bound-services.jd | 12 | ||||
-rw-r--r-- | docs/html/guide/components/services.jd | 15 |
2 files changed, 12 insertions, 15 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> |