summaryrefslogtreecommitdiff
path: root/apct-tests/perftests/core
diff options
context:
space:
mode:
authorAbodunrinwa Toki <toki@google.com>2019-02-12 19:01:01 +0000
committerAbodunrinwa Toki <toki@google.com>2019-02-12 20:56:58 +0000
commit324572e747b2196d5777eb26120a4283bc0ba0d7 (patch)
tree53742981c528e5291b74d0c32301035a4a5c23c4 /apct-tests/perftests/core
parentdd9b3b4b3ae1787dee19189c6b908d3bf1f3be68 (diff)
Move TextClassifier.getLocalTextClassifier() API.
In the future, we think the TextClassifier is going to run in an external process. This CL moves the getLocalTextClassifier() API so that we don't have to guarantee this to apps. OEMs implementing TextClassifierServices however will want access to this API so this CL effectively moves the the API from where apps typically look for a TC (we prefer apps to call getTextClassifier() instead) to where TCS implementations are most likely to be accessing such APIs. The method is also renamed appropriately to what it will be long term (i.e. the default TC implementation rather than as the local TC). Bug: 123681286 Test: atest core/tests/coretests/src/android/view/textclassifier Test: atest cts/tests/tests/view/src/android/view/textclassifier/cts Test: adb shell am instrument -w -e class android.textclassifier.TextClassifierPerfTest com.android.perftests.core/androidx.test.runner.AndroidJUnitRunner Change-Id: I685e2b5263ffddbe301256fc2ed0d6254c3357ed
Diffstat (limited to 'apct-tests/perftests/core')
-rw-r--r--apct-tests/perftests/core/src/android/textclassifier/TextClassifierPerfTest.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/apct-tests/perftests/core/src/android/textclassifier/TextClassifierPerfTest.java b/apct-tests/perftests/core/src/android/textclassifier/TextClassifierPerfTest.java
index c506aec624d1..c5d89b234209 100644
--- a/apct-tests/perftests/core/src/android/textclassifier/TextClassifierPerfTest.java
+++ b/apct-tests/perftests/core/src/android/textclassifier/TextClassifierPerfTest.java
@@ -64,7 +64,7 @@ public class TextClassifierPerfTest {
Context context = InstrumentationRegistry.getTargetContext();
TextClassificationManager textClassificationManager =
context.getSystemService(TextClassificationManager.class);
- mTextClassifier = textClassificationManager.getLocalTextClassifier();
+ mTextClassifier = textClassificationManager.getTextClassifier(TextClassifier.LOCAL);
}
@Test