Commit Graph

4189 Commits

Author SHA1 Message Date
Vadim Caen
39b397de9f Merge "Release the SurfacePackageViewHost on splash screen removed" into sc-dev am: dc07d29bd0 am: e65475b1c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14775423

Change-Id: I675fd44270a6a59863a2490e3723f0f53379b3c5
2021-06-16 12:42:44 +00:00
Vadim Caen
dc07d29bd0 Merge "Release the SurfacePackageViewHost on splash screen removed" into sc-dev 2021-06-16 12:27:47 +00:00
Siarhei Vishniakou
c664495196 Merge "Remove FLAG_INPUTFILTER_TRUSTED in MotionEventInjector" into sc-dev am: 5d552869af am: b637d6f106
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14676739

Change-Id: Ia3010b90e45eb9f2f19e76b0b6fa3e8c237b55c5
2021-06-15 22:11:20 +00:00
Siarhei Vishniakou
5d552869af Merge "Remove FLAG_INPUTFILTER_TRUSTED in MotionEventInjector" into sc-dev 2021-06-15 21:50:35 +00:00
TreeHugger Robot
b8266fd891 Merge "Camera: Add black test pattern mode for privacy" into sc-dev am: 280db03351 am: ee9ce5d3c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14752379

Change-Id: If835d09ddbf4664b867b181c84fd3a6922bd65ab
2021-06-15 18:01:56 +00:00
TreeHugger Robot
280db03351 Merge "Camera: Add black test pattern mode for privacy" into sc-dev 2021-06-15 17:29:19 +00:00
Vadim Caen
a46ff113be Release the SurfacePackageViewHost on splash screen removed
The SurfacePackageViewHost was never release, leading to a leak of its
surfaces.

This CL ensure it is released:
  - Directly in the shell if the SplashScreenView was not copied
  - From the client, through the window manger and then to the shell if
  the splash screen was copied in the client process

Test: Manually tested with app setting by checking if the surfaces
are actually removed (winscope + logs) in the following scenarios:
    - When the application registers an OnExitAnimationListener
      and calls remove(),
    - When the application registers an OnExitAnimationListener
      and dies without calling remove()
    - When the applicaiton does not register an OnExitAnimationListener
    and the shell removes the splash screen
Bug: 189759180

Change-Id: Ib68bfffad6720911368739d7dd87d8a03034c589
2021-06-15 15:39:09 +02:00
Robert Berry
3aee3791d3 Up limit from 1fps to 3fps for takeScreenshot
Allow AccessibilityService instances to request screenshots more
frequently (up to three screenshots per second). This used to be capped
at one screenshot per second in Android R.

Test: cts
Bug: 188077373

Change-Id: I880e2d922db3ce2bd075efcb02466ea1f4914792
(cherry picked from commit 113436f49f)
2021-06-14 17:02:28 +00:00
Łukasz Rymanowski
a180aef6d3 Bluetooth: add Volume Control Profile boilerpalate
This is very simple API to allow Android to connect VCP profile.

Bug: 150670922
Test: compilation
Sponsor: jpawlowski@
CTS-Coverage-Bug: 190833351
Change-Id: Ib20d967fcf6797077abf83b40b0eda526e5ab89d
2021-06-14 12:30:39 +00:00
TreeHugger Robot
3dc6a787fb Merge "Up limit from 1fps to 3fps for takeScreenshot" 2021-06-14 01:56:08 +00:00
Yuanjia Hsu
0ffbf67ba7 Merge "Exports API to allow RULE_MATCH_UID support both RECORDERS and PLAYERS mix type" into sc-v2-dev am: dafbb266b0 am: 97ad0a10f5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14580818

Change-Id: I1b58f2689c79aeb371b6f6409f7f83cbcf3d4363
2021-06-11 19:43:03 +00:00
Yuanjia Hsu
dafbb266b0 Merge "Exports API to allow RULE_MATCH_UID support both RECORDERS and PLAYERS mix type" into sc-v2-dev 2021-06-11 19:14:08 +00:00
Keun-young Park
1722914fc5 Merge "Allow SharedMemory creation from ParcelFileDescriptor" 2021-06-08 23:45:48 +00:00
Anton Hansson
76b9b00a37 Merge "Baseline SAM errors" into sc-dev am: ea02255542 am: 4650ed8c8a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14845416

Change-Id: Id12a74b5e3b8047edf5b2ca1b73717a097edee61
2021-06-08 09:10:50 +00:00
Anton Hansson
6f97d20c95 Merge "Baseline SAM errors" into sc-dev am: ea02255542
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14845416

Change-Id: Ic1916f651e567929c4e5c3eeb03d8056c92a1bf0
2021-06-08 08:57:08 +00:00
Michal Olech
8c36342587 Merge "[CEC Configuration] Add 'routing_control' setting" 2021-06-06 20:10:07 +00:00
Jeff Sharkey
b42faf3ca0 Merge "Revert "Hide MediaFormat#KEY_SLOW_MOTION_MARKERS"" 2021-06-05 20:23:33 +00:00
Anton Hansson
d641efeb18 Revert "Hide MediaFormat#KEY_SLOW_MOTION_MARKERS"
This reverts commit fc0dd526c9.

Reason for revert: b/190241620
Bug: 190241620

Change-Id: I4f39a6d3e875dd261f24105c5e01033b597d88d3
2021-06-05 20:22:59 +00:00
Anton Hansson
1f44941dcb Baseline SAM errors
With the finalization of SDK 31, metalava now detects certain old APIs
like new APIs and runs ApiLint to them. Because we cannot change these
shipped APIs, add them to baselines for now until the detection of new
apis can be improved.

Bug: 171506470
Bug: 190240500
Test: m checkapi
Change-Id: I62e7c911977165acc53b2151e7e44bb528a0ba92
2021-06-05 09:03:00 +01:00
Keun young Park
d397f0e17d Allow SharedMemory creation from ParcelFileDescriptor
- added as system module api
- Will be used to get shared memory from stable AIDL where only
  ParcelFileDescriptor is available.
- Usage / test will be added to p/s/Car later.

Bug: 188780895
Test: build only
Change-Id: I8a634062d10ff0c114f3add1d2a5e8056f17b788
2021-06-04 16:05:21 -07:00
Siarhei Vishniakou
1214444260 Remove FLAG_INPUTFILTER_TRUSTED in MotionEventInjector
All input events coming into inputfilter from
InputDispatcher will now have FLAG_INPUTFILTER_TRUSTED set by default.
It is now up to the inputfilter (a11y) to remove this flag when appropriate.
One such case is where an unknown a11y service is injecting the events.

From auditing the a11y code, the only such place is MotionEventInjector.

Therefore, label all events coming out of MotionEventInjector as
"untrusted" by removing this new flag INPUTFILTER_TRUSTED.

Separately, a11y should be distinguishable from regularly injected input
events. To tell apart the events injected by a11y, add a new flag,
FLAG_INJECTED_FROM_ACCESSIBILITY. This flag requests InputDispatcher to
apply the device id = -2 for the injected events.

Test: atest CtsInputTestCases:android.input.cts.GamepadWithAccessibilityTest
Test: atest MotionEventInjectorTest
Bug: 175069843
Change-Id: I12d4a7bd6fbab8af202f5ae88b6be97ff9e1754c
2021-06-04 21:15:43 +00:00
TreeHugger Robot
c8eecb8052 Merge "Add SharedLibraryInfo#isNative to @TestApi surface." into sc-dev am: cf28c48575 am: f926ac837d am: 5b1d9c7ac8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14807579

Change-Id: I90c8cddc0c5abdf3430b3d6dce93a6821d81abd1
2021-06-04 13:25:56 +00:00
TreeHugger Robot
5b1d9c7ac8 Merge "Add SharedLibraryInfo#isNative to @TestApi surface." into sc-dev am: cf28c48575 am: f926ac837d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14807579

Change-Id: I1b9fb6f12226f07755585ee3c93a787ea20c0890
2021-06-04 13:12:18 +00:00
TreeHugger Robot
a04e03c652 Merge "Add SharedLibraryInfo#isNative to @TestApi surface." into sc-dev am: cf28c48575
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14807579

Change-Id: I069db7468a91f578cb080175aadf4ca7d4c38e9c
2021-06-04 12:57:04 +00:00
TreeHugger Robot
cf28c48575 Merge "Add SharedLibraryInfo#isNative to @TestApi surface." into sc-dev 2021-06-04 12:37:02 +00:00
Marin Shalamanov
0bbdcba79b Merge "Make AudioManager.getSurroundFormats a TestApi" into sc-dev am: 79f5d3f4fc am: e6f77d35d7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14787442

Change-Id: I954d0df00971f838d65c728492914b1d0e6026e2
2021-06-04 11:31:36 +00:00
Marin Shalamanov
0caa4f6ab9 Merge "Make AudioManager.getSurroundFormats a TestApi" into sc-dev am: 79f5d3f4fc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14787442

Change-Id: I5b0dbb157fc5b69cdd38b651db0d08313dfd623a
2021-06-04 11:14:53 +00:00
Marin Shalamanov
79f5d3f4fc Merge "Make AudioManager.getSurroundFormats a TestApi" into sc-dev 2021-06-04 10:49:29 +00:00
Marin Shalamanov
3bec57aa03 Make AudioManager.getSurroundFormats a TestApi
We need to access this API from a TVTS test.

Bug: 187028404
Test: locally run
    m tvts && tvts-tradefed run commandAndExit \
         tvts-all -m TvtsHdmiHostTestCases
Change-Id: I0122ff2a1f285aa01dc76e332a35798e19a07ac7
Merged-In: I0122ff2a1f285aa01dc76e332a35798e19a07ac7
2021-06-03 16:45:07 +00:00
Marin Shalamanov
e4a267c13e Merge "Make AudioManager.getSurroundFormats a TestApi" 2021-06-03 15:15:55 +00:00
satayev
749427e8b7 Add SharedLibraryInfo#isNative to @TestApi surface.
The method is used in ClasspathDeviceTest to filter out native .so
files, as it only cares about java classes.

Bug: 189347015
Bug: 187823488
Test: m
Change-Id: Id4d41ddef1cddbecd7f7028e28da4040cdfd5c26
2021-06-03 14:09:36 +01:00
Svetoslav Ganov
0f79c4da88 Merge "Switch media fw permissions checks to AttributionSource" into sc-dev am: 1028eb2f62
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14664152

Change-Id: I7f3c14e427b1ef0cb0232c0f0194bfbaa23b7706
2021-06-03 07:17:56 +00:00
Jeff Sharkey
2fe566fadc Merge changes from topic "may27-sdk" into sc-dev am: e6fb6087aa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14749815

Change-Id: Icb3c3e5cd0901d1a1a90d9d4a1e69c9ed713d74a
2021-06-03 07:02:15 +00:00
Svetoslav Ganov
ae1d49549a Merge "Switch media fw permissions checks to AttributionSource" into sc-dev am: 1028eb2f62 am: 94893b35e0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14664152

Change-Id: I5dfa6199ec032779c732e916d6622427466c3f2f
2021-06-02 23:28:02 +00:00
Svetoslav Ganov
1028eb2f62 Merge "Switch media fw permissions checks to AttributionSource" into sc-dev 2021-06-02 23:07:22 +00:00
Jacky Kao
e10e9e587f Merge "Adds the display Id into the A11y event" 2021-06-02 22:55:55 +00:00
Jeff Sharkey
dbfae6ddc7 Merge changes from topic "may27-sdk" into sc-dev am: e6fb6087aa am: b3a4448be3 am: 77499b3231
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14749815

Change-Id: I759a5582a387d95bb13ad726817b0bcba86e841d
2021-06-02 20:27:34 +00:00
Jeff Sharkey
77499b3231 Merge changes from topic "may27-sdk" into sc-dev am: e6fb6087aa am: b3a4448be3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14749815

Change-Id: Ifdf0c0d1c2ee8035074e3201401c77add39175f0
2021-06-02 20:19:58 +00:00
yuanjiahsu
bb88ce3524 Exports API to allow RULE_MATCH_UID support both RECORDERS and PLAYERS mix type
Removes @hide to export AudioMixingRule#Builder#setTargetMixType(), AudioMix#MIX_TYPE_PLAYERS and AudioMix#MIX_TYPE_RECORDERS.

Bug: 183693610
Test: atest com.google.android.gts.audioservice.AudioServiceHostTest
Change-Id: I8eebfc8c139b0bd3ef277863eb46d2c3383eb65e
2021-06-03 03:36:33 +08:00
Marin Shalamanov
49e778e792 Make AudioManager.getSurroundFormats a TestApi
We need to access this API from a TVTS test.

Bug: 187028404
Test: presubmit
Change-Id: I0122ff2a1f285aa01dc76e332a35798e19a07ac7
2021-06-02 14:29:56 +00:00
Michal Olech
cd149b8aa6 Merge "[CEC Configuration] Add 'system_audio_control' setting" 2021-06-02 14:12:49 +00:00
Svet Ganov
2eebf92965 Switch media fw permissions checks to AttributionSource
Attribution source is the abstraction to capture the data
flows for private data across apps. Checking permissions
for an attribution source does this for all apps in the
chain that would receive the data as well as the relevant
app ops are checked/noted/started as needed.

Teach speech recognition service about attribution
chains. If an implementation does nothing the OS
would enforce permisisons and do blame as always.
This apporach leads to double blaming and doesn't
support attribition chains where app calls into
the default recognizer which calls into the on
device recognizer (this nests recursively). If the
implementer takes advantage of the attribution chain
mechanims the permissions for the entire chain are
checked at mic access time and all apps are blamed
only once.

Fixed a few bugs around finishing ops for attribution
chains. Also ensured that any app death in a started
attribution chain would lead to finishing the op for
this app

bug: 158792096

Test: (added tests for speech reco)
      atest CtsMediaTestCases
      atest CtsPermissionTestCases
      atest CtsPermission2TestCases
      atest CtsPermission3TestCases
      atest CtsPermission4TestCases
      atest CtsPermission5TestCases
      atest CtsAppOpsTestCases
      atest CtsAppOps2TestCases

Merged-In: Ic92c7adc14bd2d135ac13b96f17a1b393dd562e4

Change-Id: Ic92c7adc14bd2d135ac13b96f17a1b393dd562e4
2021-06-01 23:43:29 +00:00
Svetoslav Ganov
757486cde6 Merge "Switch media fw permissions checks to AttributionSource" 2021-06-01 21:31:30 +00:00
Svet Ganov
b033da4e3a Switch media fw permissions checks to AttributionSource
Attribution source is the abstraction to capture the data
flows for private data across apps. Checking permissions
for an attribution source does this for all apps in the
chain that would receive the data as well as the relevant
app ops are checked/noted/started as needed.

Teach speech recognition service about attribution
chains. If an implementation does nothing the OS
would enforce permisisons and do blame as always.
This apporach leads to double blaming and doesn't
support attribition chains where app calls into
the default recognizer which calls into the on
device recognizer (this nests recursively). If the
implementer takes advantage of the attribution chain
mechanims the permissions for the entire chain are
checked at mic access time and all apps are blamed
only once.

Fixed a few bugs around finishing ops for attribution
chains. Also ensured that any app death in a started
attribution chain would lead to finishing the op for
this app

bug: 158792096

Test: ((added tests for speech reco))
      atest CtsMediaTestCases
      atest CtsPermissionTestCases
      atest CtsPermission2TestCases
      atest CtsPermission3TestCases
      atest CtsPermission4TestCases
      atest CtsPermission5TestCases
      atest CtsAppOpsTestCases
      atest CtsAppOps2TestCases

Change-Id: Ic92c7adc14bd2d135ac13b96f17a1b393dd562e4
2021-06-01 15:12:57 +00:00
Jeff Sharkey
de062e478c Finalize resource IDs; script to help in future.
Bug: 171506470
Test: Build
Change-Id: I7b7360475ff0f6f4d4c8b8872eefc4e80fd9640e
2021-06-01 06:48:52 -06:00
Jeff Sharkey
7c5f4337fd platform/frameworks/base/ - S is now 31
Bug: 171506470
Test: Build
Change-Id: I46d4df5f27783a96a58c966b113391ea3bc112cb
2021-06-01 06:48:51 -06:00
Michal Olech
bc57a6aaa5 [CEC Configuration] Add 'routing_control' setting
This ports Settings.Global.HDMI_CEC_SWITCH_ENABLED to HdmiCecConfig.

Bug: 187284252
Test: run cts
Change-Id: I7994a1d69ffc0bf68323d4dcc212a89be1926db9
2021-05-31 13:03:47 +02:00
Michal Olech
3d007e9ce4 [CEC Configuration] Add 'system_audio_control' setting
This ports Settings.Global.HDMI_SYSTEM_AUDIO_CONTROL_ENABLED to
HdmiCecConfig.

Bug: 187284252
Test: run cts
Change-Id: Idb0e069f915a9a7c04c4f7fd24d8c200666c47a9
2021-05-31 13:03:46 +02:00
Jeff Sharkey
19e14f1d4c Merge "Revert "Add user privacy sensitivity APIs."" into sc-dev am: 14016d39a6 am: c3943f2be7 am: d02d709d8b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14669180

Change-Id: Icf9a664e58bdab771768890978bf81c93698a30e
2021-05-28 03:03:54 +00:00
Jeff Sharkey
d02d709d8b Merge "Revert "Add user privacy sensitivity APIs."" into sc-dev am: 14016d39a6 am: c3943f2be7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14669180

Change-Id: Id6aba428c2f508b4669ea26ff0cdf1f29105e814
2021-05-28 02:54:17 +00:00