Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a77dba6a authored by Abodunrinwa Toki's avatar Abodunrinwa Toki
Browse files

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
parent c49da391
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment