Commit Graph

2691 Commits

Author SHA1 Message Date
Chris Li
7481586ab6 Merge changes Ida331585,I255fb336
* changes:
  Queue applySyncTransaction calls when there is active BLAST sync
  Queue startTransition calls made while already collecting
2022-01-25 02:19:36 +00:00
Jan Tomljanovic
c1f6071c2f Merge "Add privileged permission to the Settings app." 2022-01-24 12:55:19 +00:00
Tiger Huang
697660ac69 Merge "Let the client set transform hint on its own" 2022-01-23 18:02:11 +00:00
Peiyong Lin
76dfa05df9 Merge "Implement getGameModeInfo API." 2022-01-23 05:47:25 +00:00
Galia Peycheva
5c57f3bebf Merge changes from topic "keep_clear_areas"
* changes:
  Add keep clear rects API
  Add WMS support for keep-clear areas
2022-01-22 17:25:09 +00:00
Tiger Huang
5242af609e Let the client set transform hint on its own
This is a step to move the layout logic to the client side. We won't
invoke IWindowSession#relayout then.

Bug: 161810301
Test: atest WmTests
Change-Id: Ib5ac048a573907af0a81f3e228575d9458862cfd
2022-01-22 19:22:23 +08:00
Tiger Huang
c5ee8aa405 Merge "Pipe display install orientation 2/2" 2022-01-22 08:01:00 +00:00
Galia Peycheva
92edc518ff Add WMS support for keep-clear areas
Test: atest DisplayContentTests#testKeepClearAreasMultipleWindows
Test: atest WindowStateTests#testKeepClearAreas
Bug: 183746978
Change-Id: I974bf4254003467c8aa9a4f7aa618ab96985dd38
2022-01-22 08:50:02 +01:00
Peiyong Lin
4f8f656dca Merge "Raise SurfaceControlFpsListener to System API." 2022-01-21 20:30:59 +00:00
Vishnu Nair
80d665bbbc Pipe display install orientation 2/2
This is a step to move the layout logic to the client side. We won't
invoke IWindowSession#relayout then, and the client should be able to
set the transform hint on its own.

Bug: 161810301
Test: presubmit
Change-Id: Ib12a76fcc9906b3d9c487fb89bbe4520c682379a
2022-01-22 00:16:32 +08:00
Treehugger Robot
eadc950b1e Merge "Add permissions to the shell to allow creation of CTS tests for trust." am: 139e007dc5 am: d9b1d582b4 am: 6ce69e06a3 am: 3a26a48294
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1955633

Change-Id: Ib278ad053e744cf01c5f2b8cba8917d87a8d4290
2022-01-21 14:21:22 +00:00
Treehugger Robot
3a26a48294 Merge "Add permissions to the shell to allow creation of CTS tests for trust." am: 139e007dc5 am: d9b1d582b4 am: 6ce69e06a3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1955633

Change-Id: Id3401787f19347595c613d637adf2a7e6e09fbd9
2022-01-21 14:09:53 +00:00
Treehugger Robot
6ce69e06a3 Merge "Add permissions to the shell to allow creation of CTS tests for trust." am: 139e007dc5 am: d9b1d582b4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1955633

Change-Id: I51843ba8e7426a0a86f7227acba97051706e86f6
2022-01-21 13:47:08 +00:00
Vadim Caen
e0b59d46ce Merge changes Ifc2ed99b,Ibd7fc78e
* changes:
  Integration of back gesture animation on Sysui (BackNav 2/n)
  Server infrastructure for back nav animation (BackNav 1/n)
2022-01-21 13:36:58 +00:00
Jan Tomljanovic
3c897648e4 Add privileged permission to the Settings app.
Test: atest SettingsUnitTests
Bug: 208625216
Change-Id: Iad3474d56d499bf746edb07a56625bc2e607e492
2022-01-21 12:07:02 +00:00
Peiyong Lin
399e06d648 Raise SurfaceControlFpsListener to System API.
Previously the SurfaceControlFpsListener is a hidden API which only
allows platform code access. This patch renames it to follow the
callback convention and raises it to be a system API in order to allow
system applications to access the FPS count of a task and its children.
The FPS count access is guarded by a permission ACCESS_FPS_COUNTER.

To follow the API convention and properly check the permission, the
register/unregister callback APIs are moved to WindowManager and
permission check is done in the System Server.

Minor: Rename to SurfaceControlFpsCallback to TaskFpsCallback in order
to follow the API naming convention.

Bug: b/199920468
CTS-Coverage-Bug: b/199920468
Test: atest TaskFpsCallbackTest
Change-Id: I6b0a0ad6500278b3da09059e9c2ede28d9a743aa
2022-01-21 09:18:08 +00:00
Chris Li
1b97f8262c Queue applySyncTransaction calls when there is active BLAST sync
We currently queue applySyncTransaction in WM Shell, but it doesn't sync
with Shell transition collection. However, when both happen, it may
cause issue because the BLASTSyncEngine currently only support 1 sync at
a time.

Move the Shell transition queue to WindowOrganizerController as we only
queue organizer sync. Unfortunately, unlike organizer sync that is in
one WCT, we can't prevent any core-initiated transition.

We don't expect it to happen, but if it does, we need to handle them
case by case.

Fix: 213866869
Test: atest WMShellFlickerTests:ExpandBubbleScreen
Change-Id: Ida331585b018e848e2f801da55cb6a4b999950f4
2022-01-21 13:00:25 +08:00
Evan Rosky
72a8241ff7 Queue startTransition calls made while already collecting
Shell Transitions only supports 1 transition collecting at a time.
This limitation comes from BLASTSyncEngine. However, because Shell
can call startTransition at any time (and doesn't have a way to
know if WM is already "collecting" for a transition), we can't
just crash in this case. We also can't just use the existing
transition because it has a different "client" expecting results.

So, the best we can do is queue them up. Fortunately, the
startTransition API Shell uses is designed such that all the
relevant operations are in one WCT, so we can maintain server-side
correctness.

This CL adds a queueing mechanism for these situations. In practice,
this should actually never be needed; however, it is *technically*
possible and automated tests are more likely to hit it.

Bug: 183993924
Test: pass existing
Change-Id: I255fb336cb30c7d1e1b82188a31f9c693b9e138c
2022-01-21 12:59:05 +08:00
Shubham Dubey
5a183a4787 Allow systemui to set wallpaper dim amount.
Following up ag/16656706, as it updated the manifest

BUG: 215519628

Change-Id: I89d6f6f2ba9fcc96d8018f609683a95820bdd2e4
2022-01-21 02:38:14 +00:00
Peiyong Lin
c7f625ffc7 Implement getGameModeInfo API.
The Game Dashboard needs to access the active game mode and the
available game modes of a given game in order to provide the UX. Instead
of doing two queries with two binder calls, implement a new API to
capture all GameMode related states of a given package.

Minor: Don't return UNSUPPORTED when querying available game modes,
change MANAGE_GAME_MODE permission to allow system apps to access the
APIs.

Bug: b/199920468
Test: atest GameManagerServiceTests
Test: atest GameManagerTests
Change-Id: I45d9c2df5bffd6496f97140e44d0ca5afeee71b1
2022-01-21 01:31:27 +00:00
Dave McCloskey
48ae5a7790 Add permissions to the shell to allow creation of CTS tests for trust.
Test: m TrustTestCases in separate CL
Bug: 213631672

Change-Id: Ie215e988eebe4103458b8be4d00698ae1121f75d
2022-01-20 15:48:11 -08:00
Vadim Caen
a4ca5286d2 Server infrastructure for back nav animation (BackNav 1/n)
This CL introduces the BackNavigationController that gathers the
required data to be passed to WMShell to create the back animation

These data are passed via the BackNavigationInfo Parcelable.

The CL also containes a basic screenshoting mechanism as a temporary
solution until a proper screenshoting infrastructure is created
(b/207481538).

Test: atest BackNavigationControllerTests
Bug: 131727607
Change-Id: Ibd7fc78e590794daf35f7718ddfa53e7f439813b
2022-01-18 10:42:21 +01:00
Vania Desmonda
46888e3df2 Grant SET_WALLPAPER_DIM_AMOUNT permission to shell
Test: atest
Bug: 202841384
Change-Id: I25956393d5291f3b8f49bacead579975466e150e
2022-01-17 05:57:31 +00:00
Mariia Sandrikova
a274e1a7d4 DO NOT MERGE Revert "[2/n] Camera Compat UI: Add interfaces for client-server..." am: 7617679a61
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16571392

Change-Id: I0adf2bf45c5f7d7349e9c0f180aea9d10f70645d
2022-01-13 22:55:51 +00:00
Mariia Sandrikova
7617679a61 DO NOT MERGE Revert "[2/n] Camera Compat UI: Add interfaces for client-server..."
Revert submission 16468379

Reason for revert: Feature development is moving to T.

Reverted Changes:
Id9b9a8930:[3/n] Camera Compat UI: Add a camera compat contro...
Id6be4a954:Enable a camera app compat control on Large screen...
I083aa6718:[2/n] Camera Compat UI: Add interfaces for client-...

Bug: 206602997

Change-Id: I9ad876043fd61f708a8f468fffd1ef371bfa0866
2022-01-13 15:21:38 +00:00
Charles Chen
1c671ce110 Merge "Choose TDA by DisplayAreaPolicy for WindowContext" 2022-01-13 09:29:59 +00:00
Rahul Sabnis
c5b88ffe7b Merge "Make BluetoothHeadset APIs used by Telecom into System APIs" 2022-01-12 22:10:46 +00:00
Rahul Sabnis
0eeb1d32b4 Make BluetoothHeadset APIs used by Telecom into System APIs
Tag: #feature
Bug: 195156304
Test: Manual
CTS-Coverage-Bug: 211914959
Change-Id: I13d6f553f5b9d6ca7c2ae9a42450875b16cd1490
2022-01-12 09:25:35 -08:00
Elliot Sisteron
398ed934da Merge "Add MANAGE_SAFETY_CENTER permission." 2022-01-11 19:11:07 +00:00
Antoan Angelov
04a2f675bd Merge "Make LAUNCH_DEVICE_MANAGER_SETUP adoptable by shell for CTS tests" 2022-01-11 13:16:14 +00:00
Elliot Sisteron
39561ba353 Add MANAGE_SAFETY_CENTER permission.
Only for use by SafetyCenter (PermissionController), and shell for CTS
tests.

Test: atest CtsSafetyCenterTestCases
Bug: 203205376
Ignore-AOSP-First: Not announced yet, and permission hasn't been merged
in AOSP

Change-Id: I0f2ac01a0fc340b48d30b3e2006c2726a88c52a9
2022-01-10 14:50:21 +00:00
arangelov
31dafe7792 Make LAUNCH_DEVICE_MANAGER_SETUP adoptable by shell for CTS tests
Fixes: 213574164
Test: none
Ignore-AOSP-First: This new permission is part of a T-targeting feature
Change-Id: I9deebbb9721232ba29cbc5a8267a240761a2bc82
2022-01-07 14:36:48 +00:00
Xiaowen Lei
8b438be8e4 Clean up Communal Manager READ_COMMUNAL_STATE APIs.
These are not yet used, and are obsolete now because We will no longer
be shipping SLS in T.

Ignore-AOSP-First: tied to launch of new upcoming hardware.

Test: atest FrameworksMockingServicesTests:CommunalManagerServiceTest

Bug: 206054365
Change-Id: I51ffbfe5ddc89008d660fab7cfd5808cb827d300
2022-01-07 00:18:35 +00:00
Varun Bansal
02853cf179 Merge "Add tristate permission support for body sensor permission" 2021-12-22 17:09:55 +00:00
varun
4379a4cb56 Add tristate permission support for body sensor permission
Currently only states supported for body sensor permissions are allow
and deny. This change adds support for allowing the permission only
while the app is in foreground by adding a new permission only for
background. This structure is similar to the current state for location
permissions.

BYPASS_INCLUSIVE_LANGUAGE_REASON=Referring to an existing method failing
the inclusive language check.

Test: Manual atest
Change-Id: I8fcab6c0c884b79291586f64fd221e40982bc4c5
Bug: 208305481
2021-12-22 05:16:40 +00:00
Jan Tomljanovic
8066d1ef7b Add config value and a new permission for SafetyCenter.
Also giving it to the Shell for Cts purposes.

Test: atest CtsSafetyCenterTestCases
Bug: 208421513

Ignore-AOSP-First: Not announced yet, and need to use a permission
that hasn't been merged in AOSP

Change-Id: I2c63c54efac0add7c412fa43b77fa18ba2e486c3
2021-12-20 15:59:38 +00:00
Mariia Sandrikova
d77c92a3f1 Merge changes from topic "camera-compat" into sc-v2-dev am: 3486eacda3 am: 02a17e7b1f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16468379

Change-Id: Ic9916a3883eef0148a86c86149aa2e883fc56d1b
2021-12-18 22:19:12 +00:00
Mariia Sandrikova
02a17e7b1f Merge changes from topic "camera-compat" into sc-v2-dev am: 3486eacda3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16468379

Change-Id: I1e56abcef9715a3dd6a00d70cb815c4d9260175a
2021-12-18 21:59:31 +00:00
Mariia Sandrikova
24f4d8a952 [2/n] Camera Compat UI: Add interfaces for client-server communication.
Changes:
- Listens to changes from the client coming through IActivityClientController#requestCompatCameraControl to ActivityRecord#updateCameraCompatState
- ActivityRecord#updateCameraCompatState sends updated state via TaskInfo to WM Shell
- ITaskOrganizerController#updateCameraCompatControlState to dispatch the user interactions with the control from WM Shell triggers callback to ActivityRecord#updateCameraCompatStateFromUser
- ActivityRecord#updateCameraCompatStateFromUser remembers the user's choice and asks client to apply treatment through ICompatCameraControlCallback

Feature is guarded with config_isCameraCompatControlForStretchedIssuesEnabled

Test: atest WMShellUnitTests:ShellTaskOrganizerTests, atest WmTests:ActivityRecordTests
Bug: 206602997
Change-Id: I083aa6718bd67456bedd9444e9b78740c041f870
2021-12-17 00:18:57 +00:00
Sergey Nikolaienkov
8dbde9bfb0 Remove CDM Auto permission from Shell's allowlist
REQUEST_COMPANION_PROFILE_AUTOMOTIVE_PROJECTION permission is
"internal|role", which means that allowlisting it does not have any
effect.

Bug: 195590028
Bug: 203459457
Test: atest CtsCompanionDevicesTestCases:DeviceProfilesTest
Change-Id: Ie9f919938e0e4c57efa3dc8ae66ddfe319215392
2021-12-16 08:42:44 +01:00
Xin Li
85d715bac3 Merge "Merge Android 12 QPR1" 2021-12-14 20:25:23 +00:00
Alex Buynytskyy
2d9b8b8a06 Merge "Allow shell/CTS to be package verifier." am: 99ada16f28 am: 6f6c520b90 am: eabf24b25e am: f744fb9e13
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1920519

Change-Id: Ib75a13edd0956b66882903730a9036744de5bfbd
2021-12-14 15:45:55 +00:00
Alex Buynytskyy
f744fb9e13 Merge "Allow shell/CTS to be package verifier." am: 99ada16f28 am: 6f6c520b90 am: eabf24b25e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1920519

Change-Id: I8a7778440e4a6aab846b3028820d7389fab5287a
2021-12-14 15:29:14 +00:00
Alex Buynytskyy
eabf24b25e Merge "Allow shell/CTS to be package verifier." am: 99ada16f28 am: 6f6c520b90
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1920519

Change-Id: Ia480bbf461f0009eb5573db36d8b0d7f4133eb69
2021-12-14 15:13:46 +00:00
Alex Buynytskyy
6f6c520b90 Merge "Allow shell/CTS to be package verifier." am: 99ada16f28
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1920519

Change-Id: Id62d814b8f3b451d6bb1929218e99300bfbdc7d5
2021-12-14 14:59:43 +00:00
Alex Buynytskyy
b4dc01e32a Allow shell/CTS to be package verifier.
Bug: 204810986
Test: device boots
Test: atest PackageManagerShellCommandTest ChecksumsTest
Change-Id: I0b379714a946c18afdeca4ec02469d26646544df
2021-12-14 01:18:16 +00:00
TreeHugger Robot
324c7b28c3 Merge "CameraServiceProxy: Query recent tasks for top activity data" into sc-v2-dev am: 3a1a4dbf89 am: 99fe2aebdc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16332393

Change-Id: I1bb5fb183514d48d2da42ecf3009fee32b23df97
2021-12-10 19:34:55 +00:00
TreeHugger Robot
99fe2aebdc Merge "CameraServiceProxy: Query recent tasks for top activity data" into sc-v2-dev am: 3a1a4dbf89
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16332393

Change-Id: I065db2bc7e8d2e6490d0a8b18a3c8bf91d39a1da
2021-12-10 19:19:58 +00:00
TreeHugger Robot
3a1a4dbf89 Merge "CameraServiceProxy: Query recent tasks for top activity data" into sc-v2-dev 2021-12-10 18:58:45 +00:00
Emilian Peev
baeaad66d0 CameraServiceProxy: Query recent tasks for top activity data
Certain top activities will not trigger the "onTaskMovedToFront"
callback which can result in incorrect resizeability
queries. This can happen when a new activity is launched in the top
task.
To avoid this, retrieve the necessary information via the reported
recent tasks by activity manager for a given user id.

Bug: 203044281
Test: Manual using camera application

Change-Id: I61efd4282a2231e6354e5514fc25d7d27005335b
2021-12-09 10:16:04 -08:00