Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 127f881f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Bluetooth:Send Connection request after Connection Failure."

parents 9b411b1c ccd95ee3
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -1188,13 +1188,18 @@ public class AdapterService extends Service {
                }
            }
        }
       // This change makes sure that we try to re-connect
       // the profile if its connection failed and priority
       // for desired profile is ON.

        if((hfConnDevList.isEmpty()) && a2dpConnected &&
            (hsService.getPriority(device) >= BluetoothProfile.PRIORITY_ON)){
        if((hfConnDevList.isEmpty()) &&
            (hsService.getPriority(device) >= BluetoothProfile.PRIORITY_ON) &&
            (a2dpConnected || (a2dpService.getPriority(device) == BluetoothProfile.PRIORITY_OFF))) {
            hsService.connect(device);
        }
        else if((a2dpConnDevList.isEmpty()) && hsConnected &&
            (a2dpService.getPriority(device) >= BluetoothProfile.PRIORITY_ON)){
        else if((a2dpConnDevList.isEmpty()) &&
            (a2dpService.getPriority(device) >= BluetoothProfile.PRIORITY_ON) &&
            (hsConnected || (hsService.getPriority(device) == BluetoothProfile.PRIORITY_OFF))) {
            a2dpService.connect(device);
        }
    }