Commit Graph

16161 Commits

Author SHA1 Message Date
Sally Yuen
a4fc6ee8ec Merge "Add OWNERS for A11yInteractionController and accessibility core tests" am: d379746bb9 am: 26d1ed8f94 am: e1921f4164 am: 2f5d064577
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1612071

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I45402fe7eb65334d5282fb142b3b04e07a85df13
2021-03-02 21:53:20 +00:00
Sally Yuen
2f5d064577 Merge "Add OWNERS for A11yInteractionController and accessibility core tests" am: d379746bb9 am: 26d1ed8f94 am: e1921f4164
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1612071

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5af7ce3223044c11f96e5d8a82af1969c8309c36
2021-03-02 21:36:21 +00:00
Sally Yuen
e1921f4164 Merge "Add OWNERS for A11yInteractionController and accessibility core tests" am: d379746bb9 am: 26d1ed8f94
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1612071

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I29123baf9066c7e023ecd8e832a83e7f576ecc79
2021-03-02 21:30:01 +00:00
Sally Yuen
26d1ed8f94 Merge "Add OWNERS for A11yInteractionController and accessibility core tests" am: d379746bb9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1612071

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I25e4fc3280c382440aefbbcb4981a0e5faa18017
2021-03-02 21:13:09 +00:00
Sally Yuen
25835cfd57 Merge "Prefetching can be interrupted by other service requests." into sc-dev am: 6996380ef9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13618961

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9d5147fbd9dc4ed8985587d7a912c955cf87e65e
2021-03-02 18:42:00 +00:00
Sally Yuen
6996380ef9 Merge "Prefetching can be interrupted by other service requests." into sc-dev 2021-03-02 18:07:56 +00:00
Sally
ce20fed9b5 Add OWNERS for A11yInteractionController and accessibility core tests
Bug: n/a
Test: n/a
Change-Id: Ie20914b3be604e9908ea25746575b041682ee1c7
2021-03-02 17:51:26 +00:00
TreeHugger Robot
cda6f9888e Merge "Introduce a flag to let app get global insets state" into sc-dev am: f51c6d573e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13628025

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3151d5e8bf5333019cc3d76e1a76de603d1602be
2021-03-02 14:10:34 +00:00
TreeHugger Robot
f51c6d573e Merge "Introduce a flag to let app get global insets state" into sc-dev 2021-03-02 13:55:31 +00:00
Joanne Chung
07b7aae9e3 Merge "Add shell commands and dump information for Translation" into sc-dev am: 7e3f7d1061
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13708845

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib57e5dddd425dba265d2c654c82c5c089391a3a6
2021-03-02 11:42:40 +00:00
Joanne Chung
7e3f7d1061 Merge "Add shell commands and dump information for Translation" into sc-dev 2021-03-02 11:39:07 +00:00
Kriti Dang
c9d9274036 Merge "Adding public API to expose DisplayInfo.deviceProductInfo" into sc-dev am: f2a12691aa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13709185

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3a588cce1a02ad2c834261fdf675135107e314b2
2021-03-02 09:21:48 +00:00
Kriti Dang
f2a12691aa Merge "Adding public API to expose DisplayInfo.deviceProductInfo" into sc-dev 2021-03-02 09:19:44 +00:00
Yunfan Chen
3dc12ebadc Introduce a flag to let app get global insets state
A new hidden flag is introduced to layout params to let system UI
components get the global insets state regardless of the z-order. That
is necessary to let components like power menu and system UI dialog.

Test: atest InsetsStateControllerTest
Bug: 178420426
Bug: 178115003
Change-Id: Ib103639ff00bf15919796788c0ba323aba0b4b4a
2021-03-02 16:11:22 +09:00
Joanne Chung
8da8e5d10e Update ContentCaptureContext to have a token information am: af76755ff7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13449290

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib0f128abc45b6ef97fbca33b6404ed0541501c69
2021-03-02 07:00:28 +00:00
Joanne Chung
af76755ff7 Update ContentCaptureContext to have a token information
In order to support auto translation, we need to give information to
content capture service to let the app can use this information to
find the Activity which needed to be translated.

It's not safe to provide an activity token to the client app directly
even if it is a privilege app. They can use this activity token to
access many activity/windows related functions. We create a new token
for use for content capture and translation. This token will be used
get the target Activity for translation new APIs.

This change focuses on the Content capture API change, the API change
about translation will be done in the next change,

Bug: 177789967
Test: manual. Make sure cc service can get the information.
Test: atest android.view.contentcapture.ContentCaptureContextTest
Test: atest CtsContentCaptureServiceTestCases

Change-Id: Ife8096a8bd1e71ce4e686d95043e347222ad7ee6
2021-03-02 06:47:48 +00:00
Galia Peycheva
903b1fcc0d Merge changes from topic "add-runtime-blur-disabling" into sc-dev am: fd98c576c7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13603505

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I89145e4bbba0d367194593c96923f813738f2dfa
2021-03-02 05:33:47 +00:00
Galia Peycheva
cf9a5c1848 Make WM.LP.blurBehindRadius a setter+getter am: 7fe1a92c60
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13676887

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7f5ce803a14c1cb2062dbe2eb1060e3948614ddd
2021-03-02 05:33:40 +00:00
Galia Peycheva
fd98c576c7 Merge changes from topic "add-runtime-blur-disabling" into sc-dev
* changes:
  Create listener for dynamic blurEnabled changes
  Make WM.LP.blurBehindRadius a setter+getter
2021-03-02 04:45:06 +00:00
Joanne Chung
5b8a905471 Merge "Optimization: find views in single traversal." into sc-dev am: af6aec86c4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13677265

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib12781a0fd38b43d2e2fb6422dc26fa69c1c9c50
2021-03-02 02:04:46 +00:00
Joanne Chung
af6aec86c4 Merge "Optimization: find views in single traversal." into sc-dev 2021-03-02 01:36:02 +00:00
Sally
f94c85b130 Prefetching can be interrupted by other service requests.
This is the re-merging of ag/12923546 (where most of that original
message is posted below), which includes various bug fixes.

Slow prefetch requests would block user interactive requests, creating
noticeable sluggishness and unresponsiveness in accessibility services,
especially on the web.

Let's make it so a user interactive requests stops prefetching.
We can't interrupt an API call, but we can stop in between API calls.

On the service side, we have to separate the prefetch callbacks from the
find callback. And we have to make it asynchronous. It does dispatch
intothe main thread, so the AccessibilityCache can remain single threaded.

When the calls are interrupted on the application side,
returnPendingFindAccessibilityNodeInfosInPrefetch checks the find
requests that are waiting in the queue, to see if they can be addressed
by the prefetch results. If they can be, we don't have to call into
potentially non-performant application code. We don't  check requests
that have differing prefetch flags (FLAG_INCLUDE_NOT_IMPORTANT_VIEWS,
FLAG_REPORT_VIEW_IDS) that would result in different caches.

We also make mPendingFindNodeByIdMessages thread-safe and ensure in
ActionReplacingCallback we don't return null results. Merged
ag/13246536, ag/13256330

UiAutomation does't require a main thread, so getMainLooper may
return null. In this case, instead of posting to the main looper,
we cache nodes on the binder thread (which is our ultimate goal
once b/180957109 is fixed).

Added tests to verify AccessibilityInteractionController interactions

Test: atest AccessibilityInteractionControllerNodeRequestsTest,
FrameworksServicesTests FrameworksCoreTests, CtsAccessibility, Manual
testing

Bug: b/176195360, b/175877007, b/175884343, b/178726546, b/175832139,
b/176195505

Change-Id: I346a3f40c84c6697b8a1e1d84a636eada655b984
2021-03-01 23:58:46 +00:00
Galia Peycheva
6e842a730c Create listener for dynamic blurEnabled changes
This CL exposes an API to let apps know when the blur has been enabled
or disabled dynamically.

This could be due to battery saving mode turned on, tunnel mode being
used, minimal post processing requested, etc.

This adds a WindowManager.addCrossWindowBlurEnabledListener, which allows
apps to add/remove a listener for blur enabled state changes. The
listeners are registered in a CrossWindowBlurListeners, which receives
updates from WindowManagerService when blurEnabled changes.
CrossWindowBlurListeners only registers a remote listener if the client
initializes it. I.e. if the app is not interested in blurs, the
CrossWindowBlurListeners won't get initialized and won't register a
remote listener.

WindowManagerService holds a RemoteCallbackList, which holds listeners
for each client process and notifies them when there are updates. If any
of the listeners' process dies, the entry is removed from the list.

Bug: 177524486
Test: m
CTS-Coverage-Bug: 179990440
Change-Id: I3fe8f2d2008171d6b069e8ee6f3b47e5b5d60cfa
2021-03-01 22:23:22 +01:00
Galia Peycheva
7fe1a92c60 Make WM.LP.blurBehindRadius a setter+getter
Bug: 181014794
Test: m && atest BlurTests
CTS-Coverage-Bug: 179990440
Change-Id: I3d8ceddcf1219df8decbbb0bf9a6bbb9d41799fb
2021-03-01 22:23:21 +01:00
Vishnu Nair
0b894b4d5c Merge "Reparent SurfacePackage to null when releasing it" into sc-dev am: ff085774d2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13701354

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If623d625bead9c3dbd2ddd0511151ee616fc69ee
2021-03-01 21:04:57 +00:00
Vishnu Nair
ff085774d2 Merge "Reparent SurfacePackage to null when releasing it" into sc-dev 2021-03-01 20:44:43 +00:00
Kholoud Mohamed
aa77661b12 Merge "Add testAPIs in ContentCaptureManager" into sc-dev am: 93d631e2f0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13671770

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I480fd297dd190927e1e558b6f2312396136b3100
2021-03-01 18:48:30 +00:00
Yohei Yukawa
cd0cf05bf0 Merge "Revert "Avoid IME restart for configChanges"" into sc-dev am: b2e45a2dc6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13713406

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7c3745ca21c85eac1fe672302a215f1603f20579
2021-03-01 18:45:38 +00:00
Kholoud Mohamed
93d631e2f0 Merge "Add testAPIs in ContentCaptureManager" into sc-dev 2021-03-01 18:37:03 +00:00
Yohei Yukawa
b2e45a2dc6 Merge "Revert "Avoid IME restart for configChanges"" into sc-dev 2021-03-01 18:30:36 +00:00
Taran Singh
712fc24a34 Revert "Avoid IME restart for configChanges"
Revert "Add cts for InputMethodService configChanges"

Revert submission 13417792-b/167948419

Reason for revert: Causes bugs like b/181195100
Reverted Changes:
Iff88b768c:Avoid IME restart for configChanges
Ib7ce13340:Add cts for InputMethodService configChanges

Bug: 167948419
Fix: 181195100
Change-Id: I36bca545b09b4f870560964ec61fa6bb344fceaf
2021-03-01 18:28:10 +00:00
Victor Chang
6b6104564d Merge "Revert "Clean up LogicalDisplayMapper"" into sc-dev am: 03c49c1324
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13714652

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I411d1b949b231c460cee9a188f22d9634db7fc78
2021-03-01 18:03:10 +00:00
kholoud mohamed
28913aa2f9 Add testAPIs in ContentCaptureManager
Added the following static testAPIs to replace
the usage of adb commands in cts/gts tests:
* resetTemporaryService
* setTemporaryService
* setDefaultServiceEnabled
These APIs are static because by default ContentCaptureManager
isn't available until it's enabled using these APIs.

Test: Confirmed that the APIs are accessible in CTS tests.
Bug: 180328483
Change-Id: I0a94d90b509e1d2f695556955d85d27acab19ae9
2021-03-01 15:43:20 +00:00
Victor Chang
8085fe75d1 Revert "Clean up LogicalDisplayMapper"
Revert submission 13575048-clean_ldm

Reason for revert: http://b/181537022
Reverted Changes:
I69c3478b4:Adjust jumbojack config to fit latest display layo...
I72a4eb667:Clean up LogicalDisplayMapper

Change-Id: I392816dd3870bd1ab969c06e796977a9d39bafda
2021-03-01 13:21:54 +00:00
Santos Cordon
2f4730fffa Clean up LogicalDisplayMapper am: c7f1d37c19
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13575048

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7230b844b4e8bf431bb9d5d55c554b2f95a0c44d
2021-02-28 23:37:28 +00:00
Santos Cordon
c7f1d37c19 Clean up LogicalDisplayMapper
Organize the code so that it is easier to read.
Add lots of display-related tests.

Test: atest com.android.server.display
Bug: 168208162
Change-Id: I72a4eb6677e346f615e4730f4888d56333645844
2021-02-28 19:29:39 +00:00
Shuo Qian
8b8f2625db Merge changes from topic "cp-rvc-aosp" into sc-dev
* changes:
  [automerged blank] Add Emergency callback mode shell command 2p: b201f9b1e6
  Add Emergency callback mode shell command
2021-02-26 22:56:18 +00:00
Galia Peycheva
656d774184 Merge "Fix synchronisation in BackgroundBlurDrawable" into sc-dev 2021-02-26 14:30:04 +00:00
Jeff Sharkey
869d848e45 Merge "Add OWNERS for long screenshots framework code" am: 79bed70aa2 am: 4df29fd76a am: 2b3fee42d8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1600453

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icb05293712e0b6127bda0e8e297e447956ee5aa1
2021-02-26 13:08:55 +00:00
Mark Renouf
20bd3d4935 Merge "Long screenshots framework update and API unhide" into sc-dev 2021-02-26 13:06:47 +00:00
Kriti Dang
af97773335 Adding public API to expose DisplayInfo.deviceProductInfo
Changing class DeviceProductInfo to public class with hidden ctor to expose via
Display#getDeviceProductInfo. Removing the relative address and changing
to connectionToSinkType.

Bug: 179775994
Test: atest CtsDisplayTestCases
Change-Id: I92f32461a054244b75dc4d5ddfd30e9a7968f3dd
2021-02-26 12:37:44 +01:00
Joanne Chung
3a907ab1eb Add shell commands and dump information for Translation
1. Add shell command to allow a temporary override of the
TranslationService that helps e2e CTS tests.
2. Add permission to allow the shell call the UiTranslationManager
APIs for the tests.
3. Dump translation systemservice and activity translation related
information to help debugging

We don't want to leak translation feature now, so we submit the
change about Shell in internal branch.

Bug: 179047265
Test: manual.
1. Switch to temp TranslationService by "adb shell cmd transformer set
<myTranslationService> 12000" and make sure only the same app can
access the APIs when switching to the temp service.
2. adb shell dumpsys transformer
3. adb shell dumpsys activity <myactivity> --translation
(We set "transformer" now to prevent feature leak, the final value is
translation)

Change-Id: I2573b7ea226bd805a951f8346d5370d9c9776364
2021-02-26 11:13:39 +00:00
Riddle Hsu
ed46310238 Merge "Optimize the Parcel read/write of common window data" into sc-dev 2021-02-26 04:07:39 +00:00
Vishnu Nair
64d5cb3719 Reparent SurfacePackage to null when releasing it
Previously, before BLAST, we were relying on the recreation of the
SurfaceControl when the SurfaceView was detached and reattached to
remove the SurfacePackage from the display. With BLAST we
can continue to reuse the existing SurfaceControl so this fix explicitly
removes SurfacePackage offscreen before releasing it.

Fixes: 180436742
Test: try bug steps (Change grid options in wallpaper settings and check for no overlap)
Test: go/wm-smoke
Change-Id: I9ffbc4b4a724333c799cb57f67c1fc34fe94ce41
2021-02-25 18:34:06 -08:00
Mark Renouf
8f1b73e183 Long screenshots framework update and API unhide
This change includes a series of API review changes. The most
significant update is the addition of cancellation signals to
API methods where needed.

Renames some internal classes and interfaces to support the
API changes and to simplify tests and improve quality.

Test: numerous presubmits
Bug: 175830670
CTS-Coverage-Bug: 180419562
Change-Id: I9b1b950a2779fc902ecf4d6394e3c35171926700
2021-02-25 23:02:17 +00:00
Galia Peycheva
d129f1e00e Fix synchronisation in BackgroundBlurDrawable
The PositionUpdateListener in BackgroundBlurDrawable is called from
a thread pool to update the position of the BlurRegion. After that,
in frame drawing callback (RenderThread), the Aggregator takes all
the settings in BackgroundBlurDrawable and dispatches them to SF.
However, while the RenderThread is working on frame N, the Ui thread
is working on frame N+1. So when the frame drawing callback is
called on RenderThread for frame N, BackgroundBlurDrawable
might already be holding settings for frame N+1.

In this CL, we fix that by making BackgroundBlurDrawable work only on Ui
thread, while BlurRegion lives only on RenderThread. Just before
drawing, we copy the state of BackgroundBlurDrawable into a BlurRegion.
So when render thread starts doing its thing for frame N, Ui thread can
start setting up BackgroundBlurDrawable for frame N+1. The settings for
frame N are already copied over to BlurRegion. In frame drawing
callback, we take the blur regions if there is a pending update and send
them to SF.

Bug: 167166562
Test: m && atest BlurAggregatorTest
Change-Id: Icec0fa8e97de30b7bad15b97f848ae642076652f
2021-02-25 18:33:33 +01:00
Philip Junker
daeb58b574 Merge "Add support for navigation repeat sound effects" into sc-dev 2021-02-25 14:03:14 +00:00
Joanne Chung
401900c9b2 Optimization: find views in single traversal.
The app will pass a list of views for Textview translation. Currently,
we traverse the view tree for each requested view. That means we will
traverse view tree many times. If the requested size of view list is
large, it shoule be a performance issue. We refine to find views in
sinslge traversal in this change.

Use a sample app with many views and layouts and compare the time of
two implementations. The average time of original solution is 300000
~ 600000 ns. The new approach is 150000 ~ 300000 ns.

Bug:178989965
Test: Write a sample app with many views and complicate structure,
see bug for test sample screenshot. Compare the execute time of two
implementation.

Change-Id: I5a051740ad40e77ed4a54294368031eb82ab87ab
2021-02-25 18:41:50 +08:00
Louis Chang
09f52aa440 Merge "Rename Stack to Task related terms (7/n)" into sc-dev 2021-02-25 04:58:24 +00:00
Louis Chang
7efc57797c Rename Stack to Task related terms (7/n)
- Renaming PinnedStack to PinnedTask
- Renaming DockedStack to DockedTask

Bug: 157876447
Test: presubmit
Change-Id: I51c10564647ed0d46eddc0c51a1ee06eef897e43
2021-02-25 04:57:26 +00:00