Merge "Make some methods visible for testing"
commit
dc89d76f6b
|
@ -28,6 +28,7 @@ import android.os.Process;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.android.inputmethod.annotations.UsedForTesting;
|
||||||
import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
|
import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
|
@ -77,6 +78,7 @@ public final class Utils {
|
||||||
private RingCharBuffer() {
|
private RingCharBuffer() {
|
||||||
// Intentional empty constructor for singleton.
|
// Intentional empty constructor for singleton.
|
||||||
}
|
}
|
||||||
|
@UsedForTesting
|
||||||
public static RingCharBuffer getInstance() {
|
public static RingCharBuffer getInstance() {
|
||||||
return sRingCharBuffer;
|
return sRingCharBuffer;
|
||||||
}
|
}
|
||||||
|
@ -93,6 +95,7 @@ public final class Utils {
|
||||||
return ret < 0 ? ret + BUFSIZE : ret;
|
return ret < 0 ? ret + BUFSIZE : ret;
|
||||||
}
|
}
|
||||||
// TODO: accept code points
|
// TODO: accept code points
|
||||||
|
@UsedForTesting
|
||||||
public void push(char c, int x, int y) {
|
public void push(char c, int x, int y) {
|
||||||
if (!mEnabled) return;
|
if (!mEnabled) return;
|
||||||
mCharBuf[mEnd] = c;
|
mCharBuf[mEnd] = c;
|
||||||
|
|
Loading…
Reference in New Issue