From 0acd121083baf137dc81cd2c5ce4214a9848a82d Mon Sep 17 00:00:00 2001 From: Ken Wakasa Date: Fri, 24 Jan 2014 23:55:33 +0900 Subject: [PATCH] Fix wrong indents. Removed an unused method too. Change-Id: Id364009fd4e94ec65862fc3651a181e862909a42 --- .../latin/utils/CoordinateUtils.java | 18 +++++++----------- .../inputmethod/latin/WordComposerTests.java | 5 ++--- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/utils/CoordinateUtils.java b/java/src/com/android/inputmethod/latin/utils/CoordinateUtils.java index c29ecbd6f..87df013a6 100644 --- a/java/src/com/android/inputmethod/latin/utils/CoordinateUtils.java +++ b/java/src/com/android/inputmethod/latin/utils/CoordinateUtils.java @@ -50,16 +50,16 @@ public final class CoordinateUtils { } public static int[] newCoordinateArray(final int arraySize) { - return new int[ELEMENT_SIZE * arraySize]; + return new int[ELEMENT_SIZE * arraySize]; } public static int[] newCoordinateArray(final int arraySize, - final int defaultX, final int defaultY) { - final int[] result = new int[ELEMENT_SIZE * arraySize]; - for (int i = 0; i < arraySize; ++i) { - setXYInArray(result, i, defaultX, defaultY); - } - return result; + final int defaultX, final int defaultY) { + final int[] result = new int[ELEMENT_SIZE * arraySize]; + for (int i = 0; i < arraySize; ++i) { + setXYInArray(result, i, defaultX, defaultY); + } + return result; } public static int xFromArray(final int[] coordsArray, final int index) { @@ -88,8 +88,4 @@ public final class CoordinateUtils { coordsArray[baseIndex + INDEX_X] = coords[INDEX_X]; coordsArray[baseIndex + INDEX_Y] = coords[INDEX_Y]; } - - public static void copyArray(final int[] destination, final int[] source) { - System.arraycopy(source, 0, destination, 0, source.length); - } } diff --git a/tests/src/com/android/inputmethod/latin/WordComposerTests.java b/tests/src/com/android/inputmethod/latin/WordComposerTests.java index 7892aa423..d68bb5c54 100644 --- a/tests/src/com/android/inputmethod/latin/WordComposerTests.java +++ b/tests/src/com/android/inputmethod/latin/WordComposerTests.java @@ -39,11 +39,10 @@ public class WordComposerTests extends AndroidTestCase { final int[] CODEPOINTS_WITHIN_BMP = StringUtils.toCodePointArray(STR_WITHIN_BMP); final int[] COORDINATES_WITHIN_BMP = CoordinateUtils.newCoordinateArray(CODEPOINTS_WITHIN_BMP.length, - Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE); + Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE); final String PREVWORD = "prevword"; wc.setComposingWord(CODEPOINTS_WITHIN_BMP, COORDINATES_WITHIN_BMP, PREVWORD); - assertEquals(wc.size(), - STR_WITHIN_BMP.codePointCount(0, STR_WITHIN_BMP.length())); + assertEquals(wc.size(), STR_WITHIN_BMP.codePointCount(0, STR_WITHIN_BMP.length())); assertFalse(wc.isCursorFrontOrMiddleOfComposingWord()); wc.setCursorPositionWithinWord(2); assertTrue(wc.isCursorFrontOrMiddleOfComposingWord());