Add the battery information into device details header
Add the new LE audio header Add the battery information Update the condition for non-LE audio header Bug: 218626547 Test: build pass and manualy test Change-Id: Ib9f4c388c369dc374c43dd399111e02b5555159b
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.android.settings.bluetooth;
|
||||
|
||||
import android.bluetooth.BluetoothProfile;
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
@@ -53,7 +54,10 @@ public class BluetoothDetailsHeaderController extends BluetoothDetailsController
|
||||
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
return !Utils.isAdvancedDetailsHeader(mCachedDevice.getDevice());
|
||||
boolean hasLeAudio = mCachedDevice.getConnectableProfiles()
|
||||
.stream()
|
||||
.anyMatch(profile -> profile.getProfileId() == BluetoothProfile.LE_AUDIO);
|
||||
return !Utils.isAdvancedDetailsHeader(mCachedDevice.getDevice()) && !hasLeAudio;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user