Commit Graph

18428 Commits

Author SHA1 Message Date
Rupesh Bansal
278e8f3bf2 Merge "Add documentation for LayoutParams.preferredRefreshRate" into tm-dev am: 336fcab788 am: b217bbb695
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17955874

Change-Id: I670aa79b5d9a7727e1b8532b035f00c003032649
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-09 17:00:57 +00:00
Rupesh Bansal
336fcab788 Merge "Add documentation for LayoutParams.preferredRefreshRate" into tm-dev 2022-05-09 15:52:20 +00:00
Shan Huang
78c429f948 Merge "Migrate IME to handle back with OnBackInvokedDispatcher." into tm-dev am: e3a61826eb am: 4472170cb9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17952046

Change-Id: Icf52d1afb13bdab55270c3e6319b4d889d114db0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 20:19:10 +00:00
Shan Huang
e3a61826eb Merge "Migrate IME to handle back with OnBackInvokedDispatcher." into tm-dev 2022-05-06 19:35:42 +00:00
Mark Punzalan
ded5484e2e Merge "Reset translation state when views disappear." into tm-dev am: 4442058508 am: 39f614d708
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18010158

Change-Id: Ie1489703530020d821fd18689c521e71652c9ccc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 19:30:26 +00:00
Mark Punzalan
4442058508 Merge "Reset translation state when views disappear." into tm-dev 2022-05-06 19:26:09 +00:00
Ahaan Ugale
a388f84abc Merge "Fix Autofill dialog does not work" into tm-dev am: f58911cf35 am: 6500b2efc4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17775843

Change-Id: I986d1a13099e5d0533e7543695bcd7789292309e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 15:43:25 +00:00
Rob Carr
dda57ab123 Merge "ViewRootImpl/SurfaceView: Listen for queue stalls" into tm-dev am: 7a0ee72bff am: f371225580
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17778270

Change-Id: I5c45dcd148e8dd97346433be70c10ba3fe52f627
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 15:41:46 +00:00
Rob Carr
fe7932e71e Merge "SurfaceView: Fix overlocking of mSurfaceLock" into tm-dev am: ec6577d13e am: 3d3692b21d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17808703

Change-Id: I732885cf4600f5e3a71e5d783e0aa840aa108ba2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 15:41:31 +00:00
TreeHugger Robot
86c9d56dc2 Merge "Update renderer surface if rotation is changed" into tm-qpr-dev 2022-05-06 13:58:05 +00:00
Ahaan Ugale
f58911cf35 Merge "Fix Autofill dialog does not work" into tm-dev 2022-05-05 16:27:54 +00:00
Rob Carr
7a0ee72bff Merge "ViewRootImpl/SurfaceView: Listen for queue stalls" into tm-dev 2022-05-05 15:11:39 +00:00
Rob Carr
ec6577d13e Merge "SurfaceView: Fix overlocking of mSurfaceLock" into tm-dev 2022-05-05 15:09:15 +00:00
Riddle Hsu
619760a5eb Merge "Move some IWindowManager methods to internal interface" into tm-qpr-dev 2022-05-05 05:49:25 +00:00
Mark Punzalan
c35960c314 Reset translation state when views disappear.
Views may be re-used (e.g., as in ListView and RecyclerView) so we need
to ensure they don't have the translated text when they appear again.

RecyclerView seems to recycle translated views even when
`hasTransientState() == true` which is the case when views are
translated. This should be fixed separately.

Bug: 223700458
Test: atest CtsTranslationTestCases
Test: atest CtsContentCaptureServiceTestCases
Test: atest CtsAutoFillServiceTestCases
Test: manual - New messages are translated correctly even if views are
re-used. Messages are translated correctly when scrolled onto the screen
and stay translated while on-screen.

Change-Id: I97cc418a801c006c857e971110ab811ad383343e
2022-05-05 05:31:38 +00:00
Xiaowen Lei
15e2cd9298 Merge "Add WM transit types for dream activity." into tm-qpr-dev 2022-05-04 22:45:17 +00:00
Robert Carr
74c760394a SurfaceView: Fix overlocking of mSurfaceLock
mSurfaceLock is used to ensure the Surface object stays valid over
the span of the calls to lockCanvas and unlockCanvasAndPost which could
come from any thread. In API Level 29 and below, updateSurface was
split in to two paths, a first path (which would acquire mSurfaceLock)
for when the Surface could be destroyed, and second path for geometry
updates only. The consolidation of these two paths in updateSurface
created an overlocking of mSurfaceLock, which is now acquired even
when mSurface won't be modified. In fact it's acquired whenever the
geometry changes. This means an application rendering thread which
creates delays between lock and unlock canvas could create undesirable
and needless delays on the main UI thread, if the SurfaceView geometry
updates. We also have some underlocking, where we aren't actually
locking when destroying the SurfaceView.

Test: Manual with test app
Bug: 206846658
Change-Id: Idc17d111eee7a7365af4e94a156e7c46c7ea8171
2022-05-04 21:51:55 +00:00
TYM Tsai
de9005c38f Fix Autofill dialog does not work
Apps have only one chance to get Autofill dialog support, it requires
attaching the autofillable view before the Activity has finished
laying out. This change moves the doing request to the view being
laid out, that is the same timing with what Autofill is doing about
the view is auto focused but under different conditions.

Bug: 226674898
Test: atest android.autofillservice.cts.dialog.LoginActivityTest
Change-Id: I9018b8db8673e3b917a303476666ae766fbe7891
Merged-In: I9018b8db8673e3b917a303476666ae766fbe7891
2022-05-04 19:12:42 +00:00
Darrell Shi
8176ed8b17 Add WM transit types for dream activity.
This change adds two WM transit types for opening and closing dream
activities, which allows the system to define transition in and out of
dreams, that are currently being overriden by other transitions.

Set the priority to be just below keyguard transit. The keyguard
occlude/unocclude already correctly handles the dream open/close
animation.

Bug: 222507937
Bug: 220311554
Test: atest WmTests:AppTransitionControllerTest
Test: manually on device by entering and exiting dreams over keyguard,
launcher, and settings. observed animation and relevant types of WM logs.

Change-Id: Iedfa279d56cd9d4c4679cb3b697ee74a98ef727b
2022-05-04 17:13:52 +00:00
Galia Peycheva
0cea5a316b Merge "Fix missing position updates to blur regions" into tm-dev am: f372925a29 am: 3145e89c1c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17989463

Change-Id: I115562417c27f3325ed88bab0e28889208ae1aab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 16:55:15 +00:00
Galia Peycheva
f372925a29 Merge "Fix missing position updates to blur regions" into tm-dev 2022-05-04 16:09:27 +00:00
Riddle Hsu
4bf606c578 Move some IWindowManager methods to internal interface
The methods are only used in system server. It is unnecessary to
declare in aidl.

This also eliminates the confusion of missing permission check
for updateRotation().

Bug: 230863943
Test: atest WindowManagerPermissionTests
Change-Id: I703830650bab3a792982cada99aa1512430658a4
2022-05-04 22:53:17 +08:00
Robert Horvath
bb281dc5fc Merge "Fix re-registering PositionUpdateListener" into tm-dev am: 92d87441e8 am: 3bed2ee0bc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17957083

Change-Id: If211d4606f27ccc12a9dd2dcb7dec99c4946deff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 09:59:34 +00:00
Galia Peycheva
38cf61f704 Fix missing position updates to blur regions
The PositionUpdateListener sometimes gets called after the
FrameDrawingCallback, because there is no ordering guarantee between
these two callbacks. This causes the BlurRegions sent to SF to
not have up-to-date positions. For example, an empty Rect gets sent
as the blur region bounds, because the position update hasn't arrived
when the surface transaction is sent. When the position update arrives
it set the correct bounds, but it requires another draw to happen so
that the correct position is picked up.

This CL fixes this issue by saving the blur regions that were last sent
to SF in FrameDrawingCallback and sending another transaction when the
position update arrives. That transaction is merged into the previous
one for the same frame, so the final transaction sent to SF has correct
values.

The CL also moves the FrameDrawingCallback registering logic entirely in
the BlurAggregator in the first onPreDraw. This cleans up VRI

Bug: 197239228
Test: atest --iterations 100 BlurTest#testBackgroundblurSimple
Test: atest BlurAggregatorTest
Change-Id: Ia122df40fdf2aa124299461c2e2597b61fa92699
2022-05-04 08:36:04 +00:00
Robert Horvath
92d87441e8 Merge "Fix re-registering PositionUpdateListener" into tm-dev 2022-05-04 08:16:43 +00:00
Shan Huang
a6666f2221 Migrate IME to handle back with OnBackInvokedDispatcher.
We currently close the IME by having the target application forward KEYCODE_BACK to the IME process through InputMethodManager#dispatchInputEvent and having the IME handle the keycode in InputMethodService#onKeyDown. When apps opt in to OnBackInvokedDispatcher API, we will not dispatch KEYCODE_BACK to apps anymore. Thus we need to migrate IME to the new API for it to close on back invocation.

This implementation forwards OnBackInvokedCallbacks from the IME process
to the app process. This is necessary because all callbacks need to
exist in the app process for them to be considered by hardware back keys. While back gestures go through WM to resolve callbacks from the focused window, hw keys are directly sent to the focused window's ViewRootImpl, bypassing server side back nav logic.

Bug: 228358882
Test: atest CtsInputMethodTestCases:KeyboardVisibilityControlTest
Test: atest CtsInputMethodTestCases:InputMethodServiceTest
Test: atest CtsInputMethodTestCases
Change-Id: Ie207b63b11a56c9b2173f26b734a27b13ebccc60
2022-05-04 05:31:08 +00:00
Mateusz Cicheński
e969bf7d7d Merge "Add a description to the params of keep clear rects APIs." into tm-dev am: f829b1332f am: 6c19b582f1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17772404

Change-Id: If013bf89382b0e2234d7e436e22129f74af9544c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 19:19:01 +00:00
Mateusz Cicheński
f829b1332f Merge "Add a description to the params of keep clear rects APIs." into tm-dev 2022-05-03 18:09:16 +00:00
Jernej Virag
8c5597aa23 Merge "Trace Window relayout reasons" into tm-dev am: cfbbd755ff am: f80a3ee1a1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18090282

Change-Id: Ib0bc7b2d229e36bcd8747a805f525e4b9c5f459e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 07:45:32 +00:00
Jernej Virag
cfbbd755ff Merge "Trace Window relayout reasons" into tm-dev 2022-05-03 06:45:30 +00:00
TreeHugger Robot
c2fe26367f Merge "Removed extraneous comment delimiter from the getDefaultFocusHighlightEnabled method." into tm-dev am: f4adad3636 am: df483c2f45
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17896368

Change-Id: I665d56fde4cd42154a17ce5974e25d51a1d1e564
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 22:57:12 +00:00
Jacqueline Bronger
e6be24496c Merge "Handle PiP params changes in onTaskInfoChanged" into tm-dev am: 936456aebc am: b6a40eb62f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17523158

Change-Id: I7de138ba21dd7327d9470cc9d31e98e99c8a55c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 22:54:52 +00:00
Robert Horvath
9b1ccc06aa Merge "Rate limit calls from apps to reportKeepClearAreaChanged" into tm-dev am: c11507f96c am: 5f5f4eb076
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17982492

Change-Id: I46c7cc288e6b777b91db6da3df76b37133460e47
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 22:54:36 +00:00
TreeHugger Robot
2eafd3da04 Merge "Adds perfetto tracing to ScrollCaptureConnection" into tm-dev am: f9ccda5c78 am: c06cd36243
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18070157

Change-Id: I431eb8a7f8d301caca4e3400ab6ad152cde30804
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 22:48:35 +00:00
TreeHugger Robot
2ec8bed6a1 Merge "Fix colorSpace lose during screen rotation." into tm-dev am: 0be3f09073 am: 4defc7f61e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18092563

Change-Id: I80ffb989ef411664623da5d83ba7d6c279334d48
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 22:48:20 +00:00
Taran Singh
e616c7c0be Merge "Fix InputConnection creation callback" into tm-dev am: d5bb81348c am: 38d073d25f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17896003

Change-Id: I00dd54de32bd23dbd853fe62fce038c3a736fda8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 22:41:30 +00:00
TreeHugger Robot
70d2cb1f7b Merge "Allow rapid request/release of pointer capture" into tm-dev am: 5b22099c1c am: ee96617663
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17523884

Change-Id: Ib55604e43b9757a53246f728650dec747864c595
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 22:37:38 +00:00
Leon Scroggins
fce0e2d655 Merge "Propagate HDR information to screenshot animation." into tm-dev am: 866f67dc94 am: a3b81cf306
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17992944

Change-Id: I327c82a0a416f06d7d643e479b2aafbd7c0f893d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 22:36:19 +00:00
Ming-Shin Lu
fef0f85a8c Merge changes I96b17c78,If4b09f5b into tm-dev am: e6a860a747 am: 7435a70a35
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17943634

Change-Id: Idbdc5095cb231600b779db37ee86512e83544ef8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 22:35:33 +00:00
Naomi Musgrave
168d09f1f6 Merge "Only return ROTATION_0 for WM#getPossibleMaximumWindowMetrics" into tm-dev am: 439a7fe9a0 am: 3451f11f72
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17942483

Change-Id: I3fbf21fa234522e4a13b48b48e5162695e6af292
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 22:33:56 +00:00
TreeHugger Robot
f4adad3636 Merge "Removed extraneous comment delimiter from the getDefaultFocusHighlightEnabled method." into tm-dev 2022-05-02 17:13:17 +00:00
Jernej Virag
c48601b0af Trace Window relayout reasons
Window relayouts (and subsequent binder calls) are common performance issues
and the reason for relayout can be hard to determine in Perfetto traces.

This adds reason for triggered window relayout to the trace
if View tracing is currently enabled.

Bug: 231121537
Test: Using perfetto, see https://screenshot.googleplex.com/AgsM2pfidDAav7j
Change-Id: Ib1d9b673517eb80b09c6bacedd34e26cb502877b
2022-05-02 12:45:39 +00:00
Jacqueline Bronger
936456aebc Merge "Handle PiP params changes in onTaskInfoChanged" into tm-dev 2022-05-02 08:35:59 +00:00
Robert Horvath
c11507f96c Merge "Rate limit calls from apps to reportKeepClearAreaChanged" into tm-dev 2022-05-02 08:05:26 +00:00
TreeHugger Robot
f9ccda5c78 Merge "Adds perfetto tracing to ScrollCaptureConnection" into tm-dev 2022-04-30 00:57:52 +00:00
TreeHugger Robot
0be3f09073 Merge "Fix colorSpace lose during screen rotation." into tm-dev 2022-04-29 23:17:53 +00:00
Rachel Lee
beecfa7b38 Merge "Remove getLatestVsyncEventData in Choreographer." into tm-dev am: fa426b9d49 am: 1b3b5cb738
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17969373

Change-Id: Ibc9191498588a745c09ad22fddfea609b700c2b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 20:59:11 +00:00
Sally Qi
195ff67523 Fix colorSpace lose during screen rotation.
- setColorSpace only supports Display_p3 and sRGB

Bug: 229735367
Test: test picture rotation and check log
Change-Id: If2d6ab965be28d35a3adf330e7050e16e40f9620
2022-04-29 13:19:37 -07:00
Mark Renouf
2088e50967 Adds perfetto tracing to ScrollCaptureConnection
Change-Id: I7d018fa7c4e4eb3261a75165713303756b271520
2022-04-29 16:11:27 -04:00
Taran Singh
d5bb81348c Merge "Fix InputConnection creation callback" into tm-dev 2022-04-29 18:58:36 +00:00