public static UserLogRingCharBuffer init( final InputMethodService context, final boolean enabled, final boolean usabilityStudy) { if (!(enabled || usabilityStudy)) { return null; } sUserLogRingCharBuffer.mEnabled = true; UsabilityStudyLogUtils.getInstance().init(context); return sUserLogRingCharBuffer; }
// TODO: accept code points @UsedForTesting public void push(final char c, final int x, final int y) { if (!mEnabled) { return; } if (LatinImeLogger.sUsabilityStudy) { UsabilityStudyLogUtils.getInstance().writeChar(c, x, y); } mCharBuf[mEnd] = c; mXBuf[mEnd] = x; mYBuf[mEnd] = y; mEnd = normalize(mEnd + 1); if (mLength < BUFSIZE) { ++mLength; } }