OSDN Git Service

Flags to enable/disable smart selection in EditText
authorAbodunrinwa Toki <toki@google.com>
Tue, 19 Sep 2017 22:18:40 +0000 (23:18 +0100)
committerAbodunrinwa Toki <toki@google.com>
Fri, 13 Oct 2017 15:45:31 +0000 (16:45 +0100)
commitba60ab604c880699166cc5fbfad95aa0f2501141
treeb83429756b570268b19381ca5772cc56ec5c4636
parent20fb01eb23934ea702efe94fc7db0242b5c976e2
Flags to enable/disable smart selection in EditText

1. smart_selection_enabled_for_edit_text
   Disables smart selection for editable text.
2. smart_selection_dark_launch
   Dark launch TextClassifierImpl.suggestSelection(...)
   In this mode we run the method, but never change the user's
   selection to measure the quality of the results based on what
   the user actually wanted.

Bug: 65959640
Test: Manually tested flags turn on/off feature with 'adb shell
settings put global' and GServices override.
Test: bit FrameworksCoreTests:android.provider.SettingsBackupTest
Merged-In: Iacc561c8ee004b0123de66ad1ee06b1f56b4e4b4
Change-Id: Iacc561c8ee004b0123de66ad1ee06b1f56b4e4b4
core/java/android/provider/Settings.java
core/java/android/view/textclassifier/TextClassifier.java
core/java/android/view/textclassifier/TextClassifierConstants.java [new file with mode: 0644]
core/java/android/view/textclassifier/TextClassifierImpl.java
core/java/android/widget/SelectionActionModeHelper.java
core/tests/coretests/src/android/provider/SettingsBackupTest.java