Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16c3e74d authored by satok's avatar satok
Browse files

Fix the title of the input method subtype enabler

Bug: 5097548
Change-Id: If01e13bd1ab7ac851b613450018f68f7f42f1e14
parent a550058e
Loading
Loading
Loading
Loading
+15 −8
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ public class InputMethodAndSubtypeEnabler extends SettingsPreferenceFragment {
    private InputMethodManager mImm;
    private List<InputMethodInfo> mInputMethodProperties;
    private String mInputMethodId;
    private String mTitle;

    @Override
    public void onCreate(Bundle icicle) {
@@ -71,20 +72,26 @@ public class InputMethodAndSubtypeEnabler extends SettingsPreferenceFragment {
                mInputMethodId = inputMethodId;
            }
        }
        CharSequence title = getActivity().getIntent().getStringExtra(
                Intent.EXTRA_TITLE);
        if (title == null && (arguments != null)) {
            title = arguments.getString(Intent.EXTRA_TITLE);
        mTitle = getActivity().getIntent().getStringExtra(Intent.EXTRA_TITLE);
        if (mTitle == null && (arguments != null)) {
            final String title = arguments.getString(Intent.EXTRA_TITLE);
            if (title != null) {
                mTitle = title;
            }

        if (!TextUtils.isEmpty(title)) {
            getActivity().setTitle(title);
        }

        onCreateIMM();
        setPreferenceScreen(createPreferenceHierarchy());
    }

    @Override
    public void onActivityCreated(Bundle icicle) {
        super.onActivityCreated(icicle);
        if (!TextUtils.isEmpty(mTitle)) {
            getActivity().setTitle(mTitle);
        }
    }

    @Override
    public void onResume() {
        super.onResume();