audio policy: change default in call routing for line out device

Current strategy is to use LINE OUT for calls only when speaker phone mode
is enabled.
This creates confusion because most users don't understand why the behavior
differs between a headset and a line out.
Also the main use of a line out device for calls is when connected to a car kit
via an aux cable. In this case, you want to use the car kit by default without
having to touch your phone and select speaker phone.

Bug: 27548502

Change-Id: I3e8a540b91dc80516439a97dabc9641b95ce23a7
diff --git a/services/audiopolicy/enginedefault/src/Engine.cpp b/services/audiopolicy/enginedefault/src/Engine.cpp
index 43664e6..1d2727e 100755
--- a/services/audiopolicy/enginedefault/src/Engine.cpp
+++ b/services/audiopolicy/enginedefault/src/Engine.cpp
@@ -350,6 +350,8 @@
             if (device) break;
             device = availableOutputDevicesType & AUDIO_DEVICE_OUT_WIRED_HEADSET;
             if (device) break;
+            device = availableOutputDevicesType & AUDIO_DEVICE_OUT_LINE;
+            if (device) break;
             device = availableOutputDevicesType & AUDIO_DEVICE_OUT_USB_DEVICE;
             if (device) break;
             if (!isInCall()) {
@@ -391,8 +393,6 @@
                 device = availableOutputDevicesType & AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET;
                 if (device) break;
             }
-            device = availableOutputDevicesType & AUDIO_DEVICE_OUT_LINE;
-            if (device) break;
             device = availableOutputDevicesType & AUDIO_DEVICE_OUT_SPEAKER;
             if (device) break;
             device = mApmObserver->getDefaultOutputDevice()->type();