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
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
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
... 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
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
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
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
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
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
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
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
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
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
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