Commit Graph

18260 Commits

Author SHA1 Message Date
Jon Eckenrode
3d1fe11556 Merge "Revised the API documentation of the getLocationOnScreen, getLocationInWindow, and getLocationInSurface methods of View." into tm-dev 2022-04-04 13:31:41 +00:00
Yunfan Chen
00c67a2569 Merge "Provide gesture and tappable element insets for caption" am: 268eff33ec am: 3cd3a85988 am: 0c0ed6f1c1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2052567

Change-Id: I5507131ce08964e99dca2bfa4b416ff7010481a6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-04 03:59:51 +00:00
Yunfan Chen
3cd3a85988 Merge "Provide gesture and tappable element insets for caption" am: 268eff33ec
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2052567

Change-Id: I1e6bf195c6783ba547915653fb3451598cfeb972
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-04 03:30:58 +00:00
Shan Huang
69a3984aae Remove OnBackInvokedDispatcherOwner interface.
Test: m -j update-api. Build and flash and test back behavior throughout
the system.
Bug: 227500290

Change-Id: Ibdb13d02e044741d05d99f1cad96e43dc0129fe4
2022-04-01 20:27:34 +00:00
Vadim Caen
d0923a2197 Merge "Split animation methods out of OnBackInvokedCallback" into tm-dev 2022-04-01 20:13:30 +00:00
Vadim Caen
c627777dda Split animation methods out of OnBackInvokedCallback
This makes OnBackInvokedCallback SAM compatible

Bug: 227789359
Test: atest \
        CtsWindowManagerDeviceTestCases:android.server.wm.BackNavigationLegacyTest \
        CtsWindowManagerDeviceTestCases:android.server.wm.BackNavigationTests \
        WmTests:com.android.server.wm.BackNavigationControllerTests \
        FrameworksCoreTests:android.window.BackNavigationTest \
        FrameworksCoreTests:android.window.WindowOnBackInvokedDispatcherTest \
        CtsViewTestCases:android.view.cts.OnBackInvokedDispatcherTest
Change-Id: Iab86b0488f1b3048eb02042191acaeb6a645a0bc
2022-04-01 20:09:26 +00:00
Gaurav Bhola
be5abebe9f Merge "Add the insets visibilities requested by the focussed window in topFocussedWindowChanged() api." into tm-dev 2022-04-01 19:57:58 +00:00
Prabir Pradhan
baf0f20718 Merge "Remove injectInputAfterTransactionsApplied from WMS" into tm-dev 2022-04-01 19:39:15 +00:00
Chavi Weingarten
c250d4054c Merge "Clean up buffer sync logic in SurfaceView." into tm-dev 2022-04-01 18:17:25 +00:00
Vadim Caen
9e3ac14976 Merge "Add View.findOnBackInvokedDispatcher" into tm-dev 2022-04-01 17:49:33 +00:00
Ming-Shin Lu
df8e2a5131 Merge "Fix insets animations being skipped when the host view was invisible" into tm-dev 2022-04-01 16:02:52 +00:00
Vadim Caen
a28e989921 Merge "Some cleanup logging and test for back navigation" into tm-dev 2022-04-01 15:57:59 +00:00
Vadim Caen
71297c8aab Some cleanup logging and test for back navigation
- Better logging
 - Remove method form OnBackInvokedDispatcher interface (but not the
   implementation)
 - Add test for ag/17211289

Bug: 222675481
Test: BackNavigationControllerTests#testUnregisterCallbacksWithSystemCallback
Change-Id: I6a3ae30da7e29dddda116acd8fa0c9af4b9faa6e
2022-04-01 15:57:49 +00:00
TreeHugger Robot
c5866bede0 Merge "Re-deprecate animation backgroundColor API" into tm-dev 2022-04-01 11:48:52 +00:00
Michael Wright
cf4d6368e1 Merge "Undeprecate LayoutParams.preferredRefreshRate" into tm-dev 2022-04-01 10:43:35 +00:00
Vadim Caen
b23c8c8e87 Add View.findOnBackInvokedDispatcher
To make it easier for developer to migrate away from KEYCODE_BACK
without having to walk up the view hierachy in order to find an
OnBackDispatcher, introduce findOnBackInvokedDispatcher.

Bug: 227301455
Test: android.view.cts.OnBackInvokedDispatcherTest#testGetDispatcherOnView
Change-Id: I7f3e76df596d306fa26d72df8115d5b15d7ac564
2022-04-01 11:15:30 +02:00
Ming-Shin Lu
63a95a2795 Fix insets animations being skipped when the host view was invisible
In case the insets animation frame will not be scheduled by render
thread when the host window was not visible to user, added
ViewRootInsetsControllerHost#isVisibleToUser to check when invoking
applySurfaceParams to schedule the next frame, if the host was not
visible means we don't have to synchronize with the window host and
just apply the surface transaction on the UI thread directly.

Fix: 206992027
Test: manual as steps
  1) Receive any incoming message
  2) Tap on inline reply to show the keyboard
  3) Tap on the voice input button on the keyboard
  4) when permission dialogue prompts on the screen, expecting both
     notification shade panel collpse animation and IME hiding animation
     are working fine without any stucked frame.

Change-Id: I266587d5a3f136149d116214e2a49de92466ec2e
2022-04-01 15:36:41 +08:00
Yunfan Chen
16e58e7322 Provide gesture and tappable element insets for caption
Caption is covering the app region and will take gesture and tap events
when the user interact with the caption. This change will make sure the
app can receive the caption as a part of the tappable element insets and
gesture insets to avoid the caption overlaps with interactive elements
inside the window.

Bug: 219987804
Bug: 209717743
Test: atest, see the bugs

Change-Id: I6e48f8df6eb8f73a2f62f34109f4d80d09021929
2022-04-01 05:20:03 +00:00
Pablo Gamito
2b770a7e86 Re-deprecate animation backgroundColor API
It's prefered to keep the API deprecated since the API was previously
deprecated and made a noop. Undeprecating it would lead to inconsistent
behavior across android versions. With the API not working on some
versions which can easily look like a bug from a developer's
perspective.

Instead we create a new API for the animation background effect refering
to an animation backdrop instead of a background. This also required
updating other API references of background in this context to backdrop.

Bug: 226122431
Test: atest CtsWindowManagerDeviceTestCases:ActivityTransitionTests

Merged-In: I4493d22a33606d639d498b6dc0f6f1bfa3d7f135
Change-Id: I4493d22a33606d639d498b6dc0f6f1bfa3d7f135
2022-03-31 23:27:01 +00:00
Sally Qi
acdf1d1252 Merge "Disable HDR dimming when screen rotates." into tm-dev 2022-03-31 23:19:06 +00:00
joneckenrode
794d292a4d Revised the API documentation of the getLocationOnScreen, getLocationInWindow, and getLocationInSurface methods of View.
Bug: b/172573956
Test: Built API docs
Signed-off-by: joneckenrode <joneckenrode@google.com>
Change-Id: If9c74f7f8b71111f38d020d8e776f4da67e0c62e
2022-03-31 21:05:51 +00:00
Santos Cordon
b20c5a1d49 Undeprecate LayoutParams.preferredRefreshRate
This was previously deprecated in favor of preferredDisplayModeId.
However, display modes include specific resolutions
so we would still need an API for the valid use-case
of specifying only a preferred refresh rate.

Bug: 227627158
Bug: 224915081
Test: built locally
Change-Id: Ic7c711d03d3ccc7a5193b26ca38159f048777927
2022-03-31 18:43:22 +00:00
Prabir Pradhan
603fea1fab Remove injectInputAfterTransactionsApplied from WMS
Since we already have IWindowManager#syncInputTransactions, we can
remove the need to have an input injection API in the window manager
interface.

Bug: 227356680
Test: presubmit
Change-Id: I730d05eec85978d8813e0924ddb4dba26922ea9f
2022-03-31 15:01:15 +00:00
TYM Tsai
e6ae224102 Merge "Make TextView do not show IME when fill dialog popup" into tm-dev 2022-03-31 14:09:17 +00:00
Hiroki Sato
2c06ff3da8 Merge changes from topics "presubmit-am-166ca8e59ac8499bb6b4f4cad6aae045", "presubmit-am-1a825bf4d182432b91541a8629e0e351" into tm-dev
* changes:
  Add private API InputMethodManager#reportVirtualDisplayGeometry
  Reland CursorAnchorInfo#createForAdditionalParentMatrix()
2022-03-31 00:15:59 +00:00
Garfield Tan
3bea7df55b Merge "Hide CaptionDecorView behind CAPTION_ON_SHELL flag" into tm-dev 2022-03-31 00:03:59 +00:00
Sumir Kataria
ef65e8b8e1 Merge "Add documentation clarifying the differences between Surface/TextureView" into tm-dev 2022-03-30 23:07:34 +00:00
Evan Laird
8908730d94 Merge "Update docs for WindowInsets#getPrivacyIndicatorBounds" into tm-dev 2022-03-30 19:03:18 +00:00
Mark Punzalan
6d57b10190 Merge "Trigger newly-registered callbacks with events from currently active translations." into tm-dev 2022-03-30 18:15:07 +00:00
Gaurav Bhola
3b42bacd29 Add the insets visibilities requested by the focussed window in
topFocussedWindowChanged() api.

- This is helpful when DisplaySystemBarsController needs to show/hide
  the bars depending on what the window has requested.

Bug: 224883596
Test: atest DisplayInsetsControllerTest
Change-Id: If00231b96153c9c7830fd948003e00a93c8294cd
2022-03-30 17:14:47 +00:00
Sally Qi
cf8913451f Disable HDR dimming when screen rotates.
- Disable dimming for screenshot layer

This is to fix HDR flicker in picture-in-picture mode. Because the
screenshot layer of rotation is an SDR image containing
tone-mapping HDR content, and this would cause HDR part to be suddenly
dimmed during rotation along with the entire screenshot, even though
DisplayManager maintains different HDR and SDR while white points during
during rotation animation.

Therefore, we add a hidden api to allow to dim a particular layer. This
effectively sets the white point for that layer to be same as the
display brightness. Then the screenshot with this flag can be used a
part of the rotation animation in order to remove flikering effects.

Bug: 224860402
Test: check HDR vidoes when rotation
Change-Id: Ib5c02635928cb9779e6f7968d2ec0ac9e659420b
Merged-In: Ib5c02635928cb9779e6f7968d2ec0ac9e659420b
2022-03-30 16:24:02 +00:00
Tiger Huang
957b746c51 Merge "Bring fullscreen backdrop frame back" into tm-dev 2022-03-30 14:26:03 +00:00
Mark Punzalan
6c3d2f7b7d Trigger newly-registered callbacks with events from currently active
translations.

Bug: 192331240
Test: atest android.translation.cts.UiTranslationManagerTest
Test: Manually on device:
  1. Kill Gboard
  2. Open translatable Chat conversation, wait for Live Translate
  4. Focus on chat input
  5. Auto-translate on Gboard is opened, and debug logs show
     "TranslationManagerServiceImpl: Triggering callback for..."

Change-Id: Ida82a947491e8157fac5cd43939d6d358fbe6c7b
2022-03-30 05:35:46 +00:00
Sumir Kataria
4ea4f632da Add documentation clarifying the differences between Surface/TextureView
Test: Built docs
Change-Id: Iec47b85bbfc537932832b1ad3fa98975a93075df
2022-03-30 04:32:47 +00:00
Garfield Tan
47acf93da2 Hide CaptionDecorView behind CAPTION_ON_SHELL flag
Also introduce a system property to facilitate debugging of caption in
shell.

Bug: 165794636
Test: Caption shows when the property is unset. Caption goes away when
the property is set.

Change-Id: I57060778c46da217a957910f0cc9d1fe1592cfa1
2022-03-29 19:59:50 +00:00
Chavi Weingarten
8089e6f249 Merge "Force draw during a blast sync and disable rt animations" into tm-dev 2022-03-29 18:38:02 +00:00
Evan Laird
8bf356b5e6 Update docs for WindowInsets#getPrivacyIndicatorBounds
Added a paragraph to be more descriptivea bout how the bounds are
loaded, and when they would be expected to change. In particular, added
a clause to state that the bounds should never be null so long as there
is a StatusBar window.

Fixes: 189190379
Test: read docs
Change-Id: I0392310d3a19ea6f6a74010266e90ffe5c1543e9
2022-03-29 14:35:39 -04:00
Tiger Huang
918d95ca89 Bring fullscreen backdrop frame back
We might need to bring the legacy split-screen back. This CL restores
the logic of the fullscreen backdrop frame.

Bug: 161810301
Test: Drag the split-screen divider after setting
      ActivityTaskManager#setSplitScreenResizing to true
Change-Id: Ifdc8b7695595e81e381b3311cf0d266f9af4be23
2022-03-29 17:22:12 +00:00
Aurimas Liutikas
f5b7e1f67d Merge "Add siyamed@ to android/view OWNERS" am: 30cbfdba0a am: 98ce07baf9 am: 500742b6ec
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2046963

Change-Id: I1cef4b1bff1d0db2e4a8ecf0949da1e147ec3e6a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 15:34:33 +00:00
Aurimas Liutikas
500742b6ec Merge "Add siyamed@ to android/view OWNERS" am: 30cbfdba0a am: 98ce07baf9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2046963

Change-Id: Iab5975be189871e3e5432d0c85ad666cbb53d200
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 00:46:39 +00:00
Aurimas Liutikas
7b08f0d899 Add siyamed@ to android/view OWNERS
Change-Id: I9b4f911451e1bbd6d87d012f3c553a5da597c027
Test: None
2022-03-28 21:39:28 +00:00
Prabir Pradhan
a4f617f451 Merge "Ensure handwriting session can only be started from inside app bounds" into tm-dev 2022-03-28 19:24:20 +00:00
Vadim Caen
09f7f6f69b Merge changes from topic "presubmit-am-b87ddd3bbf2947f1aa639cddcee6ecb8" into tm-dev
* changes:
  Remove callback before WindowState removal
  Improve startBackNavigation stability
2022-03-28 18:53:26 +00:00
chaviw
7b7dabc218 Force draw during a blast sync and disable rt animations
When ViewRootImpl is going to draw a frame due to a blast sync request,
we call forceDrawNextFrame to ensure we get a draw this vsync, even if
RT animation rendered a frame. This will ensure that we aren't required
to reschedule a draw either in rt thread or ui thread since we'll get a
frame back as long as there's an available buffer.

We also disable rt animations if a sync set has started with Syncer and
then re-enable when the sync set is complete. This ensures we don't
continue to acquire buffers for a render thread scheduled animation
during a UI animation since we want the UI request to get the buffer.

Test: Open internet dialog from notification shade on 60hz device
Fixes: 217621394
Bug: 200284684
Change-Id: Ic1534d21b0ee2ad82f20ff34df4cbbbad87557fd
2022-03-28 09:41:25 -05:00
Hiroki Sato
708c957fa3 Add private API InputMethodManager#reportVirtualDisplayGeometry
This logically relands the change [1] which added an @hide api
InputMethodManager#reportActivityView() with renaming as
reportVirtualDisplayGeometry().

Because ActivityView was removed, this API was removed [2] once.
However, because this API is useful for OEM customization, this change
adds the same API with a generalized method name.

Note that there was a change on how cross-display input connection
cursor update is blocked [3]. Thus, this CL adapts to it.

[1] Id0411a80456182111bb5b681c6d1230b58e7ec2e
[2] Idd60d96a39f827197d189beb5de016446576d9cd
[3] Iec12733d37e112b7271436bba15094ae2a55a450

Bug: 224424149
Test: manual. Cursor is updated in cross-display connection.
Change-Id: I35b491da5a340844e17542d7a6198f8152bbeda3
2022-03-28 20:03:24 +09:00
Hiroki Sato
62af809a65 Reland CursorAnchorInfo#createForAdditionalParentMatrix()
This logically relands the CL [1], which added an @hide method
CursorAnchorInfo#createForAdditionalParentMatrix().
The corresponding change was once removed in [2].
This is a preparation to reland a change that supports
InputMethodManager#reportActivityView() again.

[1] Ic7f9057623ffc61ec7a6121735dc39adecf4649d
[2] I0a05453eeed863db5bfe4b965ab4bcbad67f2783

Bug: 224424149
Test: CursorAnchorInfoTest
Change-Id: I0a411453c7c26795d28e913a96be8eb8fa3684d7
2022-03-28 20:03:15 +09:00
Tiger Huang
5b19a1584a Merge "Send InsetsState to the client via IWindow#resized" into tm-dev 2022-03-26 03:50:44 +00:00
Chavi Weingarten
381743d2ee Merge "Remove consumeNextDraw and replace with SurfaceSyncer" into tm-dev 2022-03-25 22:08:17 +00:00
Robert Horvath
9d55afe25d Merge "Prevent ArrayList allocation for prefer keep clear areas" into tm-dev 2022-03-25 13:57:41 +00:00
Vadim Caen
d1a57ed491 Remove callback before WindowState removal
ViewRootImpl was removing the callback from the server after the
windowState was removed, which was consistently failing resulting in an
exception in the log.

Now the removal is done before the ViewRootImpl's window removal

Test: Manually check that the error is not appearing in the log
Bug: 226089354
Change-Id: Ie9cb9940791b16d6ae1b243079794583c87b1a5c
2022-03-25 14:11:45 +01:00