[Temp bonding] Hide rename button from device details page for temp bond device

Test: com.android.settings.bluetooth.AdvancedBluetoothDetailsHeaderControllerTest
Bug: 362859132
Flag: com.android.settingslib.flags.enable_temporary_bond_devices_ui
Change-Id: I22d54c322029c606425c8f48b091ad1b53e100de
This commit is contained in:
Ze Li
2025-01-07 14:38:04 +08:00
parent 0f6baa17c2
commit 205c81ed3a
4 changed files with 39 additions and 11 deletions

View File

@@ -331,7 +331,9 @@ public class AdvancedBluetoothDetailsHeaderController extends BasePreferenceCont
MAIN_DEVICE_ID);
}
});
if (Flags.enableBluetoothDeviceDetailsPolish()) {
boolean isTempBond = com.android.settingslib.flags.Flags.enableTemporaryBondDevicesUi()
&& BluetoothUtils.isTemporaryBondDevice(mCachedDevice.getDevice());
if (Flags.enableBluetoothDeviceDetailsPolish() && !isTempBond) {
ImageButton renameButton = mLayoutPreference.findViewById(R.id.rename_button);
renameButton.setVisibility(View.VISIBLE);
renameButton.setOnClickListener(view -> {