OSDN Git Service

Implement TextClassifier.getLogger API
authorAbodunrinwa Toki <toki@google.com>
Tue, 5 Dec 2017 07:33:41 +0000 (07:33 +0000)
committerAbodunrinwa Toki <toki@google.com>
Wed, 31 Jan 2018 10:09:54 +0000 (10:09 +0000)
commit3bb443613820c7e54512cef9659ef2e9428243c6
treefbe9358dca81716b6bdd4e3daa36ba1b75c930cd
parent7c691c606c0e68eea5ddea4a910232df68501332
Implement TextClassifier.getLogger API

 - Introduces getLogger() API.
 - A logger should run in the client's process. This helps us manage
   sessions specific to a client.
 - The logger exposes a tokenizer that clients may use to tokenize
   strings for logging purposes.
 - Logger subclasses need to provide a writeEvent() implementation.
 - SelectionEvent is serializable over IPC.
 - Logger takes care of the session management. It writes session
   specific information into the SelectionEvent.
 - We still keep the SmartSelectionEventTracker for now so clients
   can slowly move off of it. The plan is to delete it.
 - The plan is to include support other event types. e.g. link events.

Bug: 64914512
Bug: 67609167
Test: See topic
Change-Id: Ic9470cf8f969add8a4c6570f78603d0b118956cd
api/current.txt
core/java/android/view/textclassifier/TextClassifier.java
core/java/android/view/textclassifier/TextClassifierImpl.java
core/java/android/view/textclassifier/logging/DefaultLogger.java [new file with mode: 0644]
core/java/android/view/textclassifier/logging/Logger.java [new file with mode: 0644]
core/java/android/view/textclassifier/logging/SelectionEvent.java [new file with mode: 0644]
core/java/android/widget/SelectionActionModeHelper.java