Commit Graph

8494 Commits

Author SHA1 Message Date
Alan Viverette
abdc4977e5 Merge "[ProgressBar] Fix: Media volume bar indicates a wrong value" 2020-03-12 16:02:26 +00:00
Automerger Merge Worker
244ba47f05 Making time-zone an API constant am: 2e7408eddb am: 5fd18b033d am: 085bf87210 am: 4021198db5
Change-Id: Id9d3db95200952ca6c09117d68ca6173824ab955
2020-03-12 02:37:02 +00:00
Automerger Merge Worker
5fd18b033d Making time-zone an API constant am: 2e7408eddb
Change-Id: I92458f87eb0963330f98a3fe20c3336391e3f5b0
2020-03-12 01:43:19 +00:00
Automerger Merge Worker
dab5e4f545 Merge "Temporary fix to disable augmented autofill requests coming from password fields." into rvc-dev am: f5589a71e0 am: 09822e4df1 am: a4ba34860f am: d059f5dfd1
Change-Id: I906a378e22bbbd5047dc49e9ac4fcade45a76138
2020-03-11 22:37:56 +00:00
TreeHugger Robot
f5589a71e0 Merge "Temporary fix to disable augmented autofill requests coming from password fields." into rvc-dev 2020-03-11 21:43:58 +00:00
Suprabh Shukla
2e7408eddb Making time-zone an API constant
This is already effectively an API the way it is documented.
Updating all the references of the hard-coded constant.

Test: make update-api && make

Bug: 151112929
Change-Id: Iadeb03c516215cfc51bc8604b67250348d5a4375
2020-03-10 18:05:02 -07:00
Sally Yuen
737f9235e9 Merge "Implement ACTION_LONG_CLICK for accessibility" 2020-03-10 23:45:00 +00:00
sallyyuen
3f1203fb78 Implement ACTION_LONG_CLICK for accessibility
Due to changes in R, the a11y framework no longer dispatches touch
events for a long press. This prevents the activation of EditText's floating menu.

We can re-enable it by implementing the proper a11y action
ACTION_LONG_CLICK. The menu itself is diffult to access through TalkBack's linear
navigation, but this is future work for a separate known issue.

Start and stop the menu for editable TextViews, which includes EditTexts.
Since touch events are no longer sent by a11y, separate the
accessibility handling from the touch handling infrastructure for long clicks in Editor.

We can't go through the main performLongClick code because it doesn't
actually start the action mode but rather sets pending, which routes
back to TextView. There's too little separation between the touch events and action logic.

Whoever touches the performLongClick code may need to also make
corresponding changes to the a11y path, but I suspect this won't happen often.

Remove the onInitializeA11yNodeInfo override for EditText because this
is handled by TextView.

Bug: 148127445
Test: Tested text fields in various apps. ag/10602004. atest
FrameworksCoreTests:TextViewActivityTest#testToolbarAppearsAccessibilityLongClick

Change-Id: I3958e5b80e6156e03c99335e0d0b671438965ebb
2020-03-10 11:54:17 -07:00
Adam He
ef0fe20852 Temporary fix to disable augmented autofill requests coming from
password fields.

Bug: 141703197
Test: atest android.autofillservice.cts.augmented
Change-Id: I05330988899a4c21d69c655a39c29fd0fea298c3
2020-03-10 10:47:09 -07:00
Jacky Kao
4686370935 Merge "Improvement of IME Enter Action" into rvc-dev 2020-03-10 04:05:58 +00:00
Dieter Hsu
04a579c6b7 Merge "Update API ExtraRenderingInfo by review feedback" into rvc-dev 2020-03-10 03:08:50 +00:00
Shu Chen
45b08852ad Merge "Unifies the finger-to-cursor distance between drag cursor and drag handle." into rvc-dev 2020-03-09 23:46:42 +00:00
Shu Chen
7700342166 Unifies the finger-to-cursor distance between drag cursor and drag handle.
This cl also fixes the way to simulate the touch events in EditorCursorDragTest, with correct raw X/Y.

Bug: 150534899
Test: manual & automated tests
  atest FrameworksCoreTests:EditorCursorDragTest
  atest FrameworksCoreTests:TextViewActivityTest

Change-Id: I0e9ef73082534ab98ddeddee0218374ed6d556a2
2020-03-09 10:58:23 +08:00
Dieter Hsu
809a286aef Update API ExtraRenderingInfo by review feedback
Bug: 150685398
Test: m update-api docs
Change-Id: Id21dbde8d15dc936fbbe157b1b50e19564dcd051
Merged-In: Id21dbde8d15dc936fbbe157b1b50e19564dcd051
(cherry picked from commit 327bb81a78)
2020-03-06 05:15:41 +00:00
Jacky Kao
e09f66e71d Improvement of IME Enter Action
1. Remove the internal using argument, ACTION_ARGUMENT_IME_ACTION_ID_INT.
2. Add more descriptions about this accessibility action, ACTION_IME_ENTER

Bug: 150831470
Test: atest AccessibilityTextActionTest
Change-Id: Icfebdf280e3441bf7b2b6f55c3febbe3a1d98de6
2020-03-05 15:21:09 +08:00
Bernardo Rufino
0a7ced1dd3 Show toasts from system/sysUI to all users
The package name test is safe:
* If it's used by Toast class in an app, apps have access to layout
  params anyway via getWindowParams() and applied flag is already
  protected by INTERNAL_SYSTEM_WINDOW permission.
* If it's used by ToastUI class in sys UI on behalf of another app,
  sys UI is trusted domain and can't be messed up by another app. It
  also has INTERNAL_SYSTEM_WINDOW permission.

Bug: 149408635
Test: atest ToastUITest android.widget.cts.ToastTest
      android.widget.cts29.ToastTest android.server.wm.ToastTest
Test: Change phone to vibration/silent in secondary user and observe
      toast is displayed.

Change-Id: I227e9f74166300fcb3ba8f3871b464afe6ec6a28
Merged-In: I227e9f74166300fcb3ba8f3871b464afe6ec6a28
(cherry picked from commit caef507aa9)
2020-02-28 21:42:36 +00:00
Bernardo Rufino
dee28c91a3 Unify toast presentation code
Extract window layout construction and view inflation from Toast and
ToastUI into common @hide class ToastPresenter. This is desirable by
itself but also in preparation for making system toasts visible to all
users.

Bug: 149408635
Test: atest ToastUITest android.widget.cts.ToastTest
      android.widget.cts29.ToastTest android.server.wm.ToastTest

Change-Id: Ifdd7ee37687da2e4c7abed61569cf342f95b2611
Merged-In: Ifdd7ee37687da2e4c7abed61569cf342f95b2611
(cherry picked from commit aea2c50cd8)
2020-02-28 16:18:42 +00:00
Bernardo Rufino
3aaec3e289 Merge "Show toasts from system/sysUI to all users" 2020-02-28 14:13:27 +00:00
Bernardo Rufino
caef507aa9 Show toasts from system/sysUI to all users
The package name test is safe:
* If it's used by Toast class in an app, apps have access to layout
  params anyway via getWindowParams() and applied flag is already
  protected by INTERNAL_SYSTEM_WINDOW permission.
* If it's used by ToastUI class in sys UI on behalf of another app,
  sys UI is trusted domain and can't be messed up by another app. It
  also has INTERNAL_SYSTEM_WINDOW permission.

Bug: 149408635
Test: atest ToastUITest android.widget.cts.ToastTest
      android.widget.cts29.ToastTest android.server.wm.ToastTest
Test: Change phone to vibration/silent in secondary user and observe
      toast is displayed.

Change-Id: I227e9f74166300fcb3ba8f3871b464afe6ec6a28
2020-02-27 20:47:23 +00:00
Automerger Merge Worker
708e5bcac1 Merge "Makes sure the magnifier source bounds doesn't beyond the surface." into rvc-dev am: 2c591e8c6b am: 4dcc22b7a2 am: ab912b4a73 am: 4d8b3715ad
Change-Id: I30b6e06baefe35e9cf2fcf66f237a0b21bba73a0
2020-02-27 12:26:53 +00:00
Shu Chen
2c591e8c6b Merge "Makes sure the magnifier source bounds doesn't beyond the surface." into rvc-dev 2020-02-27 11:47:13 +00:00
Bernardo Rufino
35505f4704 Merge "Unify toast presentation code" 2020-02-27 09:13:11 +00:00
Bernardo Rufino
aea2c50cd8 Unify toast presentation code
Extract window layout construction and view inflation from Toast and
ToastUI into common @hide class ToastPresenter. This is desirable by
itself but also in preparation for making system toasts visible to all
users.

Bug: 149408635
Test: atest ToastUITest android.widget.cts.ToastTest
      android.widget.cts29.ToastTest android.server.wm.ToastTest

Change-Id: Ifdd7ee37687da2e4c7abed61569cf342f95b2611
2020-02-26 13:16:31 +00:00
Sunny Goyal
c444b514bf Removing possible user defined strings from bugreport view-dump
Bug: 64101886
Test: Verified build
Change-Id: Ifad98a268fc17a2e1572ca3e0962a89447083294
2020-02-25 10:00:37 -08:00
Shu Chen
d06b330767 Makes sure the magnifier source bounds doesn't beyond the surface.
Test: locally verified.
Bug: 150122887
Change-Id: I3df94f0f073197f4a321faac24fa222f9dbb1674
2020-02-24 22:53:59 +08:00
Nikita Dubrovsky
72a7f8a7b3 Merge changes from topic "cursor-control-flags"
* changes:
  Allow setting defaults for DeviceConfig flags plumbed via settings
  Use DeviceConfig flags for cursor drag and insertion handle gestures
2020-02-20 04:23:20 +00:00
Shu Chen
c54b3fad76 Merge "Supports dynamic height for the new magnifier." 2020-02-20 00:43:39 +00:00
Nikita Dubrovsky
37f4c72a28 Merge "Update cursor drag to snap the finger position to the handle + add slop" 2020-02-19 21:18:13 +00:00
Nikita Dubrovsky
9e139179d7 Allow setting defaults for DeviceConfig flags plumbed via settings
Bug: 149790259
Test: Manually
Change-Id: Ie456cf27edab204dfc028023c6364a11b7e5de48
2020-02-19 12:19:53 -08:00
Nikita Dubrovsky
7c583592a8 Update cursor drag to snap the finger position to the handle + add slop
When dragging the cursor...

1) If the touch moves slightly above or below the current line, we keep
moving the cursor along the same line without jumping up and down across
lines.

2) When the drag motion moves downward, jumping to the lower line is
delayed to allow the user's touch to snap to the cursor's handle. Once
the touch is over the handle, we position the cursor above the user's
actual touch (offset such that the finger remains over the handle rather
than on top of the cursor vertical bar). This improves the visibility of
the cursor and the text underneath.

Bug: 148116165
Test: Manually and ran automated tests
  atest FrameworksCoreTests:EditorCursorDragTest
  atest FrameworksCoreTests:TextViewActivityTest
  atest FrameworksCoreTests:TextViewActivityMouseTest
Change-Id: I88432cbc5a7f1a47cd35866f2001d51d3f66828b
2020-02-19 11:36:24 -08:00
Dieter Hsu
3ef9003e18 Merge "Refresh new extra data AccessibilityNodeInfo.ExtraRenderingInfo" 2020-02-19 17:05:34 +00:00
Shu Chen
d931a4763f Supports dynamic height for the new magnifier.
And also limits the pre-magnified line height:
 - If the text line height is too big, don't show the magnifier.
 - If the text line height is too small, enlarges the zoom factor so
   that the magnified text can be seen clearly.

Bug: 77791703, 148181186
Test: locally verified.
Change-Id: I4cf56e0a54fda6b23dafe153040fe5ba206f5f1f
2020-02-19 09:17:01 +08:00
Nikita Dubrovsky
ac919b0e83 Use DeviceConfig flags for cursor drag and insertion handle gestures
Bug: 149751656
Test: Manually and ran automated tests
  atest FrameworksCoreTests:TextViewActivityTest
  atest FrameworksCoreTests:EditorCursorDragTest
Change-Id: I431dd7c13b573d7acd9ce20e16a6476370202b5f
2020-02-18 14:58:52 -08:00
TreeHugger Robot
1031e06adf Merge "Remove more deferTransactionUntilSurface calls" 2020-02-18 21:09:50 +00:00
Robert Carr
f2f84f5f27 Remove more deferTransactionUntilSurface calls
These won't work with the BLAST adapter since the Surface isn't
known to the server side. We just convert them in to the other
variant of defer transaction calls.

Bug: 146598493
Bug: 149251083
Test: Existing tests pass
Change-Id: I34fc4bb90114bae8b0d9ffdee5c91a2371e5c240
2020-02-18 11:08:52 -08:00
Dieter Hsu
f1273c4fca Refresh new extra data AccessibilityNodeInfo.ExtraRenderingInfo
Bug: 136404500
Test: atest AccessibilityTextActionTest AccessibilityNodeInfoTest
Change-Id: Ib1a8556d662d31ffbf3366e1482588ba058530cd
2020-02-18 12:18:52 +08:00
Tetsutoki Shiozawa
589552766c [ProgressBar] Fix: Media volume bar indicates a wrong value
Symptom:
Media volume bar shows non-zero value even during the mute state.

Root cause:
A request for updating progress of ProgressBar has 2 kind of updating
ways, animated and non-animated. If a non-animated request is invoked
before completing an animated request, the visual progress can be
overwritten by the old animated request. As a result, the visual
progress value becomes different from the actual value.

Solution:
A running animation on the primary progress should be canceled
before handling a new non-animated request.

Bug: 148759348
Test: atest CtsWidgetTestCases:ProgressBarTest
Change-Id: I569dbea4c6346ecfff8141d8378b4952fb1fa530
2020-02-14 13:57:49 -05:00
Yuichiro Hanada
ed54866ba6 Fix TextView.shouldAdvanceFocusOnTab().
EditorInfo.TYPE_TEXT_FLAG_{IME_,}MULTI_LINE are outside of
EditorInfo.TYPE_MASK_VARIATION.
It causes shouldAdvanceFocusOnTab return true always.

Bug: 37066224
Test: manual - Tab key on multiline text input inserts a tab character.
Test: atest TextViewTest#testKeyNavigation
Change-Id: I913cda40206d1c39e6844ff1be38e069488df4f4
2020-02-14 16:00:13 +09:00
Shu Chen
523d33f1e1 Fixes the opacity value for the insertion handle to range {0..255}.
Bug: 149523168
Test: locally verified.
Change-Id: I53c4be59e128a6451a9d8c847ee9d5fd295659ab
2020-02-14 01:17:10 +00:00
Shu Chen
5ec64751ac FISHEYE_RAMP_WIDTH should be in DP instead of pixels.
Test: locally verified.
Change-Id: I3938761b51d4ebb84b6bfb67aef72bc85911f163
2020-02-12 10:12:13 +08:00
Shu Chen
7948993c49 Merge "Limits the left/right bounds of the magnified text content within the textview." 2020-02-12 01:21:27 +00:00
Shu Chen
3cdd8e53b4 Merge "Don't show magnifier with animation for the new fisheye magnifier." 2020-02-12 01:09:17 +00:00
Shu Chen
2596513c60 Merge "Use the line height to adjust the Y coordinate for touch through." 2020-02-12 01:08:59 +00:00
Shu Chen
51520d1fd1 Limits the left/right bounds of the magnified text content within the
textview.

Test: locally verified.
Bug: 148988709
Change-Id: I255de87a602ad39fd05c9b87f44e1c1ba5b3e244
2020-02-11 20:36:40 +08:00
Shu Chen
af86a485b3 Use the line height to adjust the Y coordinate for touch through.
Originally it uses the text height from the font metrics which is wrong
when the spanned text is smaller than the font metrics.

Test: locally verified.
Bug: 149287208
Change-Id: I91a87200e477faece543a8890aeccd5b7eed9f0b
2020-02-11 19:53:56 +08:00
Bernardo Rufino
663a13b134 Merge "Return null for getWindowParams() on system-rendered toasts" 2020-02-11 11:10:10 +00:00
Bernardo Rufino
f5b271fb4c Merge "Mark getView() with @Nullable" 2020-02-08 00:28:37 +00:00
TreeHugger Robot
aab0c36259 Merge "Providing new accessibilityNode action" 2020-02-07 17:31:57 +00:00
Bernardo Rufino
7f01ff915b Return null for getWindowParams() on system-rendered toasts
Bug: 144754526
Test: atest android.widget.cts29.ToastTest android.widget.cts.ToastTest
Change-Id: I768424ab157d64cfc922cd307ffcc688a6ab6de3
2020-02-07 11:23:58 +00:00
Bernardo Rufino
b609468572 Mark getView() with @Nullable
Since they can return null.

Test: Builds
Bug: 144754526
Change-Id: I46a517584d5862fc09764a9f03ac5e2603e98957
2020-02-07 10:19:53 +00:00