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:
@@ -37,7 +37,6 @@ import com.android.settingslib.bluetooth.LocalBluetoothAdapter;
|
||||
import com.android.settingslib.bluetooth.LocalBluetoothManager;
|
||||
import com.android.settingslib.core.lifecycle.Lifecycle;
|
||||
import com.android.settingslib.core.lifecycle.LifecycleObserver;
|
||||
import com.android.settingslib.core.lifecycle.events.OnResume;
|
||||
import com.android.settingslib.core.lifecycle.events.OnStart;
|
||||
import com.android.settingslib.core.lifecycle.events.OnStop;
|
||||
|
||||
@@ -111,7 +110,8 @@ public class BluetoothDeviceNamePreferenceController extends PreferenceControlle
|
||||
@Override
|
||||
public boolean handlePreferenceTreeClick(Preference preference) {
|
||||
if (KEY_DEVICE_NAME.equals(preference.getKey())) {
|
||||
new BluetoothNameDialogFragment().show(mFragment.getFragmentManager(), "rename device");
|
||||
LocalDeviceNameDialogFragment.newInstance()
|
||||
.show(mFragment.getFragmentManager(), LocalDeviceNameDialogFragment.TAG);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user