OSDN Git Service

Use TEXT_HANDLE_MOVE in TextView behind the flag
authorYohei Yukawa <yukawa@google.com>
Tue, 20 Jun 2017 01:27:34 +0000 (18:27 -0700)
committerYohei Yukawa <yukawa@google.com>
Tue, 20 Jun 2017 01:27:34 +0000 (18:27 -0700)
commitc9cd9db4bb67b4e3a89e44a21c42f742940069da
tree49f7dacc88259b3dfde79e0b7d29b31704c9d33d
parentbc275085ca67998bd00428bf14aa24560dfa8659
Use TEXT_HANDLE_MOVE in TextView behind the flag

This CL enables TextView to trigger
HapticFeedbackConstants.TEXT_HANDLE_MOVE on devices that explicitly
enable this feature with resource overlay.  This CL should have no
behavior change and no performance impact by default.

Since the use case of HapticFeedbackConstants.TEXT_HANDLE_MOVE is
when the user is manually moving the text insertion/selection handle
on the touch screen, it is intentional that text handle move
triggered by hardware keyboard, mouse, TextView APIs, IME APIs, and
any other internal API calls do not trigger the haptic feedback
even if the feature is enabled with resource overlay.

Bug: 62454887
Test: Manually done as follows.
  * Not triggered on cursor move by mouse
  * Not triggered on cursor move by hardware keyboard
  * Not triggered on cursor move by IME
  * Triggered on cursor move by touch screen
Change-Id: I5e78aafb065378ca88ba39ec507b121c8baa3631
core/java/android/widget/Editor.java
core/res/res/values/config.xml
core/res/res/values/symbols.xml