Commit Graph

2713 Commits

Author SHA1 Message Date
Marie Matheson
bf1d2de7bb Merge "Adds the SEND_SAFETY_CENTER_UPDATE privileged permission to the Settings app." 2022-02-02 13:59:13 +00:00
Michal Olech
6c966b35ea Merge "Add system prompt for system language change after <Set Menu Language> CEC message" 2022-02-01 17:21:51 +00:00
Michal Olech
6f1aecf1bf Add system prompt for system language change after <Set Menu Language> CEC message
Requires ro.hdmi.set_menu_language=true

Test: build; flash; manual test
Bug: 190810909
Change-Id: Ic0664e077e975bba0929dd871c3a4c9ab385814c
2022-02-01 12:39:53 +01:00
Jay Sullivan
87b22d6d8f Merge "Revert "Define new AUDIO/VIDEO/IMAGE permissions"" 2022-01-31 18:04:44 +00:00
Jay Sullivan
ff9f7176ac Revert "Define new AUDIO/VIDEO/IMAGE permissions"
Revert "Fix PermissionPolicyTest and SplitPermissionsSystemTest"

Revert submission 15933906-t-define-media-permissions

Reason for revert: caused b/216588046 and b/216453842
Reverted Changes:
I79afe120d:Update DefaultPermissionGrantPolicyTest for new pe...
I321282b1f:Fix PermissionPolicyTest and SplitPermissionsSyste...
If3d357bae:Define new AUDIO/VIDEO/IMAGE permissions

Change-Id: I0d4f0eaefc5c29063f517755b4c9b61417a15fd0
2022-01-29 03:11:22 +00:00
Marek Jeziorek
bc15646a79 Merge "Update the following fonts NotoNaskhArabic NotoNaskhArabicUI NotoSansCanadianAboriginal NotoSansCherokee NotoSansGeorgian NotoSansLao NotoSansLaoUI NotoSerifDogra NotoSerifGeorgian NotoSerifHebrew NotoSerifLao NotoSerifThai" 2022-01-29 01:45:52 +00:00
Marek Z Jeziorek
44fab16c39 Update the following fonts
NotoNaskhArabic
NotoNaskhArabicUI
NotoSansCanadianAboriginal
NotoSansCherokee
NotoSansGeorgian
NotoSansLao
NotoSansLaoUI
NotoSerifDogra
NotoSerifGeorgian
NotoSerifHebrew
NotoSerifLao
NotoSerifThai

Bug: 216571265
Test: Specified with the font changes
Change-Id: I7679f7cd9f2987fd1ab6bca62c8611bc36693ca4
2022-01-28 03:48:26 +00:00
Robert Horvath
570645567f Introduce Low Power Standby API and wakelock restrictions
In Low Power Standby, additional restrictions are placed on apps that
are in a process state of FOREGROUND_SERVICE or less important
during standby (while the device is non-interactive):
- Wakelocks are disabled
- Network access is blocked
During doze maintenance windows the restrictions are lifted temporarily.

This change introduces the APIs for Low Power Standby, as well as
the wakelock restrictions.

This feature is targeting TVs. To prevent Low Power Standby from being
enabled on other devices, the feature is guarded by the config flag
config_lowPowerStandbySupported.

Bug: 190822356
Test: atest LowPowerStandbyControllerTest PowerManagerServiceTest
Ignore-AOSP-First: New permission only added internally for now.
Change-Id: Ia40f8a0fc4b366860af58ad76c988f93a5d41936
2022-01-27 23:08:26 +01:00
Evan Chen
bf9a16b7f5 Merge "Add computer permission to Shell's allowlist" 2022-01-27 06:57:35 +00:00
Nate(Qiang) Jiang
1ce97f91ca Merge "Add OVERRIDE_WIFI_CONFIG permission to Shell for CTS" am: dbe634a784 am: 93be545cde am: 8a4f65b48b am: e2f51cb6fc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1959813

Change-Id: I5f937570a060cc33af62635efa8ad0704ab053d2
2022-01-26 21:44:47 +00:00
Nate(Qiang) Jiang
e2f51cb6fc Merge "Add OVERRIDE_WIFI_CONFIG permission to Shell for CTS" am: dbe634a784 am: 93be545cde am: 8a4f65b48b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1959813

Change-Id: Ic8243b12ebed20e1e392acc2a5be52a09b857582
2022-01-26 21:26:16 +00:00
Nate(Qiang) Jiang
8a4f65b48b Merge "Add OVERRIDE_WIFI_CONFIG permission to Shell for CTS" am: dbe634a784 am: 93be545cde
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1959813

Change-Id: I6b801218b1f79bfb456f6a0fefa0592594c33085
2022-01-26 21:07:15 +00:00
Erin Yan
2c7c391781 Merge "Add permissions to shell to enable testing" 2022-01-26 19:20:26 +00:00
Nate Jiang
a6e72cf3e2 Add OVERRIDE_WIFI_CONFIG permission to Shell for CTS
Bug: 216433840
Test: build
Change-Id: I18500abe0e98030bd291aca536f6a70b0f6acafd
2022-01-26 03:00:50 -08:00
Evan Chen
4a13c90039 Add computer permission to Shell's allowlist
Bug: 216213933
Test: atest CtsCompanionDevicesTestCases:DeviceProfilesTest
Change-Id: I8088cc31fd4e5e508bfe30e15aa194ecab93f038
Ignore-AOSP-First: new permissions (not yet in AOSP)
2022-01-26 01:42:46 +00:00
Marie Matheson
a4f204b385 Adds the SEND_SAFETY_CENTER_UPDATE privileged permission to the Settings app.
Test: atest SettingsUnitTests
Bug: 216076319
Change-Id: If079d10aa7e67f2f04676fe72eba1d2c7c1ec2d7
2022-01-25 18:35:29 +00:00
Jay Sullivan
aad39a3889 Merge "Define new AUDIO/VIDEO/IMAGE permissions" 2022-01-25 17:49:12 +00:00
TreeHugger Robot
91c260b756 Merge "Ensure that participated activities are not omitted by ancestor" 2022-01-25 14:01:33 +00:00
Alex Johnston
cf04bc3d29 Add lost mode platform changes
Changes:
* Add SEND_LOST_MODE_LOCATION_UPDATES permission.
* Add DPM.sendLostModeLocationUpdate API.
* Add intent action and extras to send lost mode
  location updates to the DPC.
* Add DPM attribution tag

Manual testing:
* Add lost mode receiver to TestDPC
* Call new API in GmsCore using reflection
* Verify API call is successful and the
  lost mode receiver receives the location update

Bug: 206945072
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
      manual testing
Change-Id: I9374a53c1146143c8f5bff3ac38cfe18d3f0bf2f
2022-01-25 10:12:31 +00:00
Riddle Hsu
4b86a040b4 Ensure that participated activities are not omitted by ancestor
... when preparing transition targets.

Previously, the first step of the calculation finds the top participant
if possible, and once there is one, only the level above task will be
added. Because it assumes that the parent of participant can represent
it. But there are more than one participants belong to an ancestor, the
descendants may have individual changes, so they should be still in the
transition targets. Otherwise the animation may have nothing to do.

Now all valid participants are added into the target lists, and then
combine the targets from bottom to up based on depth. So it can be
done in 1 pass (originally it requires 3 passes when launching a new
task from home, 4 passes when starting recents).

The population of ChangeInfo#mParent is moved after tryPromo so it
can skip the targets which were removed, and the parent info can
be updated in a single place.

Bug: 213867980
Test: TransitionTests#testOpenActivityInTheSameTaskWithDisplayChange
Test: adb shell setprop persist.debug.shell_transit 1; reboot
      Start a landscape activity from a portrait activity in the
      same task. The animation should not jump cut.

Change-Id: I23a3326611dcb5664b204748280ae15b2377f318
2022-01-25 17:28:24 +08:00
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
Jay Thomas Sullivan
811fb71ae2 Define new AUDIO/VIDEO/IMAGE permissions
Define three new permissions:

- READ_MEDIA_AUDIO: read audio files from external storage
- READ_MEDIA_VIDEO: read video files from external storage
- READ_MEDIA_IMAGE: read image files from external storage

Also, define two new permission groups:

- READ_MEDIA_AURAL
- READ_MEDIA_VISUAL

The permissions are assigned to permission groups as follows:

  READ_MEDIA_AURAL {
      READ_MEDIA_AUDIO
  }
  READ_MEDIA_VISUAL {
      READ_MEDIA_VIDEO
      READ_MEDIA_IMAGE
  }

The motivation for this change is to support the "Media Permission
Update for Android T" project.

Bug: 201318587
Test: manual
Change-Id: If3d357baed15b66319a6c2308416622e5e57fe28
2022-01-18 10:44:14 -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
Erin Yan
9b27ef20e5 Add permissions to shell to enable testing
Adding MANAGE_WEAK_ESCROW_TOKEN and to Shell so the API can be called from tests.

Bug: 209632699
Test: Builds, boots. atest WeakEscrowTokenAutoFeatureTest
Ignore-AOSP-First: brand new permissions
Change-Id: If0a157903c605347a5b26625a735433caf27bcb1
2022-01-12 22:00:12 +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