// Path: app/src/main/java/com/vlath/keyboard/latin/utils/FragmentUtils.java
// public class FragmentUtils {
//     private static final HashSet<String> sLatinImeFragments = new HashSet<>();
//     static {
//         sLatinImeFragments.add(PreferencesSettingsFragment.class.getName());
//         sLatinImeFragments.add(ThemeSettingsFragment.class.getName());
//         sLatinImeFragments.add(CustomInputStyleSettingsFragment.class.getName());
//         sLatinImeFragments.add(SettingsFragment.class.getName());
//     }
// 
//     public static boolean isValidFragment(String fragmentName) {
//         return sLatinImeFragments.contains(fragmentName);
//     }
// }


import android.app.ActionBar;
import android.content.Intent;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.view.MenuItem;
import com.vlath.keyboard.latin.utils.FragmentUtils;
        final Intent intent = getIntent();
        if (actionBar != null) {
            mShowHomeAsUp = intent.getBooleanExtra(EXTRA_SHOW_HOME_AS_UP, true);
            actionBar.setDisplayHomeAsUpEnabled(mShowHomeAsUp);
            actionBar.setHomeButtonEnabled(mShowHomeAsUp);
        }
    }

    @Override
    public boolean onOptionsItemSelected(final MenuItem item) {
        if (mShowHomeAsUp && item.getItemId() == android.R.id.home) {
            finish();
            return true;
        }
        return super.onOptionsItemSelected(item);
    }

    @Override
    public Intent getIntent() {
        final Intent intent = super.getIntent();
        final String fragment = intent.getStringExtra(EXTRA_SHOW_FRAGMENT);
        if (fragment == null) {
            intent.putExtra(EXTRA_SHOW_FRAGMENT, DEFAULT_FRAGMENT);
        }
        intent.putExtra(EXTRA_NO_HEADERS, true);
        return intent;
    }

    @Override
    public boolean isValidFragment(final String fragmentName) {
// Path: app/src/main/java/com/vlath/keyboard/latin/utils/FragmentUtils.java
// public class FragmentUtils {
//     private static final HashSet<String> sLatinImeFragments = new HashSet<>();
//     static {
//         sLatinImeFragments.add(PreferencesSettingsFragment.class.getName());
//         sLatinImeFragments.add(ThemeSettingsFragment.class.getName());
//         sLatinImeFragments.add(CustomInputStyleSettingsFragment.class.getName());
//         sLatinImeFragments.add(SettingsFragment.class.getName());
//     }
// 
//     public static boolean isValidFragment(String fragmentName) {
//         return sLatinImeFragments.contains(fragmentName);
//     }
// }


// Path: app/src/main/java/com/vlath/keyboard/latin/settings/SettingsActivity.java
import android.app.ActionBar;
import android.content.Intent;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.view.MenuItem;
import com.vlath.keyboard.latin.utils.FragmentUtils;

        final Intent intent = getIntent();
        if (actionBar != null) {
            mShowHomeAsUp = intent.getBooleanExtra(EXTRA_SHOW_HOME_AS_UP, true);
            actionBar.setDisplayHomeAsUpEnabled(mShowHomeAsUp);
            actionBar.setHomeButtonEnabled(mShowHomeAsUp);
        }
    }

    @Override
    public boolean onOptionsItemSelected(final MenuItem item) {
        if (mShowHomeAsUp && item.getItemId() == android.R.id.home) {
            finish();
            return true;
        }
        return super.onOptionsItemSelected(item);
    }

    @Override
    public Intent getIntent() {
        final Intent intent = super.getIntent();
        final String fragment = intent.getStringExtra(EXTRA_SHOW_FRAGMENT);
        if (fragment == null) {
            intent.putExtra(EXTRA_SHOW_FRAGMENT, DEFAULT_FRAGMENT);
        }
        intent.putExtra(EXTRA_NO_HEADERS, true);
        return intent;
    }

    @Override
    public boolean isValidFragment(final String fragmentName) {
        return FragmentUtils.isValidFragment(fragmentName);