JsonWriter requires that its clients pass it only a single top-level object.
The existing implementation tries to make code cleaner by having mJsonWriter
never be null, and instead use a global static "NULL_JSON_WRITER" that just
discards data. But because JsonWriter complains if more than one top-level
object is passed, making this a global object does not work. This change
instead copes with mJsonWriter being null.
Change-Id: Ia37ccfc8646e91f11a64713dd92d2846eb86ac54
LogUnits have been annotated with the autocorrected words, but
until now this was assumed to be a single word without spaces.
But spaceless typing can result in spaces in the LogUnit label. With this
change, the LogUnit inspects the autocorrected text to determine how many
words were inserted, and counts them accurately.
This change corrects a privacy problem, which was that if the word sampling
algorithm chose a LogUnit that actually contained multiple words, then more
than two successive words would be included in the log.
Change-Id: I7c01c3dd3ac33d7e96c00836256bae9c14b124ed
This code is cluttering readability and getting in the way
of future updates.
Future updates will make it much easier to debug and to
test this code, so this needs to disappear.
Change-Id: I32e28ec608587b6b7c07250a2692b13e8fc98465
The method in LogUnit for publishing a LogStatement to a JsonWriter doesn't
depend on anything in the LogUnit.
multi-project commit with Id1d6ff4851148bba0e6b5a1ec6eec2b842d9c707
Change-Id: I323cec239d6ea1cee602c2ecf9b13713791e9283
- Add support for replaying log files to the ResearchLogger. This will let
users preview data that they choose to upload.
- When the user explicitly requests that the system record their action, it
will record everything up to, and including, the motion involved in shutting
off the recording. This change also removes the stop-recording motion
commands.
Change-Id: Ib1df383bbf1881512cb111fab9f6749c25e436ba
Heuristic to determine whether a word was a typo correction or a complete
replacement by examining a correction to see if it falls within the list of
suggested words of the original.
Change-Id: Ieec4861a811e96aef0d14622e662b589ef8b4772
Previously, words were pushed out of a LogBuffer one at a time. The receiving code had to keep
state to know whether a n-gram was safe to log. This patch looks at the entire n-gram and makes a
single decision based on it alone.
mult-project commit with I3c40d7e02c77943d2668094ddb1d03efb942c74f
Change-Id: Id7d90bbd551b1a2f4e0e35f38852652f68f273f8
- Now includes all historical data stored in a motionEvent
- Simpler API, refactored to move extraction code to JsonUtils
Change-Id: I52d9756ddbeaa14d1704787da59bf1aad18f0335
multi-space logging should look like single-space logging, missing a few minor log statements
(SuggestionUpdates, SetComposingText)
multi-project commit with I2af842348c2f2b8f7271ac5b63def245e83df24d
Change-Id: Icd3187c0d0377255f82787afffea657c14345803
Log statements are now recorded with a timestamp. This is important for filtering out statements
not part of words that are sampled when spaces are inserted automatically.
multi-project commit with Change-Id: I68221a2528045d25632aef4bb716f92a4f4a56a4
Change-Id: I46ac9b3b1dcbb08425160d0109028cb64445139c
This reverts commit bdbe279cec
Other half of this change couldn't be committed because of a inter-project directory migration. Reverting until things settle down.
Change-Id: I3862fc8485dfca6d507f620e905cfa583aa0e39a
Log statements are now recorded with a timestamp. This is important for filtering out statements
not part of words that are sampled when spaces are inserted automatically.
multi-project commit with Change-Id: I68221a2528045d25632aef4bb716f92a4f4a56a4
Change-Id: I9f49c36391e1e1773b6d4876d7387c893024f87b
- Captures complete motion data for all words in an n-gram.
- Also filters n-grams properly; if any word in the n-gram is not
in the dictionary, it is not included.
- Simplify ResearchLog to not require explicit state
- Added LogBuffer class MainLogBuffer class to allow n-gram-level decisions
about privacy.
- Moved LogUnit out from ResearchLogger
multi-project change with Ic70ccb6c2e11eb02d887821434b44daa3eb7a3e2
Bug: 6188932
Change-Id: I731d6cff6539e997874f723b68bdb0d9b651b937
DO NOT MERGE
- Captures complete motion data for all words in an n-gram.
- Also filters n-grams properly; if any word in the n-gram is not
in the dictionary, it is not included.
- Simplify ResearchLog to not require explicit state
- Added LogBuffer class MainLogBuffer class to allow n-gram-level decisions
about privacy.
- Moved LogUnit out from ResearchLogger
multi-project change with Ie2bc79fd7fe6b951b24771e94b8d4ca21989af65
Bug: 6188932
Change-Id: I568c90d4af07e7c759c1e7fc64b716bd8c7b4ae5