Use same session id for typing and gesture.
Bug: 10699291 Change-Id: I7c8a3a57e8d189b72a17e4b9c6831becee6ec146main
parent
f7ec77fe2f
commit
f1233b58c2
|
@ -48,8 +48,9 @@ public final class Suggest {
|
|||
|
||||
// Session id for
|
||||
// {@link #getSuggestedWords(WordComposer,String,ProximityInfo,boolean,int)}.
|
||||
// We are sharing the same ID between typing and gesture to save RAM footprint.
|
||||
public static final int SESSION_TYPING = 0;
|
||||
public static final int SESSION_GESTURE = 1;
|
||||
public static final int SESSION_GESTURE = 0;
|
||||
|
||||
// TODO: rename this to CORRECTION_OFF
|
||||
public static final int CORRECTION_NONE = 0;
|
||||
|
|
|
@ -36,8 +36,8 @@ void ProximityInfoState::initInputParams(const int pointerId, const float maxPoi
|
|||
const int *const xCoordinates, const int *const yCoordinates, const int *const times,
|
||||
const int *const pointerIds, const bool isGeometric) {
|
||||
ASSERT(isGeometric || (inputSize < MAX_WORD_LENGTH));
|
||||
mIsContinuousSuggestionPossible =
|
||||
ProximityInfoStateUtils::checkAndReturnIsContinuousSuggestionPossible(
|
||||
mIsContinuousSuggestionPossible = (mHasBeenUpdatedByGeometricInput != isGeometric) ?
|
||||
false : ProximityInfoStateUtils::checkAndReturnIsContinuousSuggestionPossible(
|
||||
inputSize, xCoordinates, yCoordinates, times, mSampledInputSize,
|
||||
&mSampledInputXs, &mSampledInputYs, &mSampledTimes, &mSampledInputIndice);
|
||||
if (DEBUG_DICT) {
|
||||
|
@ -155,6 +155,7 @@ void ProximityInfoState::initInputParams(const int pointerId, const float maxPoi
|
|||
if (DEBUG_GEO_FULL) {
|
||||
AKLOGI("ProximityState init finished: %d points out of %d", mSampledInputSize, inputSize);
|
||||
}
|
||||
mHasBeenUpdatedByGeometricInput = isGeometric;
|
||||
}
|
||||
|
||||
// This function basically converts from a length to an edit distance. Accordingly, it's obviously
|
||||
|
|
|
@ -46,10 +46,11 @@ class ProximityInfoState {
|
|||
: mProximityInfo(0), mMaxPointToKeyLength(0.0f), mAverageSpeed(0.0f),
|
||||
mHasTouchPositionCorrectionData(false), mMostCommonKeyWidthSquare(0),
|
||||
mKeyCount(0), mCellHeight(0), mCellWidth(0), mGridHeight(0), mGridWidth(0),
|
||||
mIsContinuousSuggestionPossible(false), mSampledInputXs(), mSampledInputYs(),
|
||||
mSampledTimes(), mSampledInputIndice(), mSampledLengthCache(),
|
||||
mBeelineSpeedPercentiles(), mSampledNormalizedSquaredLengthCache(), mSpeedRates(),
|
||||
mDirections(), mCharProbabilities(), mSampledNearKeySets(), mSampledSearchKeySets(),
|
||||
mIsContinuousSuggestionPossible(false), mHasBeenUpdatedByGeometricInput(false),
|
||||
mSampledInputXs(), mSampledInputYs(), mSampledTimes(), mSampledInputIndice(),
|
||||
mSampledLengthCache(), mBeelineSpeedPercentiles(),
|
||||
mSampledNormalizedSquaredLengthCache(), mSpeedRates(), mDirections(),
|
||||
mCharProbabilities(), mSampledNearKeySets(), mSampledSearchKeySets(),
|
||||
mSampledSearchKeyVectors(), mTouchPositionCorrectionEnabled(false),
|
||||
mSampledInputSize(0), mMostProbableStringProbability(0.0f) {
|
||||
memset(mInputProximities, 0, sizeof(mInputProximities));
|
||||
|
@ -204,6 +205,7 @@ class ProximityInfoState {
|
|||
int mGridHeight;
|
||||
int mGridWidth;
|
||||
bool mIsContinuousSuggestionPossible;
|
||||
bool mHasBeenUpdatedByGeometricInput;
|
||||
|
||||
std::vector<int> mSampledInputXs;
|
||||
std::vector<int> mSampledInputYs;
|
||||
|
|
Loading…
Reference in New Issue