aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/research/LogUnit.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/research/LogUnit.java')
-rw-r--r--java/src/com/android/inputmethod/research/LogUnit.java27
1 files changed, 19 insertions, 8 deletions
diff --git a/java/src/com/android/inputmethod/research/LogUnit.java b/java/src/com/android/inputmethod/research/LogUnit.java
index cfba28909..0593ff320 100644
--- a/java/src/com/android/inputmethod/research/LogUnit.java
+++ b/java/src/com/android/inputmethod/research/LogUnit.java
@@ -1,17 +1,17 @@
/*
* Copyright (C) 2012 The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package com.android.inputmethod.research;
@@ -60,6 +60,7 @@ import java.util.Map;
private String mWord;
private boolean mMayContainDigit;
private boolean mIsPartOfMegaword;
+ private boolean mContainsCorrection;
public LogUnit() {
mLogStatementList = new ArrayList<LogStatement>();
@@ -274,6 +275,14 @@ import java.util.Map;
return mMayContainDigit;
}
+ public void setContainsCorrection() {
+ mContainsCorrection = true;
+ }
+
+ public boolean containsCorrection() {
+ return mContainsCorrection;
+ }
+
public boolean isEmpty() {
return mLogStatementList.isEmpty();
}
@@ -301,6 +310,7 @@ import java.util.Map;
true /* isPartOfMegaword */);
newLogUnit.mWord = null;
newLogUnit.mMayContainDigit = mMayContainDigit;
+ newLogUnit.mContainsCorrection = mContainsCorrection;
// Purge the logStatements and associated data from this LogUnit.
laterLogStatements.clear();
@@ -320,6 +330,7 @@ import java.util.Map;
mTimeList.addAll(logUnit.mTimeList);
mWord = null;
mMayContainDigit = mMayContainDigit || logUnit.mMayContainDigit;
+ mContainsCorrection = mContainsCorrection || logUnit.mContainsCorrection;
mIsPartOfMegaword = false;
}
}