OSDN Git Service

TextClassification.text is nullable
authorAbodunrinwa Toki <toki@google.com>
Wed, 12 Jul 2017 18:38:54 +0000 (19:38 +0100)
committerAbodunrinwa Toki <toki@google.com>
Wed, 12 Jul 2017 19:26:27 +0000 (20:26 +0100)
commitd44286f94240f79b26703cf1dcff94893135c93c
treefe7ce2d24e1aa0541ad0e549b143394308d8a8e4
parent3c3acf8bf1f48d5a1d33282ff24be5e1300d3298
TextClassification.text is nullable

Removes the @NonNull requirement on TextClassification.text.
e.g. TextClassifier.NO_OP doesn't classify text and thus returns
TextClassification.EMPTY which doesn't set TextClassification.text.
This is ideal as we need not make copies of this object when NO_OP
was performed.

Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
bit FrameworksCoreTests:android.widget.TextViewActivityTest
bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: I0b3ac5bf0027cbd67ba40d1110f1100280c8c3a2
core/java/android/view/textclassifier/TextClassification.java