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

Commit 0a80b6a3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix the device summary shown twice issue"

parents 98ff8ecd cd5a8483
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -139,14 +139,14 @@ public class CachedBluetoothDeviceManager {
     */
    public synchronized String getSubDeviceSummary(CachedBluetoothDevice device) {
        final Set<CachedBluetoothDevice> memberDevices = device.getMemberDevice();
        if (memberDevices != null) {
        // TODO: check the CSIP group size instead of the real member device set size, and adjust
        // the size restriction.
        if (memberDevices.size() == 1) {
            for (CachedBluetoothDevice memberDevice : memberDevices) {
                if (!memberDevice.isConnected()) {
                    return null;
                if (memberDevice.isConnected()) {
                    return memberDevice.getConnectionSummary();
                }
            }

            return device.getConnectionSummary();
        }
        CachedBluetoothDevice subDevice = device.getSubDevice();
        if (subDevice != null && subDevice.isConnected()) {