Commit Graph

18273 Commits

Author SHA1 Message Date
TreeHugger Robot
579f8a6234 Merge "Allowing SurfaceViewHost to show up in layout inspector" into tm-dev 2022-04-07 09:28:47 +00:00
Riddle Hsu
a3348272e7 Merge "Pass background color from transition info to remote animation" into tm-dev 2022-04-07 08:41:17 +00:00
Tiger Huang
88fdb7aa46 Merge "Update touch mode regardless of mStopped" into tm-dev 2022-04-07 02:17:08 +00:00
Sunny Goyal
87ec28b2ed Allowing SurfaceViewHost to show up in layout inspector
Bug: 191298629
Test: Verified on device
Change-Id: I83c74423b6f33f45cdd93926badb2cad32c7a86d
2022-04-07 00:37:17 +00:00
Shan Huang
d47a172963 Merge "Dispatch KEYCODE_BACK to the full input pipeline in compat callback." into tm-dev 2022-04-06 17:38:38 +00:00
Tiger Huang
df309af84e Update touch mode regardless of mStopped
The very first state of touch mode is obtained from addToDisplay. It
should be applied in the first performTraversal regardless of mStopped.
In this way, when an app window is re-created at the background, the
touch mode state can still be up-to-date.

Fix: 227843343
Test: 1. Open Chrome and go to the homepage.
      2. Change the theme via the 3-dot menu > Settings > Theme.
      3. Go back to the homepage and see if any button is focused.
      Expected behavior: no button looks focused.
Change-Id: I2681e2436dd265abe9cd9bdd56ee5799fa30d89b
2022-04-06 18:26:27 +08:00
Rob Carr
169f3d8c61 Merge "ViewRootImpl: Ensure seqId only increases" into tm-dev 2022-04-06 04:53:55 +00:00
Haoyu Zhang
ef233d0fad Merge "Scribe: fix handwriting is not initiated in WebView" into tm-dev 2022-04-06 00:18:12 +00:00
Robert Carr
25bdf74a0b ViewRootImpl: Ensure seqId only increases
We could process an earlier scheduled MSG_RESIZED after
a later executed relayoutWindow. In this case we might
accidentally move the seqId backwards, which could mess
up our logic. While we are touching this area, we
take the opportunity to ensure SyncHandlers execute
in the order they were added.

Bug: 161810301
Bug: 227561299
Test: Existing tests pass
Change-Id: I8e5ceea1ef34e4da94807582c89a33df95772c04
2022-04-05 16:52:28 +00:00
Naomi Musgrave
65474b0f43 Revert "Temporary flag for Launcher to debug their usage of sandboxed display APIs"
This reverts commit 253696fea3.

Reason for revert: remove from tm-dev
Bug: 206649452

Change-Id: I013f08dfba89eb89e7713dddc1f4f894e335df62
(cherry picked from commit 608a679783)
2022-04-05 14:30:13 +00:00
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
Haoyu Zhang
e7ab12b469 Scribe: fix handwriting is not initiated in WebView
View#getHandwritingArea mistakenly returned a non-null Rect even for
view's which never calls setHandwritingArea. As a result, handwriting
is not properly initation for views other than EditText.

Bug: 227278641
Test: atest android.view.inputmethod.cts.StylusHandwritingTest
Change-Id: I45700f2684a2f4138f73eaa843d3019e6c26d2f6
2022-03-30 15:31:43 -07: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
Riddle Hsu
78c6b6b5fa Pass background color from transition info to remote animation
With shell transition, there won't be task info if the transition
is launching activity in the same task. ActivityLaunchAnimator
assumed the task info is non-null, which causes NPE.

Bug: 223397404
Test: adb shell setprop persist.wm.debug.shell_transit 1; reboot
      Long press quick settings tile from notification multiple
      time. Especially launch the same tile twice, systemui
      should not crash.
Change-Id: I0ad1fef17653d72162d430339ac7e8a716aa9bfe
2022-03-30 12:07:14 +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