TWS_AVRCP: Do not retry SHO between TWS+ pair

If setActiveDevice returns false between TWS+ pair, ignore sho
retry. Fix for avrcp setting active device as null when sho
pair is active.

Change-Id: I9191b21295506923111114a91bd48d05b21a0a89
diff --git a/packages_apps_bluetooth_ext/src/avrcp/Avrcp_ext.java b/packages_apps_bluetooth_ext/src/avrcp/Avrcp_ext.java
index a5ed990..4bdfea4 100644
--- a/packages_apps_bluetooth_ext/src/avrcp/Avrcp_ext.java
+++ b/packages_apps_bluetooth_ext/src/avrcp/Avrcp_ext.java
@@ -4963,6 +4963,15 @@
         boolean ret = mA2dpService.startSHO(device);
         if(!ret) {
             isShoActive = false;
+            if (device.isTwsPlusDevice()) {
+                BluetoothDevice activeDevice = mA2dpService.getActiveDevice();
+                if (activeDevice != null &&
+                    isTwsPlusPair(device, activeDevice)) {
+                    Log.e(TAG,"TWS+ switch ignored, do not retry sho");
+                    CompleteSHO();
+                    return ret;
+                }
+            }
             mHandler.removeMessages(MESSAGE_START_SHO);
             triggerSHO(device, PlayReq, true);
         }