Skip to content
Commit 5d73b6d7 authored by Christopher Tate's avatar Christopher Tate
Browse files

Introduce ServiceConnection#onNullBinding()

Historically, if a service returns null from onBind(), the binding app
gets no information about the outcome:  the ServiceConnection is never
invoked.  We now introduce a new connection callback, onNullBinding(),
for apps that need to detect this situation.  When the service rejects
the binding by returning null, the onNullBinding() callback in the
associated ServiceConnection is invoked instead of onServiceConnected().

onNullBinding() has an empty default implementation, so there is no
binary-compatibility impact of this new interface method.

Bug: 67377345
Test: atest android.app.cts.ServiceTest

Change-Id: I224512c118f7d6e5c1c2bb69eca1902882e73594
parent 2f919ef8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment