2835 Commits

Author SHA1 Message Date
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
Oscar Azucena
758a68da66 RESTRICT AUTOMERGE: Fixed permission issue in car shell
- Added missing private app permission to car shell.

Bug: 205404459
Test: m -j, flash device, boot completes
Change-Id: I23f3a890b4b28b758f6cce4ad63ef84bcda64427
2021-11-07 03:45:33 +00:00
TreeHugger Robot
7e8148a752 Merge "Remove Vendor_248a_Product_8266.idc" 2021-11-02 15:50:55 +00:00
Siarhei Vishniakou
3403edec23 Remove Vendor_248a_Product_8266.idc
This was added to temporarily achieve some backwards compatibility on
older TV remotes. It's breaking other devices that do not use their own
vendor id / product id information.

To fix those devices, we simply remove the idc and fallback to
Generic.kl

Bug: 204397586
Test: None
Change-Id: I6e4578271563169f6404588338995526e3b57f07
2021-11-01 14:44:23 -07:00
Gaurav Bhola
65fd1b2dd1 RESTRICT AUTOMERGE Fix the bootloop happening due to missing permission. am: 9a2c897fea
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16144749

Change-Id: Ibcea04ac7ee7451a7be2b0f7ead73ccab6b581ed
2021-10-30 04:13:42 +00:00
TreeHugger Robot
91da8a2976 Merge "RESTRICT AUTOMERGE Fix the bootloop happening due to missing permission." into sc-v2-dev 2021-10-30 04:03:01 +00:00
Gaurav Bhola
9a2c897fea RESTRICT AUTOMERGE Fix the bootloop happening due to missing permission.
- This was missed during cherry-pick from master.

Bug: 187720593
Test: Manually verified by building and observing no bootloop.
Change-Id: Ib36186380ce6d786b0f0272b8866b5eab51920c2
2021-10-30 00:20:56 +00:00
Hongguang
bcca4dc8b9 Add SharedFilter to tuner frameworks.
The SharedFilter is used to share the Filter created by TIS to another
process. The TIS uses Filter.createSharedFilter() to create a token and
share it to another process. The new process will use
Tuner.openSharedFilter() to open that new token and create a
SharedFilter. The new process will be able to read the TIS owned
Filter's data with this new SharedFilter.

Bug: 196124225
Test: atest android.media.tv.tuner.cts on both AIDL and HIDL HAL.
Change-Id: Id93b30e4db242d35a3d1ae6023b967a90a78c448
2021-10-29 12:05:29 -07:00
Issei Suzuki
c34b3262a6 Merge "Add display sleep token information to winscope dump." into sc-v2-dev am: 0f6684e325
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16117039

Change-Id: I2948ef95448289c49c5471abd5732024e5278e7c
2021-10-27 15:11:46 +00:00
Charles Chen
082dec989c Choose TDA by DisplayAreaPolicy for WindowContext
Previously, WMS always associate TYPE_APPLICATION WindowContext with
the default TDA. This CL provides the capibility to select a TDA by
DisplayAreaPolicy.

Test: atest DisplayAreaPolicyBuilderTest
fixes: 185769955

Change-Id: Ie7cb686cd5d1da81ef618a3f1316dc3932a8272f
2021-10-27 09:57:41 +00:00
Issei Suzuki
3e469aec5a Add display sleep token information to winscope dump.
Change-Id: Ia25854feed3bb6b037d4510a6b5000d906d27313
Merged-In: Ia25854feed3bb6b037d4510a6b5000d906d27313
Bug: 198593156
Test: manual. capture winscope dump and see it.
2021-10-26 12:13:37 +02:00
Issei Suzuki
97f9372e97 Add display sleep token information to winscope dump.
Change-Id: Ia25854feed3bb6b037d4510a6b5000d906d27313
Bug: 198593156
Test: manual. capture winscope dump and see it.
2021-10-26 12:11:42 +02:00
Evan Rosky
111ceae313 Merge "Fix PiP Shell Transitions" into sc-v2-dev am: b93d37627d am: 7886804713
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16043024

Change-Id: I29afef9b0806c72722ffc98685e3a5812e2c72ad
2021-10-20 16:42:55 +00:00
Evan Rosky
7886804713 Merge "Fix PiP Shell Transitions" into sc-v2-dev am: b93d37627d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16043024

Change-Id: Ic6ff2fe0a800de3f4e481a91bc7f2ddcf2b30a0a
2021-10-20 16:23:09 +00:00
Evan Rosky
c6d5abe414 Fix PiP Shell Transitions
PiP Shell Transitions needs to be more robust to pass CTS tests
reliably.

Some changes:

1. DELIVERED_TO_TOP intents don't create a transition since there is
   no change to the WM hierarchy. This way the app-launch transition
   won't conflict with activityRestartAttempt.

2. If PiP started an expand transition while an enter transition is
   ongoing, cancel the enter transition.
   a. Additionally, because PiP doesn't resize task until the enter
      transition finishes, the expand transition will actually be
      a no-op. If we see this pattern, also cancel the enter
      transition.

3. When taskVanished, make sure to call any pending finishCallback
   because it doesn't allow the running animator to properly finish.
   Transition systems require the finish callback to function
   properly.

4. Minimize the uses of finishTransition with a sync callback. We
   probably need to phase this out because it can conflict with
   subsequent startTransition calls (because only 1 sync is supported
   at a time).

Bug: 183993924
Test: atest PinnedStackTests
Change-Id: Ieb573032839a2f31b0bb371410484fc93a1714fa
2021-10-19 15:50:41 -07:00
Kevin Resnick
636a7e9b20 Adding android.permission.MANAGE_VOICE_KEYPHRASES to the shell app to allow GTS tests to pass.
Change-Id: I40c41f8023234091260650a14d631f8900057849
Bug: 203585818
2021-10-19 21:48:59 +00:00
Issei Suzuki
fdcd315efb Merge "Migrate WALLPAPER_LIGHT debug message to ProtoLog." into sc-v2-dev am: cd9c90750a am: 54bfd5e650
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16004864

Change-Id: I1a9074c1d6b67e9590c879417a0aa98b5a30a6c8
2021-10-13 18:02:24 +00:00
Issei Suzuki
54bfd5e650 Merge "Migrate WALLPAPER_LIGHT debug message to ProtoLog." into sc-v2-dev am: cd9c90750a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16004864

Change-Id: I4deaec1f298e177b90ce449ef10fd82b2c825a58
2021-10-12 15:25:14 +00:00
Issei Suzuki
cd9c90750a Merge "Migrate WALLPAPER_LIGHT debug message to ProtoLog." into sc-v2-dev 2021-10-12 15:09:42 +00:00
Chris Li
3866f66fcb Merge "Don't override with TasmFragmentRemoteAnimation for wallpaper/non-app" into sc-v2-dev am: ffe3162917 am: 3d29027eb3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16014032

Change-Id: Ic45b5f822b13ba25d9752eb5285f27fb2fd46ed8
2021-10-12 13:37:07 +00:00
Chris Li
3d29027eb3 Merge "Don't override with TasmFragmentRemoteAnimation for wallpaper/non-app" into sc-v2-dev am: ffe3162917
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16014032

Change-Id: I1209013acf69b8881e30d4bf0b852a590bc20682
2021-10-12 13:24:46 +00:00
Issei Suzuki
bde317e6b1 Migrate WALLPAPER_LIGHT debug message to ProtoLog.
Test: manual
Bug: 191438572
Bug: 202392340
Change-Id: Ibf538fce834715dc32741f4b52808f99020f741e
2021-10-12 09:38:58 +02:00
Chris Li
53e7502809 Don't override with TasmFragmentRemoteAnimation for wallpaper/non-app
We don't want to allow the client to animate for wallpaper or any
non-app windows.

Bug: 201482129
Bug: 196173550
Test: atest WmTests:AppTransitionControllerTest
      #testOverrideTaskFragmentAdapter_noOverrideWithWallpaper
Change-Id: Ic29db59fc9f9695df9c8ba3a6d812ad217cdd641
2021-10-12 10:03:29 +08:00