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

Commit 1ae038a2 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

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

Change-Id: Ic84b29e928cb3a57423f160bf2acc0a99e396073
parents dc3e0155 0f423ebc
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()) {