Add threshold flag for foreign language detection.
Required for feature tuning and experiments
Also
- Updates Javadoc as per API review request
- Updates TextClassificationConstants test
Bug: 120794314
Bug: 118296637
Bug: 34780395
Test: atest core/tests/coretests/src/android/view/textclassifier/TextClassificationConstantsTest.java
Test: (MANUAL)
1. Install an app that handles Intent.ACTION_TRANSLATE
2. Run adb shell settings put global text_classifier_constants system_textclassifier_enabled=false,lang_id_threshold_override=0
3. Select foreign text
4. Observe that a "Translate" option is shown in the selection toolbar
1. Install an app that handles Intent.ACTION_TRANSLATE
2. Run adb shell settings put global text_classifier_constants system_textclassifier_enabled=false,lang_id_threshold_override=2
3. Select foreign text
4. Observe that a "Translate" option is not shown in the selection toolbar
Change-Id: I02b6ca48669e66a24150b04bba2ebfcf9ebe6bfd
5 files changed