+1
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
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