Commit Graph

18640 Commits

Author SHA1 Message Date
TreeHugger Robot
442b26f30d Merge "Add willShowImeOnTarget in RemoteAnimationTarget(Compat)" into tm-qpr-dev am: 5c0ba8f0f5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19395267

Change-Id: I55490a5534b2206ecb23c2822d5e65e639d4abc3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 13:19:59 +00:00
TreeHugger Robot
5c0ba8f0f5 Merge "Add willShowImeOnTarget in RemoteAnimationTarget(Compat)" into tm-qpr-dev 2022-08-02 13:05:02 +00:00
Wei Sheng Shih
23c3dd0294 Merge "Inject back key events if no focus window found." into tm-qpr-dev am: 117bab591c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19144840

Change-Id: Ifcb3e44f8ccf21dde71a7663058380a0ca117aa4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 11:56:11 +00:00
Wei Sheng Shih
117bab591c Merge "Inject back key events if no focus window found." into tm-qpr-dev 2022-08-02 11:40:59 +00:00
TreeHugger Robot
18b493725c Merge "Catch exception when unlinkToDeath" into tm-qpr-dev am: 9a5afdb60b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19346886

Change-Id: I8596b049461d6e4a76a64b9406a11b7ee3893977
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-01 12:48:21 +00:00
TreeHugger Robot
9a5afdb60b Merge "Catch exception when unlinkToDeath" into tm-qpr-dev 2022-08-01 12:15:31 +00:00
Christian Göllner
c0640e9380 Merge "Create WM letterbox background color API" into tm-qpr-dev am: 8ac996fd0d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19416409

Change-Id: I115b43baaebf59c55d2e92499848e16a91a2d280
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-29 15:11:01 +00:00
Christian Göllner
8ac996fd0d Merge "Create WM letterbox background color API" into tm-qpr-dev 2022-07-29 14:48:13 +00:00
Vali Calinescu
1d45c18296 Create WM letterbox background color API
Create a WM API that gives access to the letterbox background color and
checks for the multi-colored case (e.g. blurred background) for status
bar treatment

Fix: 238637307
Test: atest WmTests:WindowManagerServiceTests
Change-Id: I644c8fa36f20f4d11414a998396bb066f1a36a28
2022-07-29 12:18:30 +00:00
Tiger Huang
3995c4d303 Merge "Send size-compat scale to the client" into tm-qpr-dev am: 93a238d15d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19149526

Change-Id: If3a51277578c31ba2c0e8c75341b33cd1f5cd9ab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-29 09:23:15 +00:00
Tiger Huang
93a238d15d Merge "Send size-compat scale to the client" into tm-qpr-dev 2022-07-29 08:56:14 +00:00
wilsonshih
f22e6b03ef Inject back key events if no focus window found.
If user applied a back gesture but core cannot find a focus window,
inject back key event, so that event can dispatch to client once it
gain focus window. And since the gesture was happened, treat it as
onBackPressed.
And if device is playing recents animation but the focus window is
point to live tile, we can also inject back key because Home/Recents
activity shall not have the same behavior as normal app.

Bug: 237629607
Test: cross test that back gesture can finish recents with legacy/shell
transition on Nexus/3rd launcher.
Test: test on BackTestApp for both 3btn mode and gesture mode.
Test: atest AnrTests BackNavigationLegacyGestureTest
Test: atest OnBackInvokedDispatcherTest KeyboardVisibilityControlTest
BackInvokedOnWidgetTest BackNavigationTests BackNavigationControllerTests

Change-Id: If754e66ea7c1c4ec313c45d17d7f6c10bfc2c465
2022-07-29 13:00:54 +08:00
Arthur Hung
89c25ce1f4 Merge "Cancel back invoke when window focus has lost" into tm-qpr-dev am: f52b49886c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19415501

Change-Id: I7d4fc2e6f3df820a4a4594b0368ff6bfbb12820f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-29 01:37:15 +00:00
Arthur Hung
f52b49886c Merge "Cancel back invoke when window focus has lost" into tm-qpr-dev 2022-07-29 01:18:09 +00:00
Tiger Huang
8210f8087d Merge "Let the client know the initial visibility of an InsetsSourceControl" into tm-qpr-dev am: b4a6c4bf46
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19379426

Change-Id: I57ac6c65931c46a1fa7423031b4b78193838e594
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-28 23:53:41 +00:00
Treehugger Robot
c695becb54 Merge "Improve docs for generated properties in PropertyMapper" am: 46a915f625 am: ef33f36050 am: 58b0f9d6b5 am: 1253941b56
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2165102

Change-Id: I6960e918ce061dc2984bbfdc76511c44614a47c8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-28 18:46:21 +00:00
Treehugger Robot
ef33f36050 Merge "Improve docs for generated properties in PropertyMapper" am: 46a915f625
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2165102

Change-Id: Ie0900ec085aa552075dc2f147125e0035d02b098
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-28 17:39:32 +00:00
Tiger Huang
b4a6c4bf46 Merge "Let the client know the initial visibility of an InsetsSourceControl" into tm-qpr-dev 2022-07-28 17:37:13 +00:00
Ming-Shin Lu
ce1a4f3fe5 Add willShowImeOnTarget in RemoteAnimationTarget(Compat)
..used for signaling the launcher to crop the
remote animation target bounds when task animating on the taskbar.

If the task will show IME on the top means the animation taget would not
need to be cropped according to the taskBar insets, since visually the
taskbar is hidden when IME is visible.

Bug: 219981732
Test: manual as steps
 0) enable taskbar with Settings > Developer options > Smallest width
    as 600dp.
 1) launch an app from all apps and show the IME by tapping the editor.
 2) swipe out to home and launch it again by pressing the shortcut.
 3) Verify the animating task preview with IME shown without being
    cropped.

Change-Id: Iab526e78614c68626bd5424e0e3219044f671f4d
2022-07-28 15:41:26 +00:00
Arthur Hung
e3476afe2a Cancel back invoke when window focus has lost
This reverts commit 0099ca8fab and provide
new mechanism.

The back invoke target could lost focus during back navigation gesture.
To prevent the non-focused window could still trigger back action cause
some unexpected behavior, this CL will listen the focus change of
current focused window and cancel back gesture when its focus has lost.

Bug: 238050065
Bug: 239792909
Test: atest BackNavigationControllerTests
Test: atest BackNavigationLegacyGestureTest BackNavigationLegacyTest
Test: atest BackNavigationTests
Test: atest WindowOnBackInvokedDispatcherTest BackNavigationTest
Test: atset BackAnimationControllerTest

Change-Id: I65eb19371020ce39977eeb2a2a80c7f08600aaec
2022-07-28 06:42:10 +00:00
Tiger Huang
c77eaf873d Send size-compat scale to the client
The client computes the window frame on its own in ViewRootImpl#setView.
However, the bounds obtained from WindowConfiguration is not size-
compatible, which makes legacy apps produce wrong frames. The frame is
larger than expected, so when computing WindowInsets with size-
compatible InsetsState, the window cannot receive insets.

Although the client will receive the correct window frame from relayout,
but the first WindowInsets has been dispatched before that.

This CL sends the size-compat scale to the client, so the client can use
the correct WindowConfiguration to compute frames.

This is also a step to enable the client to perform local window layout.

Bug: 237749017
Bug: 161810301
Bug: 175861127
Test: atest StartingSurfaceDrawerTests WindowAddRemovePerfTest
      ActivityRecordTests WindowManagerServiceTests
Change-Id: I6b23901f4b1f009444c04da7e078ea971a386ad7
2022-07-27 14:10:10 +08:00
TYM Tsai
d30a3c7f85 Catch exception when unlinkToDeath
Catch the exception to avoid the system down.

Bug: 238417834
Test: atest CtsCaontentCaptureService
Change-Id: Ifacb91d9e961b71df0ac41690b952be981711870
Merged-In: Ifacb91d9e961b71df0ac41690b952be981711870
2022-07-27 01:59:20 +00:00
Ember Rose
64a82e5c30 Improve docs for generated properties in PropertyMapper
Change-Id: I1e927013d14731d3be5024bc581ebd664f878eb9
Test: N/A
Bug: 237226979
2022-07-25 21:34:03 +00:00
Tiger Huang
a805cf5910 Let the client know the initial visibility of an InsetsSourceControl
Previously, the client compares the requested visibility with the
source visibility to decide if it needs to play the insets animation or
not. However, the source visibility is not stable while the client is
gaining the control. If the source and the control come from
IWindow#insetsControlChanged, the source has the previous visibility. So
the client can detect the visibility change. If the the source and the
control come from IWindowSession#relayout, the visibility of the source
has been overriden by the requested visibility of the client. So the
client cannot detect the change and cannot play the animation.

This CL lets the client know the initial visibility of the control.
While gaining leash, the client can use the information to decide if
it needs to play animation or not.

Fix: 209064170
Fix: 238496738
Test: atest ImeInsetsSourceConsumerTest InsetsAnimationControlImplTest
      InsetsControllerTest InsetsSourceConsumerTest
      DisplayImeControllerTest
Test: 1. Enable shell transitions
      2. Open camera.
      3. Perform back gesture.
      See if there is status bar animation.
Change-Id: I2c02e97e191ebd83238c0c54908e861d200d4c8d
2022-07-25 09:19:15 +00:00
Tiger Huang
00cb7e70d7 Merge "Enable privileged apps to set unrestricted gesture exclusion" into tm-qpr-dev am: a1be3b43bb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19354712

Change-Id: I14feca9b2005849f612f92e89ee8633d04b8c829
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-22 03:48:59 +00:00
Gaurav Bhola
759f654444 Merge "Add a new Insets type for overlapping windows." into tm-qpr-dev am: 928c9c0eec
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19151077

Change-Id: I95c08e2947517cdc913925a67bc6fd3fac62ef01
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-22 03:47:50 +00:00
Tiger Huang
a1be3b43bb Merge "Enable privileged apps to set unrestricted gesture exclusion" into tm-qpr-dev 2022-07-22 03:31:41 +00:00
Gaurav Bhola
928c9c0eec Merge "Add a new Insets type for overlapping windows." into tm-qpr-dev 2022-07-22 03:31:21 +00:00
Arthur Hung
6ce8c4a98c Merge "Ignore back invoke when window focus has lost" into tm-qpr-dev am: 1476873423
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19291068

Change-Id: I30d3f47a89bae0fb6aa768fa00d2cd8b9c3c0f28
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 05:11:42 +00:00
Arthur Hung
1476873423 Merge "Ignore back invoke when window focus has lost" into tm-qpr-dev 2022-07-21 04:49:44 +00:00
Ming-Shin Lu
c26ace2dac Merge "Remove hideCurrentInputMethod from RecentsAnimationController" into tm-qpr-dev am: b78add71fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19346888

Change-Id: I8d6befcef573aea98e7086cb357ebfdd487be3e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-20 16:35:12 +00:00
Tiger Huang
e80e47f866 Enable privileged apps to set unrestricted gesture exclusion
System UI won't need to check if the gesture blocking activity is
running or not every time a task changes.

Bug: 229048429
Test: atest DisplayContentTests PermissionPolicyTest
Change-Id: I5a72121c8b20b172ea5c1d060960ce14a7420aa9
2022-07-20 16:33:49 +08:00
Arthur Hung
0099ca8fab Ignore back invoke when window focus has lost
The back invoke target could lost focus during back navigation.
To prevent the non-focused window could still trigger back action cause
some unexpected behavior, this CL will listen focus changed and skip the
back invoke call.

Test: launch a trampoline activity and trigger back before next activity
shown.
Test: atest WindowOnBackInvokedDispatcherTest
Bug: 238050065

Change-Id: Ifd345b2283c5d07628e2884db6e4e13f3ec31e83
2022-07-20 04:26:45 +00:00
Ming-Shin Lu
7a593c23ae Remove hideCurrentInputMethod from RecentsAnimationController
Since CL[1] migrate hide IME logic when quick switching split-screen
task to InputMonitor.

As a result, remove unused API since it would be no longer to
expose hideCurrentInputMethod for launcher to handle gesture.

[1]: Ibfcd48e623336c4690b71c4db0ce1ad8f5b26fc9

Bug: 166736352
Bug: 193990612

Test: manual test as steps
1) launch any apps with focusing an editor
2) from overview, select any app to enter split-screen mode
3) taping the editor to show the keyboard
4) swipe up to overview or quick switch app tasks
5) expect the keyboard will be hidden when starting the gesture.

Change-Id: I299c3ac8531fa28c68c997e44fb168819e85d465
2022-07-20 00:15:53 +00:00
Caren Chang
8bd8e3ee20 Merge "Add explanation about the purpose of accessibility heading and use case apps should consider." am: 407d531735 am: afc1b7d01e am: 08ae6de00f am: 389bce3764
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2151635

Change-Id: Ife6f292b0350a51409ed45d075a379890ada7b8b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 23:29:33 +00:00
Caren Chang
afc1b7d01e Merge "Add explanation about the purpose of accessibility heading and use case apps should consider." am: 407d531735
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2151635

Change-Id: If08ab9af3186e37a8e59863ac701d3679e18bd36
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 22:29:08 +00:00
Alex Stetson
bbe98fef6a Merge "Update topFocusedWindowChanged API" into tm-qpr-dev am: eb04bd2461
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19240597

Change-Id: I784ce823efcb530e66f87ab547a0c550fac1fd81
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 21:20:34 +00:00
Alex Stetson
eb04bd2461 Merge "Update topFocusedWindowChanged API" into tm-qpr-dev 2022-07-19 21:01:49 +00:00
Caren Chang
02bbf4b30c Add explanation about the purpose of accessibility heading and use case apps should consider.
Change-Id: I01bdd1fc89d54e62e9ce1f8dc15a58d13c56fabc
Test: N/A, documentation chang
2022-07-18 21:19:44 +00:00
Gaurav Bhola
84fd8a6331 Add a new Insets type for overlapping windows.
- This type will be used in the cases where the app's UI overlaps with some system window or some other WindowContainer hosted by the system.
- Remove the LOCAL_NAVIGATION_BAR 1 & 2 as those are not required and GENERIC_SYSTEM_WINDOW can be used instead of those.

Bug: 232017511
Test: atest WindowContainerTests
Test: atest WindowOrganizerTests
Change-Id: I9d79f39a2a17cb5db4e56439399152a65621c41f
2022-07-18 11:35:16 -07:00
TreeHugger Robot
c11bab5bbe Merge "Remove view based on known index of the view on exception" into tm-qpr-dev am: 31f6e65c85
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19299681

Change-Id: I748dcc4a81da53fc5948215d386f498f344958fe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-18 18:02:22 +00:00
TreeHugger Robot
31f6e65c85 Merge "Remove view based on known index of the view on exception" into tm-qpr-dev 2022-07-18 17:53:04 +00:00
Sam Dubey
65851bb227 Merge "Revert "Reland "Make extra navigation bar count towards non decor frame"""" into tm-qpr-dev am: 661d05308a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19300566

Change-Id: Icdf3d72e80ff4640b047284d89bdf4225a69c3bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-18 06:20:51 +00:00
Beverly
b1525b85e1 Remove view based on known index of the view on exception
There's no need to findViewLocked - if the view
didn't already exist, then the view is added
to the end of the mViews list. findViewLocked
will need to iterate over all the views which
is unnecessary.

Test: manual
Fixes: 238954722
Change-Id: I3a22f59df84f512d4e914f0e3566927450284298
2022-07-15 16:53:42 +00:00
Sam Dubey
bc0d5539e6 Revert "Reland "Make extra navigation bar count towards non decor frame"""
This reverts commit 620e91578c.

Reason for revert: b/238985243

Change-Id: I1fc82c61b445b6f5ceedb2ec8b727e8e745f47c9
2022-07-15 12:22:44 +00:00
Yunfan Chen
2d3df2917e Merge "Reland "Make extra navigation bar count towards non decor frame""" into tm-qpr-dev am: 367ff5a1d8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18425968

Change-Id: I1db57d7f006915126eabbe8afb01f8fb5c2ffa0b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 03:23:05 +00:00
Yunfan Chen
620e91578c Reland "Make extra navigation bar count towards non decor frame""
This reverts commit 8626ad35b1.

Reason for revert: Trying to reland

The previous patch may delay a configuration update caused by the task
bar change, and dispatch the update when something irrelevant happens
such as dragging an icon to the workspace. Changed logic in WMS and
WindowState to ensure a configuration update in that case.

Test: TaplTestsQuickstep#testAllAppsFromHome (With task bar)
Test: CtsWindowManagerDeviceTestCases (With task bar)
Test: android.view.cts.ViewTest
Bug: 224404595
Bug: 205496695
Bug: 228380863
Change-Id: Ib192d4ad012fed136f808b15a84f8d83ca426b21
2022-07-13 08:33:56 +00:00
Yunfan Chen
57ad712787 Merge "Introduce InsetsSizeOverride" into tm-qpr-dev am: dd1b8480de
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19095354

Change-Id: I8784d9ebb838c7a906fb61119223a92e669f090f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-13 03:14:29 +00:00
Yunfan Chen
dd1b8480de Merge "Introduce InsetsSizeOverride" into tm-qpr-dev 2022-07-13 02:45:57 +00:00
TreeHugger Robot
4ab2bc56dd Merge "Make sure to cleanup views that couldn't be added" into tm-qpr-dev am: c01cce0313
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19138536

Change-Id: I7d52c9d73afd051076c6f4516272f7464fa88352
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-12 21:29:21 +00:00