Commit Graph

18682 Commits

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

Change-Id: I1732afb2832902d6d4ed54b2934394f880bf1a22
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-09 20:01:00 +00:00
Haoyu Zhang
70e963753a Merge "Scribe: Introduce HandwritingSlop" 2022-05-09 19:15:44 +00:00
Rupesh Bansal
336fcab788 Merge "Add documentation for LayoutParams.preferredRefreshRate" into tm-dev 2022-05-09 15:52:20 +00:00
TreeHugger Robot
0074695ddb Merge "Fixing an incorrect javadoc." 2022-05-06 22:55:44 +00:00
Shan Huang
4890b196dd Merge "Migrate IME to handle back with OnBackInvokedDispatcher." into tm-dev am: e3a61826eb am: 687f095281
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17952046

Change-Id: If970de371776a5d1a108030a0e4d2d495614a4be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 20:52:11 +00:00
Mark Punzalan
390069dc10 Merge "Reset translation state when views disappear." into tm-dev am: 4442058508 am: ca58839fbc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18010158

Change-Id: I10888ef1da60bf2a31aea0a1596381df40b222e5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 20:49:45 +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
4442058508 Merge "Reset translation state when views disappear." into tm-dev 2022-05-06 19:26:09 +00:00
Abbas Nayebi
6262056398 Fixing an incorrect javadoc.
Change-Id: I189059a8b2515e8e2e65afae6d7b5316fdcbb019
2022-05-06 17:37:29 +00:00
Taran Singh
f33d14db1d Merge "Introduce IMM#isStylusHandwritingAvailable()" 2022-05-06 16:06:51 +00:00
TreeHugger Robot
efbb57e861 Merge "Update renderer surface if rotation is changed" into tm-qpr-dev am: 86c9d56dc2 am: 62575ecdf0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18030727

Change-Id: Ib30e01fd9adf3f354853a853f8b5d0387939af8d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 14:49:18 +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
Rob Carr
1f4462425c Merge "ViewRootImpl/SurfaceView: Listen for queue stalls" into tm-dev am: 7a0ee72bff am: 38491dfa49
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17778270

Change-Id: Ic101688a91b0aec337897955c75f1cb6aeb52520
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 13:40:50 +00:00
Rob Carr
0f307647eb Merge "SurfaceView: Fix overlocking of mSurfaceLock" into tm-dev am: ec6577d13e am: 3445e4eeb3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17808703

Change-Id: I69f12ca4aa571624fcbdcdc101fb6e68afb6c8a5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 13:40:12 +00:00
Taran Singh
16b29c1476 Introduce IMM#isStylusHandwritingAvailable()
Introduce an API for app to query if currently selected InputMethod
supports stylus handwriting

Test: atest StylusHandwritingTest
Bug: 228514000
Change-Id: I0c606e94780ae6636585ab36b751fbf6e90a1cbf
2022-05-05 21:12:14 +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
f6bb7fe07a Merge "Move some IWindowManager methods to internal interface" into tm-qpr-dev am: 619760a5eb am: d8578446c4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18157299

Change-Id: I30f155da76d426e96f082b4f386e680f4e5e0fd4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-05 06:11:51 +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
TYM Tsai
a9fcc6339f Merge "Fix Autofill dialog does not work" 2022-05-05 05:25:47 +00:00
Xiaowen Lei
39d02f5ee2 Merge "Add WM transit types for dream activity." into tm-qpr-dev am: 15e2cd9298 am: 0b61ab32c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17696084

Change-Id: I9e444c6f3d47bd899e8f18ea37a25fdf82d5ab1c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 23:48:56 +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
936f665aac 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
2022-05-04 19:54:28 +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
Galia Peycheva
3caf7909c1 Merge "Fix missing position updates to blur regions" into tm-dev am: f372925a29 am: 3145e89c1c am: 0cea5a316b am: 1bfbe508c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17989463

Change-Id: Ib9e0cf4284daf7dc9392e666e537da7e037ed8da
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 17:57:24 +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
9e11ce0c97 Merge "Fix re-registering PositionUpdateListener" into tm-dev am: 92d87441e8 am: b7b366d6fb am: 37c65f2fa1 am: 342827d08d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17957083

Change-Id: I6b2ed96df5c8ea4431263c287720354070b049aa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 10:56:52 +00:00
Robert Horvath
342827d08d Merge "Fix re-registering PositionUpdateListener" into tm-dev am: 92d87441e8 am: b7b366d6fb am: 37c65f2fa1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17957083

Change-Id: I53f9eb859b825371d9a8d872226f7d74367f3bb3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 10:26:29 +00: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
c7fc53d8bf Merge "Add a description to the params of keep clear rects APIs." into tm-dev am: f829b1332f am: 00d9005bdd am: 7125d8f64f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17772404

Change-Id: Ic468b2635a719d0872ce67b3086b25ee871ebc04
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 19:34:48 +00:00
Mateusz Cicheński
66ce8a05a4 Merge "Add a description to the params of keep clear rects APIs." into tm-dev am: f829b1332f am: 29ad65493f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17772404

Change-Id: I9de8a9b3bb59f1dfee8bb6c9a56e490ae5236526
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 19:19:18 +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
Automerger Merge Worker
3e579bb9bc Merge "Merge "Introduce WindowlessWindowLayout" into tm-qpr-dev am: c1534e9727" into tm-qpr-dev-plus-aosp am: e17011a927
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17856348

Change-Id: Ifb96e77336a119496b66bc663fffe040340b39b0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 09:16:13 +00:00
Jernej Virag
e907834d1a Merge "Trace Window relayout reasons" into tm-dev am: cfbbd755ff am: f80a3ee1a1 am: fda8342a3e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18090282

Change-Id: Ie75d4000444760af11ce2b411852e82978899cea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 08:46:21 +00:00
Tiger Huang
0593493dc9 Merge "Introduce WindowlessWindowLayout" into tm-qpr-dev am: c1534e9727
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17856348

Change-Id: I8e73ce0ff3fe16de660abe43e8f5b7809656e88e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 08:45:42 +00:00
Jernej Virag
624985c771 Merge "Trace Window relayout reasons" into tm-dev am: cfbbd755ff am: 1ec9e808cc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18090282

Change-Id: I2e7eb859dfcd75d9b2815a2831275f8eb942d328
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 07:47:13 +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
Haoyu Zhang
3d462b0091 Scribe: Introduce HandwritingSlop
Introduced handwritingSlop for stylus handwriting inititiation.

Bug: 217603538
Test: atest android.view.stylus.HandwritingInitiatorTest

Change-Id: I9d7156bd5c2d86ed214fc805464a19639475e29f
2022-05-02 18:22:15 -07: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