diff --git a/res/values/strings.xml b/res/values/strings.xml index 5b0950a5a93..d2a2f5dc315 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -264,9 +264,7 @@ Scan for devices - Rename tablet - - Rename phone + Rename this device Rename diff --git a/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java b/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java index bf0356c3147..b80e42ac03a 100644 --- a/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java +++ b/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java @@ -178,7 +178,6 @@ public final class BluetoothNameDialogFragment extends DialogFragment implements mDeviceNameUpdated = true; mDeviceNameEdited = false; mDeviceNameView.setText(mLocalAdapter.getName()); - getActivity().setTitle(mLocalAdapter.getName()); } } diff --git a/src/com/android/settings/bluetooth/BluetoothSettings.java b/src/com/android/settings/bluetooth/BluetoothSettings.java index 7441c8ca87f..4b278ac28a0 100755 --- a/src/com/android/settings/bluetooth/BluetoothSettings.java +++ b/src/com/android/settings/bluetooth/BluetoothSettings.java @@ -99,13 +99,14 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (action.equals(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED)) { - updateDeviceName(); + updateDeviceName(context); } } - private void updateDeviceName() { + private void updateDeviceName(Context context) { if (mLocalAdapter.isEnabled() && mMyDevicePreference != null) { - mMyDevicePreference.setTitle(mLocalAdapter.getName()); + mMyDevicePreference.setSummary(context.getResources().getString( + R.string.bluetooth_is_visible_message, mLocalAdapter.getName())); } } };