audio policy: fix commit dea1541f

Fix return types in early returns added by
commit dea1541f in AudioPolicy binder call methods.

Also fix former similar mistakes found nearby.

Bug: 18001784.
Bug: 18002005.

Change-Id: I088c6029ca04e2c2c2f78e560c9cb6b9576dd88f
diff --git a/services/audiopolicy/AudioPolicyInterfaceImplLegacy.cpp b/services/audiopolicy/AudioPolicyInterfaceImplLegacy.cpp
index 3700246..09476c1 100644
--- a/services/audiopolicy/AudioPolicyInterfaceImplLegacy.cpp
+++ b/services/audiopolicy/AudioPolicyInterfaceImplLegacy.cpp
@@ -135,10 +135,10 @@
                                     const audio_offload_info_t *offloadInfo)
 {
     if (uint32_t(stream) >= AUDIO_STREAM_CNT) {
-        return BAD_VALUE;
+        return AUDIO_IO_HANDLE_NONE;
     }
     if (mpAudioPolicy == NULL) {
-        return 0;
+        return AUDIO_IO_HANDLE_NONE;
     }
     ALOGV("getOutput()");
     Mutex::Autolock _l(mLock);
@@ -380,7 +380,7 @@
 uint32_t AudioPolicyService::getStrategyForStream(audio_stream_type_t stream)
 {
     if (uint32_t(stream) >= AUDIO_STREAM_CNT) {
-        return BAD_VALUE;
+        return 0;
     }
     if (mpAudioPolicy == NULL) {
         return 0;
@@ -393,10 +393,10 @@
 audio_devices_t AudioPolicyService::getDevicesForStream(audio_stream_type_t stream)
 {
     if (uint32_t(stream) >= AUDIO_STREAM_CNT) {
-        return BAD_VALUE;
+        return AUDIO_DEVICE_NONE;
     }
     if (mpAudioPolicy == NULL) {
-        return (audio_devices_t)0;
+        return AUDIO_DEVICE_NONE;
     }
     return mpAudioPolicy->get_devices_for_stream(mpAudioPolicy, stream);
 }
@@ -442,10 +442,10 @@
 bool AudioPolicyService::isStreamActive(audio_stream_type_t stream, uint32_t inPastMs) const
 {
     if (uint32_t(stream) >= AUDIO_STREAM_CNT) {
-        return BAD_VALUE;
+        return false;
     }
     if (mpAudioPolicy == NULL) {
-        return 0;
+        return false;
     }
     Mutex::Autolock _l(mLock);
     return mpAudioPolicy->is_stream_active(mpAudioPolicy, stream, inPastMs);
@@ -454,10 +454,10 @@
 bool AudioPolicyService::isStreamActiveRemotely(audio_stream_type_t stream, uint32_t inPastMs) const
 {
     if (uint32_t(stream) >= AUDIO_STREAM_CNT) {
-        return BAD_VALUE;
+        return false;
     }
     if (mpAudioPolicy == NULL) {
-        return 0;
+        return false;
     }
     Mutex::Autolock _l(mLock);
     return mpAudioPolicy->is_stream_active_remotely(mpAudioPolicy, stream, inPastMs);