am 937877b8: Merge "[Rlog14] Increase feedback buffer to cover whole session"

* commit '937877b8770173d209ac82c17a7e57917ea531fc':
  [Rlog14] Increase feedback buffer to cover whole session
main
Kurt Partridge 2013-01-17 13:22:50 -08:00 committed by Android Git Automerger
commit 9545bcfa76
2 changed files with 4 additions and 6 deletions

View File

@ -269,8 +269,7 @@
<string name="research_feedback_dialog_title" translatable="false">Send feedback</string> <string name="research_feedback_dialog_title" translatable="false">Send feedback</string>
<!-- Text for checkbox option to include user data in feedback for research purposes [CHAR LIMIT=50] --> <!-- Text for checkbox option to include user data in feedback for research purposes [CHAR LIMIT=50] -->
<!-- TODO: remove translatable=false attribute once text is stable --> <!-- TODO: remove translatable=false attribute once text is stable -->
<!-- TODO: handle multilingual plurals --> <string name="research_feedback_include_history_label" translatable="false">Include session history</string>
<string name="research_feedback_include_history_label" translatable="false">Include last <xliff:g id="word">%d</xliff:g> words entered</string>
<!-- Hint to user about the text entry field where they should enter research feedback [CHAR LIMIT=40] --> <!-- Hint to user about the text entry field where they should enter research feedback [CHAR LIMIT=40] -->
<!-- TODO: remove translatable=false attribute once text is stable --> <!-- TODO: remove translatable=false attribute once text is stable -->
<string name="research_feedback_hint" translatable="false">Enter your feedback here.</string> <string name="research_feedback_hint" translatable="false">Enter your feedback here.</string>

View File

@ -106,7 +106,8 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
// Change the default indicator to something very visible. Currently two red vertical bars on // Change the default indicator to something very visible. Currently two red vertical bars on
// either side of they keyboard. // either side of they keyboard.
private static final boolean IS_SHOWING_INDICATOR_CLEARLY = false || IS_LOGGING_EVERYTHING; private static final boolean IS_SHOWING_INDICATOR_CLEARLY = false || IS_LOGGING_EVERYTHING;
public static final int FEEDBACK_WORD_BUFFER_SIZE = 5; // FEEDBACK_WORD_BUFFER_SIZE should add 1 because it must also hold the feedback LogUnit itself.
public static final int FEEDBACK_WORD_BUFFER_SIZE = (Integer.MAX_VALUE - 1) + 1;
// constants related to specific log points // constants related to specific log points
private static final String WHITESPACE_SEPARATORS = " \t\n\r"; private static final String WHITESPACE_SEPARATORS = " \t\n\r";
@ -391,9 +392,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
} }
if (mFeedbackLogBuffer == null) { if (mFeedbackLogBuffer == null) {
mFeedbackLog = new ResearchLog(createLogFile(mFilesDir), mLatinIME); mFeedbackLog = new ResearchLog(createLogFile(mFilesDir), mLatinIME);
// LogBuffer is one more than FEEDBACK_WORD_BUFFER_SIZE, because it must also hold mFeedbackLogBuffer = new FixedLogBuffer(FEEDBACK_WORD_BUFFER_SIZE);
// the feedback LogUnit itself.
mFeedbackLogBuffer = new FixedLogBuffer(FEEDBACK_WORD_BUFFER_SIZE + 1);
} }
} }