Add bluetooth visible item
Show "Visible as [Device name]". Also remove the menuitem for changing device name. This cl creates a preference controller to handle the logic for device name preference. Bug: 35876447 Test: RunSettingsRoboTests Change-Id: I9ab6c9d2df5b053d15b8ff887073ef82616243a4
This commit is contained in:
@@ -58,7 +58,7 @@ public final class BluetoothNameDialogFragment extends InstrumentedDialogFragmen
|
||||
|
||||
// accessed from inner class (not private to avoid thunks)
|
||||
static final String TAG = "BluetoothNameDialogFragment";
|
||||
final LocalBluetoothAdapter mLocalAdapter;
|
||||
LocalBluetoothAdapter mLocalAdapter;
|
||||
EditText mDeviceNameView;
|
||||
|
||||
// This flag is set when the name is updated by code, to distinguish from user changes
|
||||
@@ -85,16 +85,19 @@ public final class BluetoothNameDialogFragment extends InstrumentedDialogFragmen
|
||||
}
|
||||
};
|
||||
|
||||
public BluetoothNameDialogFragment() {
|
||||
LocalBluetoothManager localManager = Utils.getLocalBtManager(getActivity());
|
||||
mLocalAdapter = localManager.getBluetoothAdapter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsProto.MetricsEvent.DIALOG_BLUETOOTH_RENAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
LocalBluetoothManager localManager = Utils.getLocalBtManager(getActivity());
|
||||
mLocalAdapter = localManager.getBluetoothAdapter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
String deviceName = mLocalAdapter.getName();
|
||||
|
Reference in New Issue
Block a user