Don't show footer for headset when bonding loss
Test: local tested Flag: EXEMPT minor fix Bug: 380801155 Change-Id: I5bb1bbcb08723a5ac5c8b82d2428df7a7f3e275d
This commit is contained in:
@@ -60,6 +60,8 @@ import com.android.settingslib.core.AbstractPreferenceController;
|
||||
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
|
||||
import com.android.settingslib.core.lifecycle.Lifecycle;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
@@ -417,13 +419,17 @@ public class BluetoothDeviceDetailsFragment extends BluetoothDetailsConfigurable
|
||||
@Nullable
|
||||
private List<String> generateDisplayedPreferenceKeys(boolean bondingLoss) {
|
||||
if (bondingLoss) {
|
||||
return List.of(
|
||||
use(BluetoothDetailsBannerController.class).getPreferenceKey(),
|
||||
use(AdvancedBluetoothDetailsHeaderController.class).getPreferenceKey(),
|
||||
use(BluetoothDetailsHeaderController.class).getPreferenceKey(),
|
||||
use(LeAudioBluetoothDetailsHeaderController.class).getPreferenceKey(),
|
||||
use(BluetoothDetailsButtonsController.class).getPreferenceKey(),
|
||||
use(BluetoothDetailsMacAddressController.class).getPreferenceKey());
|
||||
ImmutableList.Builder<String> visibleKeys = new ImmutableList.Builder<>();
|
||||
visibleKeys
|
||||
.add(use(BluetoothDetailsBannerController.class).getPreferenceKey())
|
||||
.add(use(AdvancedBluetoothDetailsHeaderController.class).getPreferenceKey())
|
||||
.add(use(BluetoothDetailsHeaderController.class).getPreferenceKey())
|
||||
.add(use(LeAudioBluetoothDetailsHeaderController.class).getPreferenceKey())
|
||||
.add(use(BluetoothDetailsButtonsController.class).getPreferenceKey());
|
||||
if (!BluetoothUtils.isHeadset(mCachedDevice.getDevice())) {
|
||||
visibleKeys.add(use(BluetoothDetailsMacAddressController.class).getPreferenceKey());
|
||||
}
|
||||
return visibleKeys.build();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user