Resolve referencing for preferred audio routing

Minor fix to resolve referencing for obtaining the proper audio route
from the preferred audio routing strategy. Currently we are using the
AudioDeviceInfo type for referencing instead of the AudioRouteType. This
was causing issues when holding a call with the audio routed to speaker.
Once the call was unheld, the audio routed to earpiece because the audio
route was unable to be resolved for the audio type that was passed in.

Bug: 365155632
Test: Manual
Flag: com.android.server.telecom.flags.use_refactored_audio_route_switching
Change-Id: If9cd248bba2d21620f49eb21a7056ffac9818e9a
diff --git a/src/com/android/server/telecom/CallAudioRouteController.java b/src/com/android/server/telecom/CallAudioRouteController.java
index abee2a8..efd00f2 100644
--- a/src/com/android/server/telecom/CallAudioRouteController.java
+++ b/src/com/android/server/telecom/CallAudioRouteController.java
@@ -1110,8 +1110,7 @@
         if (BT_AUDIO_ROUTE_TYPES.contains(type)) {
             return getBluetoothRoute(type, deviceAttr.getAddress());
         } else {
-            return mTypeRoutes.get(deviceAttr.getType());
-
+            return mTypeRoutes.get(type);
         }
     }
 
@@ -1214,6 +1213,7 @@
 
     public AudioRoute getBaseRoute(boolean includeBluetooth, String btAddressToExclude) {
         AudioRoute destRoute = getPreferredAudioRouteFromStrategy();
+        Log.i(this, "getBaseRoute: preferred audio route is %s", destRoute);
         if (destRoute == null || (destRoute.getBluetoothAddress() != null && (!includeBluetooth
                 || destRoute.getBluetoothAddress().equals(btAddressToExclude)))) {
             destRoute = getPreferredAudioRouteFromDefault(includeBluetooth, btAddressToExclude);