Commit Graph

8519 Commits

Author SHA1 Message Date
Shu Chen
79812eedc1 Merge "Calculates the slop values per upper/lower line height." into rvc-dev am: 27daeb0307 am: 1bb808525d am: 06e177368b am: 01755d22e8
Change-Id: I77430e4dbcfee7bc81b6e836594dcd43d7aa453e
2020-03-25 11:08:37 +00:00
Bernardo Rufino
32d774c9a8 Merge "Gate toast block and remove warning" into rvc-dev am: 7afc8b101b am: fed3f548d3 am: 36e998520a am: 0af032a87e
Change-Id: I4cce87e4661b9d47d2558794f54a48096206fba9
2020-03-25 10:33:58 +00:00
Shu Chen
27daeb0307 Merge "Calculates the slop values per upper/lower line height." into rvc-dev 2020-03-25 09:54:48 +00:00
Shu Chen
afbcf851d3 Calculates the slop values per upper/lower line height.
Also applies the max/min damping range for slop.
The max/min damping range includes lineHeight + slop.
Note: slop must >= zero.

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

Change-Id: I26cdf69fd2cf7d4514dd2a902ed34c480c9e8781
2020-03-25 15:56:06 +08:00
TreeHugger Robot
13480370e3 Merge "Clarify Toast.Callback javadoc" into rvc-dev am: 8ac8b257f1 am: a0ffa7d718 am: eaa961f2a1 am: 72774da3d2
Change-Id: I72075202d424069960c15ce6a60ef493f0439271
2020-03-24 21:13:52 +00:00
Bernardo Rufino
c797aac41e Gate toast block and remove warning
Gate background custom toast block on targetSdk for beta 1, after
having gathered dogfood feedback. So, enabling the change for apps with
targetSdk > Q (>= R). Also removed warning toast.

Added tests in topic CL to cover all the cases.

Bug: 144152069
Test: atest android.widget.cts29.ToastTest android.widget.cts.ToastTest
Change-Id: If368a97a2a8ff56770635615f89c79007bb27075
2020-03-24 20:22:18 +00:00
Bernardo Rufino
255094826d Clarify Toast.Callback javadoc
Text was ambiguous and could mean callback object construction instead
of toast construction.

Test: Builds
Bug: 144152069
Change-Id: I06160de2b85f339517ae45d3bd4cc1098f433ef0
2020-03-24 18:12:44 +00:00
Hui Yu
c30238be22 Merge "Update AppOps & UsageStats when app widget tapped." into rvc-dev am: aa3d42b129 am: aab97af060 am: 8b7fcb5766 am: d4d426a94c
Change-Id: Ib6ad73f64e04a4fdd1bf53cce628af06bc52139a
2020-03-21 20:52:54 +00:00
Hui Yu
3dc45fbc57 Update AppOps & UsageStats when app widget tapped.
When the app widget on the launcher is tapped on:
1. Update AppOps. AppOps treats the underlying app as foreground so the app can get while-in-use
permission.
2. Report a USER_INTERACTION event to UsageStats so UsageStats can
update mLastTimeUsed and mLastTimeVisible of this package.

Bug: 149043079
Test: manual test, tapped on a widget.
Change-Id: Ic8c91190881cf5dcf89f0f72cfd410b0c2e86bf6
2020-03-21 08:36:54 -07:00
TreeHugger Robot
0aa490c143 Merge "Fix PopupWindow's wrong location" into rvc-dev am: 4f4706de1f am: e1a515fe85 am: 3709c6bf85 am: 4a67a16837
Change-Id: I841ee5b4d98a4098df55381a6cc9dac737148828
2020-03-19 22:25:46 +00:00
TreeHugger Robot
4f4706de1f Merge "Fix PopupWindow's wrong location" into rvc-dev 2020-03-19 21:51:45 +00:00
Sally Yuen
56da5ed373 Merge "Implement ACTION_LONG_CLICK for accessibility" into rvc-dev 2020-03-18 21:45:46 +00:00
sallyyuen
cc02ea36b2 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
(cherry picked from commit 3f1203fb78)
Merged-In: I3958e5b80e6156e03c99335e0d0b671438965ebb
2020-03-17 18:30:08 +00:00
Automerger Merge Worker
0905864d4e Remove local text classifier and related tests. am: 293bdf360a am: e94d4b04bc am: bc20f5c39b am: 1d304860eb
Change-Id: I8e8f69e0b3b29cce752ad320f988ef70dc96333e
2020-03-17 16:23:55 +00:00
Automerger Merge Worker
138fa38b40 Merge "Makes the finger-to-cursor distance configurable via DeviceConfig." into rvc-dev am: 422e7eada2 am: 51abef39d8 am: 544232cd10 am: d000406dae
Change-Id: If43fc2e2dadf3ed71f51e1b2651ba7129626c585
2020-03-17 15:30:14 +00:00
Automerger Merge Worker
e94d4b04bc Remove local text classifier and related tests. am: 293bdf360a
Change-Id: I466b3f5c6838c87d84f078ba24d7dd19aaf8d015
2020-03-17 12:12:04 +00:00
Tony Mak
a10f2b981a Merge "Remove local text classifier and related tests." into rvc-dev 2020-03-17 11:50:58 +00:00
Shu Chen
422e7eada2 Merge "Makes the finger-to-cursor distance configurable via DeviceConfig." into rvc-dev 2020-03-17 03:18:55 +00:00
Automerger Merge Worker
12b4e9981f Merge "Updating widgets docs" into rvc-dev am: 838c49bed6 am: 3a77d922fb am: 3fcf70dae0 am: 1e481b962f
Change-Id: I42a42f70b227aabfbd3a4d3b7198a777a5410861
2020-03-16 20:58:29 +00:00
Tony Mak
293bdf360a Remove local text classifier and related tests.
1. libtextclassifier and libtextclassifier-java are no longer built
   into framework/base.
2. Removed local text classifier code
3. Removed local text classifier test code.
   All of them should be already moved to libtextclassifier/tcs side.
4. Unify all the TC related log tags to "androidtc".

BUG: 147412216

Test: mts-tradefed run mts-extservices
Test: atest frameworks/base/core/java/android/view/textclassifier
Test: Sanity test: Smart selection

Change-Id: Icb1076153f51d5674c8a6c58681ffed5aa772149
2020-03-16 20:16:17 +00:00
Sunny Goyal
838c49bed6 Merge "Updating widgets docs" into rvc-dev 2020-03-16 20:07:53 +00:00
Sunny Goyal
296d4b5821 Updating widgets docs
Bug: 151195866
Test: N/A
Change-Id: Ice98b876c64653bde7337ac123746392790dea1b
2020-03-13 14:02:32 -07:00
Alan Viverette
abdc4977e5 Merge "[ProgressBar] Fix: Media volume bar indicates a wrong value" 2020-03-12 16:02:26 +00:00
Shu Chen
c331032de5 Makes the finger-to-cursor distance configurable via DeviceConfig.
Bug: 149885871
Test: manual tested.
Change-Id: I545be8aa594dde6c3412167fcdf1bad3403a11a3
2020-03-12 10:58:48 +08: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
TreeHugger Robot
592181386c Merge "Making time-zone an API constant" into rvc-dev 2020-03-12 01:23:28 +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
hh83.kim
4ebacd3abf Fix PopupWindow's wrong location
Sometimes, we have seen cases that Popupwindow is located in the wrong place.
So we suggest some modification of logics in tryFitVertical and tryFitHorizontal methods of PopupWindow.
In those methods, there exists a statement whether the positions of anchor (anchorTopInScreen and anchorLeftInScreen) are bigger than 0.
However, there are some cases that those values become positive even though corresponding popup windows are not visible to user (places out of window area),
especially on devices with displaycuout, or apps with multiwindow modes.
So we modify to the anchor's top and left position values should be compared with top and left value of displayFrame, respectively, not 0.

Test: CtsWidgetTestCases:test android.widget.cts.PopupWindowTest

Bug: b/135749682
2020-02-26 10:10:44 -08: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