Merge "Add a link from Latin IME to the dictionary pack."
This commit is contained in:
commit
bbda98dc3e
3 changed files with 22 additions and 0 deletions
|
@ -66,6 +66,9 @@
|
|||
<!-- Option to enable auto capitalization of sentences -->
|
||||
<string name="auto_cap">Auto-capitalization</string>
|
||||
|
||||
<!-- Option to configure dictionaries -->
|
||||
<string name="configure_dictionaries_title">Configure dictionaries</string>
|
||||
|
||||
<!-- Option to enable quick fixes -->
|
||||
<string name="quick_fixes">Quick fixes</string>
|
||||
<!-- Description for quick fixes -->
|
||||
|
|
|
@ -68,6 +68,14 @@
|
|||
<PreferenceCategory
|
||||
android:title="@string/correction_category"
|
||||
android:key="correction_settings">
|
||||
<PreferenceScreen
|
||||
android:key="configure_dictionaries_key"
|
||||
android:title="@string/configure_dictionaries_title">
|
||||
<intent
|
||||
android:action="android.intent.action.MAIN"
|
||||
android:targetPackage="com.google.android.inputmethod.latin.dictionarypack"
|
||||
android:targetClass="com.google.android.inputmethod.latin.dictionarypack.DictionarySettings" />
|
||||
</PreferenceScreen>
|
||||
<CheckBoxPreference
|
||||
android:key="quick_fixes"
|
||||
android:title="@string/quick_fixes"
|
||||
|
|
|
@ -25,6 +25,7 @@ import com.android.inputmethod.compat.VibratorCompatWrapper;
|
|||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.backup.BackupManager;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
|
@ -65,6 +66,7 @@ public class Settings extends PreferenceActivity
|
|||
public static final String PREF_SELECTED_LANGUAGES = "selected_languages";
|
||||
public static final String PREF_SUBTYPES = "subtype_settings";
|
||||
|
||||
public static final String PREF_CONFIGURE_DICTIONARIES_KEY = "configure_dictionaries_key";
|
||||
public static final String PREF_CORRECTION_SETTINGS_KEY = "correction_settings";
|
||||
public static final String PREF_QUICK_FIXES = "quick_fixes";
|
||||
public static final String PREF_SHOW_SUGGESTIONS_SETTING = "show_suggestions_setting";
|
||||
|
@ -424,6 +426,15 @@ public class Settings extends PreferenceActivity
|
|||
}
|
||||
mKeyPreviewPopupDismissDelay.setEnabled(
|
||||
Settings.Values.isKeyPreviewPopupEnabled(prefs, res));
|
||||
|
||||
final PreferenceScreen dictionaryLink =
|
||||
(PreferenceScreen) findPreference(PREF_CONFIGURE_DICTIONARIES_KEY);
|
||||
final Intent intent = dictionaryLink.getIntent();
|
||||
|
||||
final int number = getPackageManager().queryIntentActivities(intent, 0).size();
|
||||
if (0 >= number) {
|
||||
textCorrectionGroup.removePreference(dictionaryLink);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue