BT: Prefer LDAC over aptX family

Also rename priority key of aptX adaptive r2 to avoid confusion

Change-Id: I490df42ff1d2dd58ca1d9b4f0867814de2a13caa
diff --git a/res/values/config.xml b/res/values/config.xml
index 7236b2f..4ed9265 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -92,17 +92,12 @@
          value should be unique. -->
     <integer name="a2dp_source_codec_priority_sbc">1001</integer>
     <integer name="a2dp_source_codec_priority_aac">2001</integer>
-    <integer name="a2dp_source_codec_priority_ldac">3001</integer>
     <integer name="a2dp_source_codec_priority_aptx">4001</integer>
     <integer name="a2dp_source_codec_priority_aptx_hd">5001</integer>
     <integer name="a2dp_source_codec_priority_aptx_adaptive">6001</integer>
     <integer name="a2dp_source_codec_priority_aptx_tws">7001</integer>
-    <!-- max priority is used to dynamically increase the priority
-         of codecs(mainly Aptx Adaptive) to highest value based
-         on config
-         Value of a2dp_source_codec_priority_max should be set to
-         1000 + priority of codec with highest priority-->
-    <integer name="a2dp_source_codec_priority_max">8001</integer>
+    <integer name="a2dp_source_codec_priority_aptx_adaptive_r2">8001</integer>
+    <integer name="a2dp_source_codec_priority_ldac">9001</integer>
 
     <!-- Package that is responsible for user interaction on pairing request,
          success or cancel.
diff --git a/src/com/android/bluetooth/a2dp/A2dpCodecConfig.java b/src/com/android/bluetooth/a2dp/A2dpCodecConfig.java
index f6d42ea..84b77d0 100644
--- a/src/com/android/bluetooth/a2dp/A2dpCodecConfig.java
+++ b/src/com/android/bluetooth/a2dp/A2dpCodecConfig.java
@@ -218,7 +218,7 @@
                     if(a2dp_offload_cap.contains("aptxadaptiver2")) {
                         int aptxaa_r2_priority;
                         try {
-                            aptxaa_r2_priority = resources.getInteger(R.integer.a2dp_source_codec_priority_max);
+                            aptxaa_r2_priority = resources.getInteger(R.integer.a2dp_source_codec_priority_aptx_adaptive_r2);
                         } catch (NotFoundException e) {
                             aptxaa_r2_priority = value;
                         }