Loading java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java +6 −10 Original line number Diff line number Diff line Loading @@ -290,9 +290,6 @@ final class BinaryDictionaryGetter { final Context context) { final boolean hasDefaultWordList = DictionaryFactory.isDictionaryAvailable(context, locale); // TODO: The development-only-diagnostic version is not supported by the Dictionary Pack // Service yet if (!ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) { // We need internet access to do the following. Only do this if the package actually // has the permission. if (context.checkCallingOrSelfPermission(android.Manifest.permission.INTERNET) Loading @@ -300,7 +297,6 @@ final class BinaryDictionaryGetter { BinaryDictionaryFileDumper.cacheWordListsFromContentProvider(locale, context, hasDefaultWordList); } } final File[] cachedWordLists = getCachedWordLists(locale.toString(), context); final String mainDictId = DictionaryInfoUtils.getMainDictId(locale); final DictPackSettings dictPackSettings = new DictPackSettings(context); Loading java/src/com/android/inputmethod/latin/LatinIME.java +10 −21 Original line number Diff line number Diff line Loading @@ -179,11 +179,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen private int mDisplayOrientation; // Object for reacting to adding/removing a dictionary pack. // TODO: The development-only-diagnostic version is not supported by the Dictionary Pack // Service yet. private BroadcastReceiver mDictionaryPackInstallReceiver = ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS ? null : new DictionaryPackInstallBroadcastReceiver(this); new DictionaryPackInstallBroadcastReceiver(this); // Keeps track of most recently inserted text (multi-character key) for reverting private String mEnteredText; Loading Loading @@ -458,9 +455,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen filter.addAction(AudioManager.RINGER_MODE_CHANGED_ACTION); registerReceiver(mReceiver, filter); // TODO: The development-only-diagnostic version is not supported by the Dictionary Pack // Service yet. if (!ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) { final IntentFilter packageFilter = new IntentFilter(); packageFilter.addAction(Intent.ACTION_PACKAGE_ADDED); packageFilter.addAction(Intent.ACTION_PACKAGE_REMOVED); Loading @@ -471,7 +465,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen newDictFilter.addAction(DictionaryPackConstants.NEW_DICTIONARY_INTENT_ACTION); registerReceiver(mDictionaryPackInstallReceiver, newDictFilter); } } // Has to be package-visible for unit tests @UsedForTesting Loading Loading @@ -587,11 +580,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) { ResearchLogger.getInstance().onDestroy(); } // TODO: The development-only-diagnostic version is not supported by the Dictionary Pack // Service yet. if (!ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) { unregisterReceiver(mDictionaryPackInstallReceiver); } LatinImeLogger.commit(); LatinImeLogger.onDestroy(); super.onDestroy(); Loading java/src/com/android/inputmethod/latin/SettingsFragment.java +1 −3 Original line number Diff line number Diff line Loading @@ -202,9 +202,7 @@ public final class SettingsFragment extends InputMethodSettingsFragment final Intent intent = dictionaryLink.getIntent(); intent.setClassName(context.getPackageName(), DictionarySettingsActivity.class.getName()); final int number = context.getPackageManager().queryIntentActivities(intent, 0).size(); // TODO: The development-only-diagnostic version is not supported by the Dictionary Pack // Service yet if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS || 0 >= number) { if (0 >= number) { textCorrectionGroup.removePreference(dictionaryLink); } Loading Loading
java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java +6 −10 Original line number Diff line number Diff line Loading @@ -290,9 +290,6 @@ final class BinaryDictionaryGetter { final Context context) { final boolean hasDefaultWordList = DictionaryFactory.isDictionaryAvailable(context, locale); // TODO: The development-only-diagnostic version is not supported by the Dictionary Pack // Service yet if (!ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) { // We need internet access to do the following. Only do this if the package actually // has the permission. if (context.checkCallingOrSelfPermission(android.Manifest.permission.INTERNET) Loading @@ -300,7 +297,6 @@ final class BinaryDictionaryGetter { BinaryDictionaryFileDumper.cacheWordListsFromContentProvider(locale, context, hasDefaultWordList); } } final File[] cachedWordLists = getCachedWordLists(locale.toString(), context); final String mainDictId = DictionaryInfoUtils.getMainDictId(locale); final DictPackSettings dictPackSettings = new DictPackSettings(context); Loading
java/src/com/android/inputmethod/latin/LatinIME.java +10 −21 Original line number Diff line number Diff line Loading @@ -179,11 +179,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen private int mDisplayOrientation; // Object for reacting to adding/removing a dictionary pack. // TODO: The development-only-diagnostic version is not supported by the Dictionary Pack // Service yet. private BroadcastReceiver mDictionaryPackInstallReceiver = ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS ? null : new DictionaryPackInstallBroadcastReceiver(this); new DictionaryPackInstallBroadcastReceiver(this); // Keeps track of most recently inserted text (multi-character key) for reverting private String mEnteredText; Loading Loading @@ -458,9 +455,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen filter.addAction(AudioManager.RINGER_MODE_CHANGED_ACTION); registerReceiver(mReceiver, filter); // TODO: The development-only-diagnostic version is not supported by the Dictionary Pack // Service yet. if (!ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) { final IntentFilter packageFilter = new IntentFilter(); packageFilter.addAction(Intent.ACTION_PACKAGE_ADDED); packageFilter.addAction(Intent.ACTION_PACKAGE_REMOVED); Loading @@ -471,7 +465,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen newDictFilter.addAction(DictionaryPackConstants.NEW_DICTIONARY_INTENT_ACTION); registerReceiver(mDictionaryPackInstallReceiver, newDictFilter); } } // Has to be package-visible for unit tests @UsedForTesting Loading Loading @@ -587,11 +580,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) { ResearchLogger.getInstance().onDestroy(); } // TODO: The development-only-diagnostic version is not supported by the Dictionary Pack // Service yet. if (!ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) { unregisterReceiver(mDictionaryPackInstallReceiver); } LatinImeLogger.commit(); LatinImeLogger.onDestroy(); super.onDestroy(); Loading
java/src/com/android/inputmethod/latin/SettingsFragment.java +1 −3 Original line number Diff line number Diff line Loading @@ -202,9 +202,7 @@ public final class SettingsFragment extends InputMethodSettingsFragment final Intent intent = dictionaryLink.getIntent(); intent.setClassName(context.getPackageName(), DictionarySettingsActivity.class.getName()); final int number = context.getPackageManager().queryIntentActivities(intent, 0).size(); // TODO: The development-only-diagnostic version is not supported by the Dictionary Pack // Service yet if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS || 0 >= number) { if (0 >= number) { textCorrectionGroup.removePreference(dictionaryLink); } Loading