From 6f77c70877bd13e32baecec03b7a469f491a3a6d Mon Sep 17 00:00:00 2001 From: Fabrice Di Meglio Date: Wed, 5 Feb 2014 15:13:46 -0800 Subject: [PATCH] Fix bug #12898564 Settings Crash on Renaming the device. - remove the call to PreferencesActivity as we are no more using the PreferencesActivity Also set correct activity title with the new selected BT name for the device. Change-Id: I03497187e0410ff2bba87bdb04a197938d1ea967 --- .../settings/bluetooth/BluetoothNameDialogFragment.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java b/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java index 0af9c4ed7c4..bf0356c3147 100644 --- a/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java +++ b/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java @@ -26,7 +26,6 @@ import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; -import android.preference.PreferenceActivity; import android.text.Editable; import android.text.InputFilter; import android.text.TextWatcher; @@ -179,9 +178,8 @@ public final class BluetoothNameDialogFragment extends DialogFragment implements mDeviceNameUpdated = true; mDeviceNameEdited = false; mDeviceNameView.setText(mLocalAdapter.getName()); + getActivity().setTitle(mLocalAdapter.getName()); } - PreferenceActivity activity = (PreferenceActivity)getActivity(); - activity.showBreadCrumbs(mLocalAdapter.getName(), ""); } public void afterTextChanged(Editable s) {