Commit Graph

678 Commits

Author SHA1 Message Date
TreeHugger Robot
2901f59dd1 Merge "Avoid launching activity-based feature to force stop exist actiivty and recreate it." into rvc-dev am: 9933478ea0 am: b79db44ca8 am: c841ab120f am: 2f7894bc85
Change-Id: I23dbd925a0907c257e8a371c6a0364c30775e8ee
2020-05-16 02:32:22 +00:00
TreeHugger Robot
9933478ea0 Merge "Avoid launching activity-based feature to force stop exist actiivty and recreate it." into rvc-dev 2020-05-16 01:09:05 +00:00
Rhed Jao
eaa90b42de Merge "Removes shortcut target when an a11y service is unbound" into rvc-dev am: a0b9a209e1 am: ab1dd8d6e6 am: 250e5f855b am: 776cde5bef
Change-Id: I8d59aaf660f2eb7700b9e4ce80d87127d4fdb096
2020-05-15 16:17:42 +00:00
Ryan Lin
9a301a4123 Merge "Swipe: use event times to check for expiration rather than handlers." into rvc-dev am: 22eadd2455 am: 1090ee6c53 am: 93c95c1024 am: e790fa214a
Change-Id: I7b6aef907bac2ba81eb4b06d878fcccc77c2c5a3
2020-05-15 16:05:03 +00:00
Ryan Lin
9bc1483fa8 Merge "Support Magnification capabilities Settings value" 2020-05-15 02:28:55 +00:00
Rhed Jao
a0b9a209e1 Merge "Removes shortcut target when an a11y service is unbound" into rvc-dev 2020-05-15 01:52:23 +00:00
Rhed Jao
2d8bdb146a Removes shortcut target when an a11y service is unbound
The accessibility button and shortcut target is updated by
the Settings app when the user turn on/off the a11y service.
It worked fine before an a11y service disables and turns off
itself using disableSelf api. The accessibility button and
shortcut settings can not get update in this case. Removes
shortcut target if an a11y service is unbound to fix this
issue.

Bug: 156237174
Test: atest AccessibilityShortcutTest
Change-Id: Ie15f7fe06644bd35d30d87383b25df81bf29056d
2020-05-14 21:14:43 +08:00
Ryan Lin
22eadd2455 Merge "Swipe: use event times to check for expiration rather than handlers." into rvc-dev 2020-05-14 07:51:52 +00:00
menghanli
038488eab5 Avoid launching activity-based feature to force stop exist actiivty and recreate it.
Root cause: FLAG_ACTIVITY_CLEAR_TASK would cause the exist activity are finished and new one items to be started. It causes Live Transcribe main activity goes onStart call of new activity is followed by onStop call of old activity, which cause the mic stopping.

Solution: Remmove the FLAG_ACTIVITY_CLEAR_TASK.

Bug: 156455425
Test: Manual test
Change-Id: Ia5c490cc4816fe41b704ca8ed9dce2891cf44c9b
2020-05-14 10:32:46 +08:00
ryanlwlin
8d1743c371 Support Magnification capabilities Settings value
To have more flexibility and have consistency with legacy behavior,
Uses can choose single/multiple modes in settings.

To support it, we have the following behavior
1. Switching magnification mode is allowed only when the capabilities
is all.
2. If the capabilities doesn't support currnet magnification mode,
the magnification mode will be fell back.
3. Set window magnification connection to null if the magnification
settings is not turned on or the magnification capabilities is
full-screen.

Bug: 155965892
Test: atest WindowMagnificationManagerTest
Test: manual test: select one or two magnification modes to see
      the behaviour.
Change-Id: If32e2a038e64ed7a7bab9ec5a3d444b542d30161
2020-05-13 13:38:15 +08:00
Minche Li
5a710c87d2 Merge "Removes the a11y service from the cached service list when onPackageRemoved" into rvc-dev am: 179321d5c7 am: 8488205ec9 am: d55aff90e4 am: d9645027d0
Change-Id: I358230aecbf53337e001b64b97f0c791c60aeac9
2020-05-13 03:10:56 +00:00
Minche Li
179321d5c7 Merge "Removes the a11y service from the cached service list when onPackageRemoved" into rvc-dev 2020-05-13 02:31:50 +00:00
mincheli
2b76abd763 Removes the a11y service from the cached service list when onPackageRemoved
The disabled a11y service is not removed from the cached service list
when the a11y service package is uninstalled.
To fix it, we have to remove the service from the service list.

Bug: 153507990
Test: manual test & adb shell dumpsys accessibility
Change-Id: Ic1d2ebe3a46faf7237123bcdfca96c79b2c35705
2020-05-12 17:54:51 +08:00
Ameer Armaly
b16b4486df Swipe: use event times to check for expiration rather than handlers.
This is a return to the original logic of the unified gesture detector.

Bug: 153584696
Bug: 153715903
Test: atest GestureManifoldTest TouchExplorerTest AccessibilityGestureDetectorTest FrameworksServicesTests:TouchExplorerTest
Change-Id: I384ade72efa2971476561fe6e19cafbebb012c85

Change-Id: Ibaf2fe73632ff89a0f187fe58d60bbfe71da2206
2020-05-11 16:20:49 +08:00
Jason Hsu
2cc0839ae7 Merge "Logs accessibility shortcut behavior." into rvc-dev am: 5c8f27a56e am: 0eaa712069 am: 08fa17e6fe am: ab899cd56a
Change-Id: Id8e73df3932f614b878e385e15574c9d5adbdd25
2020-05-10 06:09:15 +00:00
Jason Hsu
5c8f27a56e Merge "Logs accessibility shortcut behavior." into rvc-dev 2020-05-10 03:06:30 +00:00
jasonwshsu
d9aa03245c Logs accessibility shortcut behavior.
* Uses the atom AccessibilityShortcutReported in westworld.

Bug: 151285965
Test: make statsd_testdrive && ./out/host/linux-x86/bin/statsd_testdrive 266
Change-Id: Iba9d829ae35c7a336c38007101bdddfcd3dc2ddb
2020-05-09 22:31:05 +08:00
Qasid Sadiq
6f2f9df24b Merge "Give AccessibilityServices System Capabilities." into rvc-dev am: d59670170f am: 537dd7d5c0 am: 461f2ab923 am: dd156ef080
Change-Id: I2a938885208423120b86a2ceb471e3072bc37f2d
2020-05-08 00:37:15 +00:00
Qasid Sadiq
d59670170f Merge "Give AccessibilityServices System Capabilities." into rvc-dev 2020-05-07 23:43:57 +00:00
Jeff Sharkey
d5bf477832 Merge "Add custom Error Prone check for SDK comparisons." into rvc-dev am: 559130df3f am: a182ebd85f am: 8eea9f2c34 am: 095ebb723c
Change-Id: Idcf5856fdedc9ada4ea0f43f4e6d0c7134415efc
2020-05-05 00:28:37 +00:00
Jeff Sharkey
4d1d7b56cd Add custom Error Prone check for SDK comparisons.
Over the years we've had several obscure bugs related to how SDK level
comparisons are performed, specifically during the window of time
where we've started distributing the "frankenbuild" to developers.

Consider the case where a framework developer shipping release "R"
wants to only grant a specific behavior to modern apps; they could
write this in two different ways:

1. if (targetSdkVersion > Build.VERSION_CODES.Q) {
2. if (targetSdkVersion >= Build.VERSION_CODES.R) {

The safer of these two options is (2), which will ensure that
developers only get the behavior when *both* the app and the
platform concur on the specific SDK level having shipped.

Consider the breakage that would happen with option (1) if we
started shipping APKs that are based on the final R SDK, but are
then installed on earlier preview releases which still consider R
to be CUR_DEVELOPMENT; they'd risk crashing due to behaviors that
were never part of the official R SDK.

Bug: 64412239
Test: ./build/soong/soong_ui.bash --make-mode services RUN_ERROR_PRONE=true
Exempt-From-Owner-Approval: trivial blueprint changes
Change-Id: Ia20181f8602451ac9a719ea488d148e160708592
2020-05-04 23:09:48 +00:00
ryanlwlin
f693c74ef3 Fix visible mirror window after switching user
The window magnification will be set to null if the new user
doesn't request this feature. However all existed mirror windows
are not cleared. We disable all window magnification if the connection
is going to set to null.

Bug: 154077487
Test: manual test
      case 1
      1. Turn on magnification and show the mirror window
      2. Switch to another user and observe it
      case 2
      1. Turn on magnification and show the mirror window
      2. Switch to another user whose magnification is turned on.
      3. Observe if the window is gone.

Test: atest WindowMagnificationManagerTest
Change-Id: I1cf689f22587077258b857e2a114edd93a9fe1e0
2020-05-04 12:52:48 +08:00
Qasid Ahmad Sadiq
b8e8c095dd Give AccessibilityServices System Capabilities.
For now, this CL is for a conversation on how to give AccesibilityService particular capabilities.

Fixes: 154954447
Test: atest CTSAccessibility*.
Change-Id: I2e47d9a94fda04e60a5eb15a1ec54479c9322b1e
2020-04-29 23:34:47 -07:00
Sally Yuen
46bf46381c Merge "Initialize SystemActionPerformer lazily" into rvc-dev am: 12a32f35d7 am: 8c3c2f6c27 am: 7bfbf1a5c3 am: 17e0dc58f9
Change-Id: I6029f0e1d6d73ae54edcc9afbca43df4356ea553
2020-04-28 20:39:55 +00:00
Sally Yuen
12a32f35d7 Merge "Initialize SystemActionPerformer lazily" into rvc-dev 2020-04-28 19:39:48 +00:00
sallyyuen
8146d24d04 Initialize SystemActionPerformer lazily
System health tests indicate regressions.

Bug: 145909124, 154547990
Test: builds
Change-Id: I855dc18ed68ba6cb98e7d921e3f25e4dee147fcb
2020-04-28 10:11:21 -07:00
Ryan Lin
2c3f708ad1 Merge "Fix didn't bypass touch events with non-empty passthrough Region" into rvc-dev am: bf82de29cf am: bfb2142969 am: 8a4ef3ba3e am: 6378d45ec1
Change-Id: If2570b8770aa9a8d49a4842da4dc8ad6774e26f7
2020-04-28 04:05:35 +00:00
Minche Li
b4cece2bee Merge "Adjust down event location when two-finger dragging in TouchExplorer" into rvc-dev am: 4ce06dff0a am: bf0917323f am: 4115353467 am: a793490684
Change-Id: I1ea1ef425d1933120bb3c68b502849be42b16a52
2020-04-28 02:50:30 +00:00
Ryan Lin
bf82de29cf Merge "Fix didn't bypass touch events with non-empty passthrough Region" into rvc-dev 2020-04-28 02:43:59 +00:00
Minche Li
4ce06dff0a Merge "Adjust down event location when two-finger dragging in TouchExplorer" into rvc-dev 2020-04-28 01:43:57 +00:00
Sally Yuen
0618fe5dbf Merge "Fix system action API issues in SystemActions" into rvc-dev am: f8331a8a91 am: cb18d3a091 am: adc21f26d1 am: ee2aab3b66
Change-Id: I7880230362dc55b9bce3119a4adc3f653413d2f3
2020-04-27 23:15:50 +00:00
sallyyuen
93edd11724 Fix system action API issues in SystemActions
1) Actions are only registered when the service starts. If the locale
changes, the labels need to be translated, so re-register the actions
when this happens.

2) When its shortcut isn't visible the a11y menu action is a no-op. The
list should be an accurate representation of what actions are available.
Pass SystemActions into NavigationBarFragment, which keeps track of the
shortcut availability,  to unregister/register the action.

To do this, SystemActions exposes register/unregister to the fragment
and makes SYSTEM_ACTION_ID_ACCESSIBILITY_MENU public.

3) Remove Toggle Split Screen from SystemActions. The trigger isn't
system-level but is rather buried in the Recents UI in a button for each
app, and the a11y user can access this like everyone else.
SystemActionPerformer will still handle the legacy action call in
performSystemAction.

4) Rename "Accessibility Menu" to "On-screen Accessibility Shortcut"

Bug: 152636060, 152635646, 154833492
Test: Manual TalkBack test
Change-Id: I9b037f91c8d3b6f193fc9aee95ef73b7f3fbf315
2020-04-27 13:05:57 -07:00
ryanlwlin
5534ac32da Fix didn't bypass touch events with non-empty passthrough Region
When the action down motion event contains in the
mTouchExplorationPassthroughRegion, Touchxplorer didn't bypass the
motion event due to enabled multi-finger gesture.

Bug: 152597224
Test: manual test with set mult-finger-gesture enabled non-empty
      passthrough region
      atest CtsAccessibilityServiceTestCases:TouchExplorerTest
      atest FrameworksServicesTests:TouchExplorerTest
Change-Id: Ifef6a4da98aca8144bfd6deaceb1a110cfdbe5df
2020-04-27 20:00:31 +08:00
mincheli
004bed2801 Adjust down event location when two-finger dragging in TouchExplorer
The bug is happened because the slope between the down event and the
move event of the swipe gesture dispatched from TouchExplorer is
not smooth. So we also ajust the down event position as the moving
event. And we will update the corrupted CTS test case later.

Bug: 152931647
Test: none
Change-Id: I4d4b1ff2975f440dad0babb87d0af1b6ce348f93
2020-04-27 11:07:53 +08:00
Bernardo Rufino
d286b2bcce Merge "Allow sysUI to send a11y events for other package and user" into rvc-dev am: 78b06a4129 am: a71c8667c8 am: 1bb37c6c10 am: bb00dd0b39
Change-Id: Ia6b5f799d6e8e0ab83f4f9a3dbd269d83d2b0d90
2020-04-24 12:56:43 +00:00
Bernardo Rufino
78b06a4129 Merge "Allow sysUI to send a11y events for other package and user" into rvc-dev 2020-04-24 12:16:07 +00:00
Jason Hsu
005f2acff1 Merge changes from topic "rhedjao_a11y_button_rollback" into rvc-dev am: ea2d4bf1fd am: a574c632c5 am: e56a98a820 am: bd5a346909
Change-Id: I64079947e3cf089b6555a9d24aafde794ef380f0
2020-04-24 03:31:45 +00:00
Jason Hsu
ed945489aa Merge changes from topic "rhedjao_a11y_button_rollback" into rvc-dev am: f6e6cb119e am: 918fcbe15b am: 839dbc0052 am: a70807ac4b
Change-Id: I715315d1c328c7a778dc01867016705aa1f79071
2020-04-24 03:31:18 +00:00
Jason Hsu
ea2d4bf1fd Merge changes from topic "rhedjao_a11y_button_rollback" into rvc-dev
* changes:
  Rollback chooser menu to version Q behavior for accessibility button (2/n).
  Rollback chooser menu to version Q behavior for accessibility button (1/n).
2020-04-24 03:07:39 +00:00
Jason Hsu
f6e6cb119e Merge changes from topic "rhedjao_a11y_button_rollback" into rvc-dev
* changes:
  Rollback the changes of a11y button
  Migrates the navi-bar magnification setting key
2020-04-24 03:07:39 +00:00
Peter_Liang
0589ab0ae3 Rollback chooser menu to version Q behavior for accessibility button (2/n).
Allow separate Activities to handle the multiple-target case for the hardware and software shortcuts. Migrate from an extra to an explicit class so the Intent dispatch will launch the correct Activity for the particular shortcut.

Bug: 151294664
Test: manual test
Change-Id: I54bb1d3ab91e2757c465e8763786d0234f6d4ea8
2020-04-23 16:25:17 +00:00
Bernardo Rufino
c7988a90c7 Allow sysUI to send a11y events for other package and user
As discussed, we:
* Allow apps with INTERACT_ACCROSS_USERS(_FULL) to specify an explicit
user (instead of just USER_CURRENT).
* Introduce new signature permission ACT_AS_PACKAGE_FOR_ACCESSIBILITY
and grant it to sysUI. This permissions allow holders to specify another
package on behalf of which they can perform a11y operations.

This is for toasts since now sysUI renders toasts on behalf of the app
for apps targeting R+.

Bug: 152839254
Test: atest FrameworksServicesTests:AccessibilitySecurityPolicyTest
      FrameworksServicesTests:AccessibilityWindowManagerTest
      android.widget.cts.ToastTest
Change-Id: I3541045d574518571f348051d53e24ff1a4a67ef
2020-04-22 17:23:52 +00:00
Jacky Kao
cebd109abb Merge "Obtain correct screenshot based on device orientation" 2020-04-22 00:41:54 +00:00
Jacky Kao
4b4eec7813 Obtain correct screenshot based on device orientation
When taking the screenshot, passing the width and height
of the display, and the rotation according to the current
device orientation.

Bug: 153173726
Test: a11y CTS & unit tests
Test: manual test
Change-Id: I19eea2046da282155719b1dfdf9a3f53ad95e13b
2020-04-22 08:33:49 +08:00
Jacky Kao
538ee89f2b Merge "Obtain correct screenshot based on device orientation" into rvc-dev 2020-04-22 00:19:35 +00:00
Jacky Kao
333de4e7c3 Obtain correct screenshot based on device orientation
When taking the screenshot, passing the width and height
of the display, and the rotation according to the current
device orientation.

Bug: 153173726
Test: a11y CTS & unit tests
Test: manual test
Change-Id: I19eea2046da282155719b1dfdf9a3f53ad95e13b
2020-04-22 00:19:12 +00:00
Automerger Merge Worker
878795c6ba Merge "Merge "Add screenshots logging" into rvc-dev am: 44cc1e274b am: e0efd49ef3" into rvc-d1-dev-plus-aosp am: a1adfd1dfc am: ac6e16bcc9
Change-Id: Ie4d8f1e8a6e808f7f23aac38c0c1e29b20c572ea
2020-04-21 17:59:58 +00:00
Miranda Kephart
44cc1e274b Merge "Add screenshots logging" into rvc-dev 2020-04-21 16:58:54 +00:00
Winson Chung
8c45367d86 Merge "Add shell command to trigger global action" into rvc-dev am: 18c1d27df9 am: 755ad932da am: 3d5533d7f1 am: 2fdd19cdf6
Change-Id: I6e7b8a7e39079fd46f5360b48f707588aeb364ba
2020-04-21 04:30:04 +00:00
Winson Chung
18c1d27df9 Merge "Add shell command to trigger global action" into rvc-dev 2020-04-21 03:26:56 +00:00