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
Loading
Please register or sign in to comment