OSDN Git Service

HFP: Do not return NULL when the HDP interface is unavailable
authorArnav Gupta <championswimmer@gmail.com>
Wed, 10 Feb 2016 00:27:49 +0000 (05:57 +0530)
committerAndre Eisenbach <eisenbach@google.com>
Tue, 16 Feb 2016 19:03:05 +0000 (11:03 -0800)
commit8afb72f1d01ce2d88db28657a2fd7ffd3a44ab16
treef8bf015addf4ca54a16b88b9f6806a2ff928b7d3
parente441f165fb7593e9536aab1e337811b7e16368c3
HFP: Do not return NULL when the HDP interface is unavailable

We're not supposed to return a NULL from a a function returning an int
value. And indeed the calling Java code does not have a NPE check either.

If an HDP interface is not avaialable, send -1 which the Java code
correctly assumes as a failure to register the health app.

Change-Id: I5ac7dc6f9acc9fefae8d1d2233453448c3ba79bc
Signed-off-by: Arnav Gupta <championswimmer@gmail.com>
jni/com_android_bluetooth_hdp.cpp