Merge "Fix the device summary shown twice issue" am: 0a80b6a3bc am: 0f423ebc5e am: 1ae038a2c5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1842101 Change-Id: Iff3d90c9a20479bc2179f94c6b8b4ed1fb518a57
This commit is contained in:
@@ -139,14 +139,14 @@ public class CachedBluetoothDeviceManager {
|
|||||||
*/
|
*/
|
||||||
public synchronized String getSubDeviceSummary(CachedBluetoothDevice device) {
|
public synchronized String getSubDeviceSummary(CachedBluetoothDevice device) {
|
||||||
final Set<CachedBluetoothDevice> memberDevices = device.getMemberDevice();
|
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) {
|
for (CachedBluetoothDevice memberDevice : memberDevices) {
|
||||||
if (!memberDevice.isConnected()) {
|
if (memberDevice.isConnected()) {
|
||||||
return null;
|
return memberDevice.getConnectionSummary();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return device.getConnectionSummary();
|
|
||||||
}
|
}
|
||||||
CachedBluetoothDevice subDevice = device.getSubDevice();
|
CachedBluetoothDevice subDevice = device.getSubDevice();
|
||||||
if (subDevice != null && subDevice.isConnected()) {
|
if (subDevice != null && subDevice.isConnected()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user