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
diff --git a/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java b/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java
index 0af9c4e..bf0356c 100644
--- a/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java
+++ b/src/com/android/settings/bluetooth/BluetoothNameDialogFragment.java
@@ -26,7 +26,6 @@
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 @@
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) {