Commit Graph

2656 Commits

Author SHA1 Message Date
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
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
Xiaowen Lei
a676d9b3df Add callback registration mechanism for listening to communal state changes.
Design: go/communal-manager-api.

Note: this CL also removed "_MANAGER" from the communal service
constant, and "_manager" from the communal service name. When these
became unhidden, ApiLint.kt suggested the changes.
  - http://cs/android/tools/metalava/src/main/java/com/android/tools/metalava/ApiLint.kt;l=2369-2386;rcl=0ef26a465a89c45fcfd24d648883208cd0161fd2

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

Test: atest CtsAppTestCases:CommunalManagerTest
Test: atest FrameworksMockingServicesTests:CommunalManagerServiceTest

Bug: 206054365
Change-Id: I6d225d6ddb482d9cffb16d1f9a25a98abd0cc382
2021-12-08 23:45:42 +00:00
Elliot Sisteron
3379259e80 Add SEND_SAFETY_CENTER_UPDATE to shell permissions.
This is to ensure the CTS tests SafetyCenterManagerTest still passes
after enforcing the permission.
Test: atest CtsSafetyCenterTestCases
Bug: 205706756
Ignore-AOSP-First: Not announced yet, and need to use a permission
that hasn't been merged in AOSP

Change-Id: Iaee11c55fc25a82299d4c45dd7d24151a4f8c30b
2021-12-08 12:23:42 +00:00
Eric Laurent
d8f5f3bb4f Merge changes from topic "call_redirection_apis"
* changes:
  audio: add call audio redirection APIs
  Add permission for call audio redirection
2021-12-07 08:29:21 +00:00
Nate Myren
0f021a16fe Merge "Open SensorPrivacy and WRITE_SECURE_SETTINGS to PC" 2021-12-06 22:43:19 +00:00
Treehugger Robot
3ad0c6ea30 Merge "Add DEVICE_LOCK permission to Shell to support ATS test" am: 00b14576ba am: 8dc3be6249 am: 37643533d3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1909557

Change-Id: Id5cd9e762b69b9edc8ea25d7259939a49b3f81b0
2021-12-03 01:49:04 +00:00
Treehugger Robot
37643533d3 Merge "Add DEVICE_LOCK permission to Shell to support ATS test" am: 00b14576ba am: 8dc3be6249
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1909557

Change-Id: Ica48fc74b73c4d54f39fff315ecd8ffc03989e9a
2021-12-03 01:37:21 +00:00
Treehugger Robot
8dc3be6249 Merge "Add DEVICE_LOCK permission to Shell to support ATS test" am: 00b14576ba
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1909557

Change-Id: I3929ce59312776fb513e9754eb7b24852ca82bbe
2021-12-03 01:14:21 +00:00
Anthony Hugh
b4cce59e37 Add DEVICE_LOCK permission to Shell to support ATS test
Adds DEVICE_LOCK permission to Shell to support the
CarDevicePolicyManagerTest. This permission is needed to call
DevicePolicyManager#lockNow  which locks the device.

Bug: 187199256
Test: atest CarDevicePolicyManagerTest
Merged-In: I3fa20b53b929c97a6760d65b432a74c3415d6a08
Change-Id: I3fa20b53b929c97a6760d65b432a74c3415d6a08
2021-12-02 23:49:22 +00:00
Anthony Hugh
0f642cfedf Merge "Add DEVICE_LOCK permission to Shell to support ATS test" 2021-12-02 23:41:09 +00:00
Sergey Nikolaienkov
7918a89b24 Merge changes from topic "cdm-apis"
* changes:
  Grant Shell CDM permissions
  Check REQUEST_COMPANION_SELF_MANAGED permission in CDM
  Fix usages of CDM APIs in NotificationManagerService(Test)
  Refresh CompanionDeviceManager's API surface
  Add explicit MAC address and display name fields
2021-11-26 06:38:03 +00:00
Eric Laurent
78eef3ab9d audio: add call audio redirection APIs
Add AudioManager system APIs to acquire call audio injection AudioTrack
and extraction AudioRecord.

Add AudioTrack and AudioRecord Builder system APIs to create different
variants of call redirection AudioTrack and AudioRecord:
- If the call is PSTN, only the AudioTrack or AudioRecord is created
with audio usage or capture preset corresponding to call audio uplink
injection or downlink capture.
- If the call is VoIP, a dynamic audio policy is installed for voice
communication interception and the AudioTrack or AudioRecord is obtained
from the audio policy.

Bug: 189472651
Test: make
Change-Id: I6d3ed3948c13253ceea4a0fab836a753b5ee9ad0
2021-11-25 17:03:20 +01:00
Marin Shalamanov
eb867fdea9 Merge "Add default display config for television" 2021-11-24 15:44:58 +00:00
Issei Suzuki
7c21af345b Merge "Clean up windows which stuck in animatingExit state." into sc-v2-dev am: 85aacccba1 am: b4123126bb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16296642

Change-Id: Ife63117c78683eacd2fca2953637a0904512af59
2021-11-24 15:30:08 +00:00
Issei Suzuki
b4123126bb Merge "Clean up windows which stuck in animatingExit state." into sc-v2-dev am: 85aacccba1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16296642

Change-Id: I323599b607cabba336ebf9d5aaa20a54299873e9
2021-11-24 15:13:06 +00:00
Sergey Nikolaienkov
9d95ba09be Grant Shell CDM permissions
Granting Shell new permissions required for accessing
CompanionDeviceManager APIs (such as
REQUEST_COMPANION_PROFILE_APP_STREAMING,
REQUEST_COMPANION_SELF_MANAGED).
Permissions are needed for running CompanionDeviceManagerTest CTS test
(which utilizes adoptShellPermissionIdentity for accessing the API
protected by the said permissions).

Bug: 194301022
Test: atest CompanionDeviceManagerTest
Ignore-AOSP-First: new permissions (not yet in AOSP)
Change-Id: I2c8469661f3b6de4ee1e2aa37c919bc0ad25ef8f
2021-11-24 14:50:49 +01:00
Marin Shalamanov
1104725732 Add default display config for television
Fixes: 207331094
Ignore-AOSP-First: Owners file aded for a new folder
    which doesn't exist on AOSP
Test: adb shell dumpsys display | grep DensityMap
Change-Id: Ia46004fa8e41bb24b16a660f12873c9f9a93b6a4
2021-11-24 14:17:51 +01:00
Issei Suzuki
bdc4e842cf Clean up windows which stuck in animatingExit state.
WM delays to destroy window surface if the window is running an exit
animation, and clean it up after the animation finishes. In case the
clean up process was not triggered, we do it before starting an app
transition.

Note that this is a safe guard for potential bugs. The surface shall
be destroyed as soon as an animation finishes, so the clean up should
have been done before an app transition starts.

Bug: 205335975
Test: atest AppTransitionControllerTest
Change-Id: I9c37ab9ebc57ef48827df25ecc52bf09101ad419
2021-11-24 12:54:13 +01:00
Anthony Hugh
a07ccbe656 Add DEVICE_LOCK permission to Shell to support ATS test
Adds DEVICE_LOCK permission to Shell to support the
CarDevicePolicyManagerTest. This permission is needed to call
DevicePolicyManager#lockNow  which locks the device.

Bug: 187199256
Test: atest CarDevicePolicyManagerTest
Change-Id: I3fa20b53b929c97a6760d65b432a74c3415d6a08
2021-11-22 14:10:11 -08:00
Joshua Trask
42fb76f068 Privapp IntentResolver += PACKAGE_USAGE_STATS
This permission is required to query AppPredictionService.

When the unbundled Chooser doesn't request this permission,
we get a SecurityException attempting to invoke
createPredictionSession(). When we request the permission
but don't add it to this allow-list, the device boot-loops.
With the permission added in both places (and some other
local changes), the unbundled Chooser is able to show the
full set of app predictions.

Test: Manual, as described above.
Bug: 206831012
Change-Id: I154d0555471f7f8820ac151b77a61cb8d9bf7603
2021-11-19 11:09:16 -05:00
Hongwei Wang
c1b70b2c79 Merge "Allow auto-pip on launching new Task from TaskBar" into sc-v2-dev am: aa2c404692 am: d6a5dd6b56
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16215474

Change-Id: I31c9618d8019646458a1f8fa4076b56b978610b7
2021-11-19 00:41:02 +00:00
Hongwei Wang
d6a5dd6b56 Merge "Allow auto-pip on launching new Task from TaskBar" into sc-v2-dev am: aa2c404692
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16215474

Change-Id: Ifc5f764ed93af2928002b74a44865d7a1f155785
2021-11-19 00:28:19 +00:00
Hongwei Wang
0a53b766cb Allow auto-pip on launching new Task from TaskBar
Loosen the check on FLAG_RESUME_WHILE_PAUSING in
TaskFragment#startPausing for auto-enter-pip.

Fixed also the round corner radius calculation in WMShell component for
entering PiP transition.

Bug: 198227082
Bug: 202574512
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/bEPWcJSn8iGbLLNg6cM0E3
Test: no auto-enter on quick switch and does on launching new Task,
      see video for details
Test: atest PinnedStackTests#testAutoPipOnLaunchingAnotherActivity
Change-Id: I53e62a5f6e663b2d6df8cd0aaa858ff01ef073e8
2021-11-18 10:50:29 -08:00
Xin Li
10d9972786 Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918
Bug: 205056467
Merged-In: I13199bc39e9445929195f3d15579cbffe94e92b0
Change-Id: I35fa3c6c2abf679c51033f1395a08d511ed8739f
2021-11-18 17:00:37 +00:00
Marcus Hagerott
f8d93132e1 Merge "Allow ContactsProvider to use compat change framework" am: 911df4f515 am: 36f5ca1920 am: fa2c7f2eb1 am: e143499017
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1894075

Change-Id: I9ba64b458e2dee813afd57cae0fcc3c4420b78e6
2021-11-17 22:59:10 +00:00
Marcus Hagerott
e143499017 Merge "Allow ContactsProvider to use compat change framework" am: 911df4f515 am: 36f5ca1920 am: fa2c7f2eb1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1894075

Change-Id: I5d52b1cc825246e1a3a39d8a277aa02aa5c4b00c
2021-11-17 20:18:16 +00:00
Marcus Hagerott
fa2c7f2eb1 Merge "Allow ContactsProvider to use compat change framework" am: 911df4f515 am: 36f5ca1920
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1894075

Change-Id: I55d1e0532cce2646a2a6839a4e43d4552311c592
2021-11-17 19:55:24 +00:00
Nate Myren
d53beec9c3 Open SensorPrivacy and WRITE_SECURE_SETTINGS to PC
Ensure the PermissionController can receiver the WRITE_SECURE_SETTINGS
permissions, to allow it to control location enable state. Open
SensorPrivacy APIs to @SystemApi. Also updates a SystemUI string
description to point to another string in PermissionController, which
should be kept in sync

Test: Build
Bug: 194816787
Change-Id: If4a45339449cc392eed28e33453c74a3b10988b4
2021-11-16 16:14:15 -08:00
Marcus Hagerott
6c681056bb Allow ContactsProvider to use compat change framework
BUG=188347648
Test: m droid

Change-Id: Ifb6675777c76ca1c44af96ceb02a6207d28bd045
2021-11-16 13:40:41 -08:00
Joshua Trask
2660514eea Add priv-app allow-listing for unbundled chooser.
These two permissions are required for the most basic
ChooserActivity flows (as determined by runtime exceptions
during prototyping). Without this allow-listing, the
unbundled chooser's intent resolvers fail to register at
startup, and the device boot-loops.

Among the privileges that might require allow-listing,
these two in particular were sufficient for showing a
basic Chooser UI and launching the user-selected target.
More complex Chooser flows may turn out to require
additional permissions later on.

Test: manual testing as described above, but requires
several local-only changes to exercise the flow, and
this CL has to be the first to go in (but has no
side-effects of its own).

Change-Id: I6a24a46a91199e8b3fb643f047a9b9412b19eb8d
2021-11-16 14:31:32 -05:00
Vishnu Nair
7f84221a10 Merge "WM: Handle primary display orientation when calculating the transform hint" am: 5fb9f63795 am: b83ee72e64
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1887653

Change-Id: I4a99911c7dbe8f69e35dd107e0d15b09f657bec0
2021-11-11 19:13:36 +00:00
Vishnu Nair
cbb12e2e76 WM: Handle primary display orientation when calculating the transform hint
Query the surface flinger property
ro.surface_flinger.primary_display_orientation to determine the
primary display's install orientation. If the window is on the
primary display, then update the transform hint passed on to the
client.

Bug: 196167822
Test: check initial buffer transforms on displays with a different
install orientation

Change-Id: Idf010cd6be73172ba708820f87046c3ba3cf8001
Merged-In: Idf010cd6be73172ba708820f87046c3ba3cf8001
2021-11-11 03:14:21 +00:00
Hui Wang
5f411b511f [automerge] Add android.permission.STATUS_BAR for cellbroadcast 2p: 3defedfef2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16193627

Bug: 205345214
Bug: 205157514
Change-Id: I80f555da06aea153b16475db5b9ddf77fe92da50
2021-11-10 03:27:39 +00:00
Oscar Azucena
e99c148452 RESTRICT AUTOMERGE: Fixed permission issue in car shell am: 758a68da66
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16204269

Change-Id: Ic2105a146429caca9d820dda222b25d9c68dd1f0
2021-11-08 19:36:48 +00:00
Hui Wang
3defedfef2 Add android.permission.STATUS_BAR for cellbroadcast
Bug: 205345214
Bug: 205157514
Test: make, manual
Change-Id: Ic00120ea1a5ebab84c3daccb5c6f804fba4eda43
2021-11-08 16:27:51 +00:00