Revert "docs: Revised descriptions of binding and connecting to services."

This reverts commit 34acbc9bf9.

Reason for revert: You must always call unbindService() after
bindService(), regardless of the return value for bindService();
see https://groups.google.com/a/google.com/g/android-chatty-eng/c/reDuVZl9Tcs/m/ux52rVvoAQAJ

Bug: 37092557

Test: m ds-docs-java

Change-Id: Ie4461b9a3b64ed3fb6f32e3cb71b57976e8da90f
This commit is contained in:
Kevin Hufnagle
2021-09-23 20:44:49 +00:00
parent e6976d2672
commit 772014d2f9

View File

@@ -3483,9 +3483,8 @@ public abstract class Context {
* @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.
* have permission to bind to it. You should call {@link #unbindService}
* to release the connection even if this method returned {@code false}.
*
* @throws SecurityException If the caller does not have permission to access the service
* or the service can not be found.