Merge "Reset priority on unbond" into jb-mr1-dev
diff --git a/core/java/android/bluetooth/BluetoothA2dp.java b/core/java/android/bluetooth/BluetoothA2dp.java
index 74f634b..1b415e5 100755
--- a/core/java/android/bluetooth/BluetoothA2dp.java
+++ b/core/java/android/bluetooth/BluetoothA2dp.java
@@ -338,6 +338,7 @@
             && isValidDevice(device)) {
             if (priority != BluetoothProfile.PRIORITY_OFF &&
                 priority != BluetoothProfile.PRIORITY_ON &&
+                priority != BluetoothProfile.PRIORITY_UNDEFINED &&
                 priority != BluetoothProfile.PRIORITY_AUTO_CONNECT) {
               return false;
             }
diff --git a/core/java/android/bluetooth/BluetoothHeadset.java b/core/java/android/bluetooth/BluetoothHeadset.java
index 75dfe9d..8e6ebaf 100755
--- a/core/java/android/bluetooth/BluetoothHeadset.java
+++ b/core/java/android/bluetooth/BluetoothHeadset.java
@@ -456,6 +456,7 @@
             isValidDevice(device)) {
             if (priority != BluetoothProfile.PRIORITY_OFF &&
                 priority != BluetoothProfile.PRIORITY_ON &&
+                priority != BluetoothProfile.PRIORITY_UNDEFINED &&
                 priority != BluetoothProfile.PRIORITY_AUTO_CONNECT) {
               return false;
             }