From d69fa0a09af7e9a524751dac1522c951abd92530 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Mon, 13 May 2013 10:25:42 +0900 Subject: Support multiple condition for getDeviceOverrideValue Bug: 8556975 Change-Id: I29d3a305b6ac3d8e3620c6d8592d85047d62bf48 --- .../com/android/inputmethod/latin/StringUtils.java | 24 ---------------------- 1 file changed, 24 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/StringUtils.java') diff --git a/java/src/com/android/inputmethod/latin/StringUtils.java b/java/src/com/android/inputmethod/latin/StringUtils.java index 5ff101f7a..ab050d7a3 100644 --- a/java/src/com/android/inputmethod/latin/StringUtils.java +++ b/java/src/com/android/inputmethod/latin/StringUtils.java @@ -64,30 +64,6 @@ public final class StringUtils { return TextUtils.join(",", result); } - /** - * Find a value that has a specified key from an array of key-comma-value. - * - * @param key a key string to find. - * @param array an array of key-comma-value string to be searched. - * @return the value part of the first string that has a specified key. - * Returns null if it couldn't be found. - */ - public static String findValueOfKey(final String key, final String[] array) { - if (array == null) { - return null; - } - for (final String element : array) { - final int posComma = element.indexOf(','); - if (posComma < 0) { - throw new RuntimeException("Element has no comma: " + element); - } - if (element.substring(0, posComma).equals(key)) { - return element.substring(posComma + 1); - } - } - return null; - } - /** * Remove duplicates from an array of strings. * -- cgit v1.2.3-83-g751a