Commit Graph

16165 Commits

Author SHA1 Message Date
Joanne Chung
41a214c2a7 Merge "Make SelectionActionModeHelper hardcoded constants configurable." into sc-dev 2021-03-04 02:30:32 +00:00
Alex Mang
d77366e4f2 Merge "Propagate ContentCaptureManager allowlist update to activities" into sc-dev 2021-03-04 02:26:25 +00:00
Jeff DeCew
82336d7562 Merge "Change groups to use number in the expander." into sc-dev 2021-03-04 01:12:21 +00:00
Jeff DeCew
138403add7 Change groups to use number in the expander.
* Old codepath is maintained; switch with config_showNotificationGroupCountInExpander.
* Use the default expander colors for low priority header.
* Uses the correct color for the old group overflow.
* Fixes the header view to correctly accomodates growing expander.

Bug: 181048615
Test: manual, visual inspection of groups and notification types that use headers
Change-Id: Ia314a6028645016df39d3e948fdc4eb194ed9ff2
2021-03-03 16:04:45 -05:00
Ming-Shin Lu
02116c6a4f Merge "Restore the last IME visiblity of the app window when allowed" into sc-dev 2021-03-03 14:30:15 +00:00
Michael Rosenfeld
b8e3cea7ad Merge "Revert "Prefetching can be interrupted by other service requests."" into sc-dev 2021-03-03 08:23:05 +00:00
Riddle Hsu
304d3a07ea Merge "Optimize the Parcel read/write of remote animation" into sc-dev 2021-03-03 03:58:07 +00:00
Lucy Chang
a2bd707f57 Merge "Checks viewId's nullibility before findA11yNodeInfos" into sc-dev 2021-03-03 02:05:00 +00:00
Joanne Chung
81db998fb3 Merge "Update UiTranslationManager APIs to use contentcapture token parameter" into sc-dev 2021-03-03 01:09:10 +00:00
Michael Rosenfeld
4ce3fddf73 Revert "Prefetching can be interrupted by other service requests."
This reverts commit f94c85b130.

Reason for revert: Causing app crashes and runtime restarts in tests. See b/181701570 for details.

Change-Id: I2b5f7b80f07f5d8f564acdf20fcdb1e9b5b9da19
2021-03-03 00:30:05 +00:00
TreeHugger Robot
cd28f9ae2b Merge "Clean up LogicalDisplayMapper" into sc-dev 2021-03-03 00:17:51 +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
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
Joanne Chung
19006134b3 Update UiTranslationManager APIs to use contentcapture token parameter
1. Update UiTranslationManager APIs to use ActivityId parameter
2. Keep old APIs definition until AiAi is ready for new APIs.

Bug: 177789967
Test: manual. Local add test app in allow list, and get token from local
content capture service and use it in UiTranslationManager api.

Change-Id: I96aa5704600fd9b81eff7a2f42eefe78a43112da
2021-03-02 22:06:30 +08: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
Santos Cordon
fbe529fb60 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: Iacdb9da032fe53d6d586dd33a4f0720769994d8c
2021-03-02 12:08:00 +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
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
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
Alex Mang
842dd79ec5 Propagate ContentCaptureManager allowlist update to activities
Ref Doc: go/propagate-ccm-allowlist

BYPASS_INCLUSIVE_LANGUAGE_REASON=logging existing function call name
Tested: manually on device
Bug: 177345035
Bug: 165025636

Change-Id: I46c41a1e3e8a91a08889f5505e5bc1510776e253
2021-03-01 22:26:02 -08:00
Joanne Chung
a6d3ac4721 Make SelectionActionModeHelper hardcoded constants configurable.
Read the selection timeout value from ViewConfiguration,
ViewConfiguration is statically configurable by the OEM. OEMs can
set the value which works on their device before shipping it.

After privacy sync, we can make the selection context size
configurable by DeviceConfig but we need to provide a
reasonable upper bound. The value is 240 after experiment.

Bug: 169042855
Test: atest CtsTextClassifierTestCases
Test: atest CtsWidgetTestCases:TextViewTest
Test: atest android.widget.TextViewActivityTest
Test: manual. Changes values by command and checks the values.

Change-Id: I59346fdc3b482bca586c13ba6c653d1e9b593922
2021-03-02 14:13:48 +08: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
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
ff085774d2 Merge "Reparent SurfacePackage to null when releasing it" into sc-dev 2021-03-01 20:44:43 +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
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
Ming-Shin Lu
e99a1b491d Restore the last IME visiblity of the app window when allowed
Since when bring an existing app task to foreground or quick switching
app task with gesture navigation will first see the task snapshot
during app transition,

If the task previously focused and shown IME, even the task may hide
IME when switching to the next task, As the goal of
go/ime-transition-improve-s mentioned, if the task is still focused by
editor, we should keep the original focused IME shown and keep
the input connection focused state when navigating back to the
original task.

Bug: 166736352
Test: atest CtsInputMethodTestcases
Test: manual by focusing app with an editor to show keyboard,
      switch the app task to the next with gesture nav and then
      switched back, expected the soft-keyboard is still shown.

Change-Id: I63b144bed6c37569d79fba1c2b63dd4f1074f0f6
2021-03-01 23:41:22 +08: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
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
Riddle Hsu
ec999979a7 Optimize the Parcel read/write of remote animation
Eliminate the overhead of class name. A read/write pair
of RemoteAnimationTarget can be reduced from 30us to 7us.

Bug: 181025587
Test: CtsWindowManagerDeviceTestCases
Change-Id: I58bd69012fcc3e6cb72c1fcfbb1db697e6c70e87
2021-02-26 20:37:13 +08: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