Fix the title of the input method subtype enabler
Bug: 5097548 Change-Id: If01e13bd1ab7ac851b613450018f68f7f42f1e14
This commit is contained in:
@@ -49,6 +49,7 @@ public class InputMethodAndSubtypeEnabler extends SettingsPreferenceFragment {
|
|||||||
private InputMethodManager mImm;
|
private InputMethodManager mImm;
|
||||||
private List<InputMethodInfo> mInputMethodProperties;
|
private List<InputMethodInfo> mInputMethodProperties;
|
||||||
private String mInputMethodId;
|
private String mInputMethodId;
|
||||||
|
private String mTitle;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle icicle) {
|
public void onCreate(Bundle icicle) {
|
||||||
@@ -71,20 +72,26 @@ public class InputMethodAndSubtypeEnabler extends SettingsPreferenceFragment {
|
|||||||
mInputMethodId = inputMethodId;
|
mInputMethodId = inputMethodId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CharSequence title = getActivity().getIntent().getStringExtra(
|
mTitle = getActivity().getIntent().getStringExtra(Intent.EXTRA_TITLE);
|
||||||
Intent.EXTRA_TITLE);
|
if (mTitle == null && (arguments != null)) {
|
||||||
if (title == null && (arguments != null)) {
|
final String title = arguments.getString(Intent.EXTRA_TITLE);
|
||||||
title = arguments.getString(Intent.EXTRA_TITLE);
|
if (title != null) {
|
||||||
}
|
mTitle = title;
|
||||||
|
}
|
||||||
if (!TextUtils.isEmpty(title)) {
|
|
||||||
getActivity().setTitle(title);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onCreateIMM();
|
onCreateIMM();
|
||||||
setPreferenceScreen(createPreferenceHierarchy());
|
setPreferenceScreen(createPreferenceHierarchy());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityCreated(Bundle icicle) {
|
||||||
|
super.onActivityCreated(icicle);
|
||||||
|
if (!TextUtils.isEmpty(mTitle)) {
|
||||||
|
getActivity().setTitle(mTitle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
Reference in New Issue
Block a user