Fix FLAG_BEACON regression

Fix regression where FLAG_BEACON is not honored anymore in terms
 of routing and muting behavior
When converting from AudioAttributes to stream types, also look
 at FLAG_BEACON for mapping to STREAM_TTS

Bug 19185342

Change-Id: I5871c1b94480ae3da544aef99ea9ab4dff97443d
diff --git a/services/audiopolicy/AudioPolicyManager.cpp b/services/audiopolicy/AudioPolicyManager.cpp
index 0349327..34a691d 100644
--- a/services/audiopolicy/AudioPolicyManager.cpp
+++ b/services/audiopolicy/AudioPolicyManager.cpp
@@ -7975,6 +7975,9 @@
     if ((attr->flags & AUDIO_FLAG_SCO) == AUDIO_FLAG_SCO) {
         return AUDIO_STREAM_BLUETOOTH_SCO;
     }
+    if ((attr->flags & AUDIO_FLAG_BEACON) == AUDIO_FLAG_BEACON) {
+        return AUDIO_STREAM_TTS;
+    }
 
     // usage to stream type mapping
     switch (attr->usage) {