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

Commit 5c8f886b authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix the device summary shown twice issue" am: 0a80b6a3 am: 0f423ebc...

Merge "Fix the device summary shown twice issue" am: 0a80b6a3 am: 0f423ebc am: 1ae038a2 am: 71f740a1

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1842101

Change-Id: I2086c5d854b326e8bdf21584b69d02321f9406a9
parents 8375a5df 71f740a1
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()) {