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
This commit is contained in:
Fabrice Di Meglio
2014-02-05 15:13:46 -08:00
parent 0cff0e4a51
commit 3b52963edf

View File

@@ -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) {