Move rename button next to the device name

BUG: 343317785
Test: atest GeneralBluetoothDetailsHeaderControllerTest
Flag: com.android.settings.flags.enable_bluetooth_device_details_polish
Change-Id: I87f030ca48d3edac13759fe51499b7e400dbb795
This commit is contained in:
Haijie Hong
2024-08-11 18:40:14 +08:00
parent f56a1bccba
commit c2ed6d3242
11 changed files with 507 additions and 20 deletions

View File

@@ -26,6 +26,7 @@ import androidx.preference.PreferenceFragmentCompat;
import androidx.preference.PreferenceScreen;
import com.android.settings.R;
import com.android.settings.flags.Flags;
import com.android.settings.widget.EntityHeaderController;
import com.android.settingslib.bluetooth.BluetoothUtils;
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
@@ -47,6 +48,9 @@ public class BluetoothDetailsHeaderController extends BluetoothDetailsController
@Override
public boolean isAvailable() {
if (Flags.enableBluetoothDeviceDetailsPolish()) {
return false;
}
boolean hasLeAudio = mCachedDevice.getUiAccessibleProfiles()
.stream()
.anyMatch(profile -> profile.getProfileId() == BluetoothProfile.LE_AUDIO);