Loading java/src/com/android/inputmethod/keyboard/Keyboard.java +1 −1 Original line number Diff line number Diff line Loading @@ -1229,7 +1229,7 @@ public class Keyboard { private void endRow(Row row) { if (mCurrentRow == null) throw new InflateException("orphant end row tag"); throw new InflateException("orphan end row tag"); if (mRightEdgeKey != null) { mRightEdgeKey.markAsRightEdge(mParams); mRightEdgeKey = null; Loading java/src/com/android/inputmethod/latin/StringUtils.java +2 −2 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ public class StringUtils { return text.codePointCount(0, text.length()); } public static boolean containsInCsv(String key, String csv) { private static boolean containsInCsv(String key, String csv) { if (csv == null) return false; for (String option : csv.split(",")) { Loading Loading @@ -129,7 +129,7 @@ public class StringUtils { /** * Remove duplicates from an array of strings. * * This method will always keep the first occurence of all strings at their position * This method will always keep the first occurrence of all strings at their position * in the array, removing the subsequent ones. */ public static void removeDupes(final ArrayList<CharSequence> suggestions) { Loading java/src/com/android/inputmethod/latin/SubtypeSwitcher.java +1 −42 Original line number Diff line number Diff line Loading @@ -18,11 +18,9 @@ package com.android.inputmethod.latin; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.AsyncTask; Loading Loading @@ -291,45 +289,6 @@ public class SubtypeSwitcher { }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } public Drawable getShortcutIcon() { return getSubtypeIcon(mShortcutInputMethodInfo, mShortcutSubtype); } private Drawable getSubtypeIcon(InputMethodInfo imi, InputMethodSubtype subtype) { final PackageManager pm = mService.getPackageManager(); if (imi != null) { final String imiPackageName = imi.getPackageName(); if (DBG) { Log.d(TAG, "Update icons of IME: " + imiPackageName + "," + KeyboardLayoutSet.getKeyboardLayoutSetLocaleString(subtype) + "," + subtype.getMode()); } if (subtype != null) { return pm.getDrawable(imiPackageName, subtype.getIconResId(), imi.getServiceInfo().applicationInfo); } else if (imi.getSubtypeCount() > 0 && imi.getSubtypeAt(0) != null) { return pm.getDrawable(imiPackageName, imi.getSubtypeAt(0).getIconResId(), imi.getServiceInfo().applicationInfo); } else { try { return pm.getApplicationInfo(imiPackageName, 0).loadIcon(pm); } catch (PackageManager.NameNotFoundException e) { Log.w(TAG, "IME can't be found: " + imiPackageName); } } } return null; } private static boolean contains(String[] hay, String needle) { for (String element : hay) { if (element.equals(needle)) return true; } return false; } public boolean isShortcutImeEnabled() { if (mShortcutInputMethodInfo == null) { return false; Loading @@ -352,7 +311,7 @@ public class SubtypeSwitcher { return false; if (mShortcutSubtype == null) return true; if (contains(mShortcutSubtype.getExtraValue().split(","), if (mShortcutSubtype.containsExtraValueKey( SUBTYPE_EXTRAVALUE_REQUIRE_NETWORK_CONNECTIVITY)) { return mIsNetworkConnected; } Loading Loading
java/src/com/android/inputmethod/keyboard/Keyboard.java +1 −1 Original line number Diff line number Diff line Loading @@ -1229,7 +1229,7 @@ public class Keyboard { private void endRow(Row row) { if (mCurrentRow == null) throw new InflateException("orphant end row tag"); throw new InflateException("orphan end row tag"); if (mRightEdgeKey != null) { mRightEdgeKey.markAsRightEdge(mParams); mRightEdgeKey = null; Loading
java/src/com/android/inputmethod/latin/StringUtils.java +2 −2 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ public class StringUtils { return text.codePointCount(0, text.length()); } public static boolean containsInCsv(String key, String csv) { private static boolean containsInCsv(String key, String csv) { if (csv == null) return false; for (String option : csv.split(",")) { Loading Loading @@ -129,7 +129,7 @@ public class StringUtils { /** * Remove duplicates from an array of strings. * * This method will always keep the first occurence of all strings at their position * This method will always keep the first occurrence of all strings at their position * in the array, removing the subsequent ones. */ public static void removeDupes(final ArrayList<CharSequence> suggestions) { Loading
java/src/com/android/inputmethod/latin/SubtypeSwitcher.java +1 −42 Original line number Diff line number Diff line Loading @@ -18,11 +18,9 @@ package com.android.inputmethod.latin; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.AsyncTask; Loading Loading @@ -291,45 +289,6 @@ public class SubtypeSwitcher { }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } public Drawable getShortcutIcon() { return getSubtypeIcon(mShortcutInputMethodInfo, mShortcutSubtype); } private Drawable getSubtypeIcon(InputMethodInfo imi, InputMethodSubtype subtype) { final PackageManager pm = mService.getPackageManager(); if (imi != null) { final String imiPackageName = imi.getPackageName(); if (DBG) { Log.d(TAG, "Update icons of IME: " + imiPackageName + "," + KeyboardLayoutSet.getKeyboardLayoutSetLocaleString(subtype) + "," + subtype.getMode()); } if (subtype != null) { return pm.getDrawable(imiPackageName, subtype.getIconResId(), imi.getServiceInfo().applicationInfo); } else if (imi.getSubtypeCount() > 0 && imi.getSubtypeAt(0) != null) { return pm.getDrawable(imiPackageName, imi.getSubtypeAt(0).getIconResId(), imi.getServiceInfo().applicationInfo); } else { try { return pm.getApplicationInfo(imiPackageName, 0).loadIcon(pm); } catch (PackageManager.NameNotFoundException e) { Log.w(TAG, "IME can't be found: " + imiPackageName); } } } return null; } private static boolean contains(String[] hay, String needle) { for (String element : hay) { if (element.equals(needle)) return true; } return false; } public boolean isShortcutImeEnabled() { if (mShortcutInputMethodInfo == null) { return false; Loading @@ -352,7 +311,7 @@ public class SubtypeSwitcher { return false; if (mShortcutSubtype == null) return true; if (contains(mShortcutSubtype.getExtraValue().split(","), if (mShortcutSubtype.containsExtraValueKey( SUBTYPE_EXTRAVALUE_REQUIRE_NETWORK_CONNECTIVITY)) { return mIsNetworkConnected; } Loading