From 2b0351137757fc21820b520fccf5b9283d7deea6 Mon Sep 17 00:00:00 2001 From: Andrew Solovay Date: Fri, 7 Apr 2017 15:38:33 -0700 Subject: [PATCH] doc: Add note to Context.bindService() Per email from Dianne H, even if bindService() returns false, the client should still call unbindService() to release the connection. Doc is staged to: http://go/dac-stage/reference/android/content/Context.html#bindService(android.content.Intent,%20android.content.ServiceConnection,%20int) Bug: 37092557 Test: make ds-docs Change-Id: I5849aaccec933ee7660b31241e4d8eff9ee1ef72 --- core/java/android/content/Context.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index 88bade1691a6d..63757755aeddb 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -2745,7 +2745,8 @@ public abstract class Context { * {@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. + * receive the service object. However, you should still 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.