Add a rename dialog for paired Bluetooth devices

This adds an icon to the paired device details page which users can
click on to bring up a dialog for changing the display name for that
device.

We already had a dialog for changing the advertised name of the local
Bluetooth adapter that's used on the main Bluetooth settings page, so
I've made that abstract and created two new subclasses to encapsulate
the slight differences for this use case.

Bug: 62535241
Test: make RunSettingsRoboTests
Change-Id: I1c407f276e12aedf066a336e24b4ccd16d67c4df
This commit is contained in:
Antony Sargent
2017-06-16 13:17:39 -07:00
parent 6dfafa5d95
commit 843c3ead6d
8 changed files with 516 additions and 79 deletions

View File

@@ -316,7 +316,6 @@ public class BluetoothSettings extends DeviceListPreferenceFragment implements I
// New version - uses a separate screen.
args.putString(BluetoothDeviceDetailsFragment.KEY_DEVICE_ADDRESS,
device.getDevice().getAddress());
BluetoothDeviceDetailsFragment fragment = new BluetoothDeviceDetailsFragment();
final SettingsActivity activity =
(SettingsActivity) BluetoothSettings.this.getActivity();
activity.startPreferencePanel(this,