diff options
author | Abodunrinwa Toki <toki@google.com> | 2019-04-04 13:10:59 +0100 |
---|---|---|
committer | Abodunrinwa Toki <toki@google.com> | 2019-05-02 12:55:58 +0100 |
commit | 0634af3875ef5c2b859ae328955beb57f0f8bf49 (patch) | |
tree | 09f5fabe228d3f0744347ea3dc4caa78fa6e7b44 /apct-tests | |
parent | fe77152334f354ef2e15a3d75639143ccf29c8f8 (diff) |
Lazy-load textclassifier settings.
Re-enables reading settings from device_config.
See: I6b7ab56e4015448ee068deb49e7f6fa133fea53c
Updates tests.
Updates documentation.
Bug: 129934185
Test: atest android.view.textclassifier
Test: (Performance) Test: frameworks/base/apct-tests/perftests/textclassifier/run.sh
Compare performance results with ConfigParser.ENABLE_DEVICE_CONFIG
set to true vs false. Trivial regression recorded i.e. 1.03x.
Test: (Manual) Change flags and see them reflected. e.g.
adb shell cmd device_config put textclassifier system_textclassifier_enabled false
Verify that app no longer uses the OEM TCS but the AOSP TC.
Change-Id: I4c6ff781c97fc2e3d3da55dc49123fa1d759670a
Diffstat (limited to 'apct-tests')
-rw-r--r-- | apct-tests/perftests/textclassifier/src/android/view/textclassifier/TextClassificationManagerPerfTest.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apct-tests/perftests/textclassifier/src/android/view/textclassifier/TextClassificationManagerPerfTest.java b/apct-tests/perftests/textclassifier/src/android/view/textclassifier/TextClassificationManagerPerfTest.java index c1491956c798..bd3b6737f505 100644 --- a/apct-tests/perftests/textclassifier/src/android/view/textclassifier/TextClassificationManagerPerfTest.java +++ b/apct-tests/perftests/textclassifier/src/android/view/textclassifier/TextClassificationManagerPerfTest.java @@ -52,7 +52,7 @@ public class TextClassificationManagerPerfTest { BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); while (state.keepRunning()) { textClassificationManager.getTextClassifier(); - textClassificationManager.invalidate(); + textClassificationManager.invalidateForTesting(); } } @@ -68,7 +68,7 @@ public class TextClassificationManagerPerfTest { BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); while (state.keepRunning()) { textClassificationManager.getTextClassifier(); - textClassificationManager.invalidate(); + textClassificationManager.invalidateForTesting(); } } } |