diff options
author | 2018-01-09 23:44:04 +0000 | |
---|---|---|
committer | 2018-01-09 23:44:04 +0000 | |
commit | 800e061359b2bc1e9f4f15939bf23942cd0a3c88 (patch) | |
tree | 5ab3148e855ce79b394cb8520f7d2872b077ce8f | |
parent | 3a8be1ae39b63eb58236ba8df248fe270ac2f4ed (diff) | |
parent | d195a9972be1a5f57ecd829e99b8e32519cd19c3 (diff) |
Merged-In: I0906de76abf4124d74f7f4f80ac0eab3cbf94f7e docs: Revised descriptions of binding and connecting to services.
am: d195a9972b
Change-Id: I7a59a3b8c18492961aea7f480276a401ab8bb6ae
-rw-r--r-- | core/java/android/content/Context.java | 10 | ||||
-rw-r--r-- | core/java/android/content/ServiceConnection.java | 5 |
2 files changed, 11 insertions, 4 deletions
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index 9af2828ab460..0d4fa16cfdf5 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -2825,10 +2825,12 @@ public abstract class Context { * {@link #BIND_NOT_FOREGROUND}, {@link #BIND_ABOVE_CLIENT}, * {@link #BIND_ALLOW_OOM_MANAGEMENT}, or * {@link #BIND_WAIVE_PRIORITY}. - * @return If you have successfully bound to the service, {@code true} is returned; - * {@code false} is returned if the connection is not made so you will not - * receive the service object. However, you should still call - * {@link #unbindService} to release the connection. + * @return {@code true} if the system is in the process of bringing up a + * service that your client has permission to bind to; {@code false} + * if the system couldn't find the service or if your client doesn't + * have permission to bind to it. If this value is {@code true}, you + * should later call {@link #unbindService} to release the + * connection. * * @throws SecurityException If the caller does not have permission to access the service * or the service can not be found. diff --git a/core/java/android/content/ServiceConnection.java b/core/java/android/content/ServiceConnection.java index 6ff4900212ff..cf8bd41935ad 100644 --- a/core/java/android/content/ServiceConnection.java +++ b/core/java/android/content/ServiceConnection.java @@ -31,6 +31,11 @@ public interface ServiceConnection { * the {@link android.os.IBinder} of the communication channel to the * Service. * + * <p class="note"><b>Note:</b> If the system has started to bind your + * client app to a service, it's possible that your app will never receive + * this callback. Your app won't receive a callback if there's an issue with + * the service, such as the service crashing while being created. + * * @param name The concrete component name of the service that has * been connected. * |