Add device name preference in pairing page
Also refactor the preference controller 1. Extend from BasePreferenceController. 2. pass in the preference key. Then it could be reused in different places with different key. Bug: 69333961 Test: Screenshot | RunSettingsRoboTests Change-Id: I773ca022baa326481045c1659565c9a21111200a
This commit is contained in:
@@ -73,6 +73,7 @@ public class BluetoothSettings extends DeviceListPreferenceFragment implements I
|
||||
static final String KEY_PAIRED_DEVICES = "paired_devices";
|
||||
@VisibleForTesting
|
||||
static final String KEY_FOOTER_PREF = "footer_preference";
|
||||
private static final String KEY_RENAME_DEVICES = "bt_rename_device";
|
||||
|
||||
@VisibleForTesting
|
||||
PreferenceGroup mPairedDevicesCategory;
|
||||
@@ -369,7 +370,9 @@ public class BluetoothSettings extends DeviceListPreferenceFragment implements I
|
||||
controllers.add(mDeviceNamePrefController);
|
||||
controllers.add(mPairingPrefController);
|
||||
controllers.add(new BluetoothFilesPreferenceController(context));
|
||||
controllers.add(new BluetoothDeviceRenamePreferenceController(context, this, lifecycle));
|
||||
controllers.add(
|
||||
new BluetoothDeviceRenamePreferenceController(context, KEY_RENAME_DEVICES, this,
|
||||
lifecycle));
|
||||
|
||||
return controllers;
|
||||
}
|
||||
|
Reference in New Issue
Block a user