Commit Graph

3124 Commits

Author SHA1 Message Date
Vadim Caen
dc07d29bd0 Merge "Release the SurfacePackageViewHost on splash screen removed" into sc-dev 2021-06-16 12:27:47 +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
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
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
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
cf28c48575 Merge "Add SharedLibraryInfo#isNative to @TestApi surface." into sc-dev 2021-06-04 12:37:02 +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
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
1028eb2f62 Merge "Switch media fw permissions checks to AttributionSource" into sc-dev 2021-06-02 23:07:22 +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
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
Eino-Ville Talvala
db73d5d6ba Camera: Add black test pattern mode for privacy
Add an enum value for test pattern BLACK, to be used with
camera muting on devices that can't implement the full
SOLID_COLOR test pattern API.

Also include it in test API to ensure correct behavior can
be tested.

Test: Camera CTS continues to pass
Bug: 189507251
Change-Id: Ie9449f722fdc356c690f1513d4cb25a43a14e4c8
2021-05-27 18:11:38 -07:00
Jeff Sharkey
14016d39a6 Merge "Revert "Add user privacy sensitivity APIs."" into sc-dev 2021-05-27 11:59:21 +00:00
Jeff Sharkey
725a2ea256 Clean up "Deprecated at Birth" APIs.
When APIs are refactored mid-release, they can often be left marked
as @Deprecated with the intention of eventually removing them before
the SDK is finalized.

Well, the time has come to finalize the SDK, so let's clean them up.

Bug: 189325658
Test: manual
Change-Id: I48e3e1c1306fbaf071e4acfd9e8107e6ad564ffe
2021-05-26 13:09:00 -06:00
Brad Ebinger
4b097031bf Set all references to SipDelegateImsConfiguration as @removed
SipDelegateImsConfiguration should not be included in the final
API.

Bug: 186118835
Test: atest CtsTelephonyTestCases
Change-Id: I6321ac6d0c9fbcc4258d1a068934d1116b1819cf
2021-05-26 12:55:56 -06:00
Ahaan Ugale
c449e23d4d Merge "Manual overwrite @removed for genereated builder apis." into sc-dev 2021-05-26 01:01:43 +00:00
Brad Ebinger
df366773b4 Merge "Remove the deprecated SipDelegate methods pertaining to Dialogs" into sc-dev 2021-05-25 22:54:27 +00:00
Sergey Volnov
76660ef721 Merge "Hotword: Add onStopDetection() for software detectors." into sc-dev 2021-05-25 21:41:58 +00:00
Brad Ebinger
a0dcca7cb5 Remove the deprecated SipDelegate methods pertaining to Dialogs
Remove deprecated APIs pertaining to closeDialog now that all
dependencies on this method have been removed.

Bug: 187747944
Test: atest CtsTelephonyTestCases
Merged-In: I2675d3bd15199c75d70560b7ba529f267ac08970
Change-Id: I2675d3bd15199c75d70560b7ba529f267ac08970
2021-05-25 13:51:06 -07:00
Adam He
a8ad787594 Manual overwrite @removed for genereated builder apis.
Fixes: 186475868
Test: atest CtsTranslationTestCases
Change-Id: Ie56e57ac0afb2a3b1c99eb489d38d557fd1e2124
2021-05-25 13:07:12 -07:00
Ahaan Ugale
31f241cc63 Hotword: Add onStopDetection() for software detectors.
For DSP-based detection, stopRecognition() disables detection at the
sound trigger layer. For software detection, the HotwordDetectionService
must be notified so it can stop detection.

Bug: 189236104
CTS-Coverage-Bug: 183425641
Test: atest CtsVoiceInteractionTestCases
Change-Id: I220d2255e5e500c22723f6e2fbc34860a529f216
2021-05-25 18:59:29 +00:00
Sergey Volnov
a0906a1759 Make builder public for HotwordRejectedResult.
This is the P0 feature we found 10 minutes ago from the client team:
there is currently no way to create HotwordRejectedResult.

Bug: 189189762
CTS-Coverage-Bug: 183425641
Test: atest CtsVoiceInteractionTestCases
Change-Id: I6260a43dda89ba812ac1a6d6b5486145d6777f84
2021-05-25 18:30:41 +00:00
Jeff Sharkey
023570d056 Merge "Retire preliminary FGS deferral control API" into sc-dev 2021-05-25 14:27:07 +00:00
Sergey Volnov
8d488e7fa0 Address API council feedback:
s/isPersonalizedHotwordDetection/isHotwordDetectionPersonalized/.

Bug: 189189762
CTS-Coverage-Bug: 183425641
Test: atest CtsVoiceInteractionTestCases
Change-Id: Ibd39eb95c9e3066e251288f9b2dc3c8278f2b1d6
2021-05-25 12:58:04 +01:00
Christopher Tate
baf1aad78e Retire preliminary FGS deferral control API
Now that we've settled the final API for this mechanism, retire the
preliminary one.

Bug: 186475652
Test: atest CtsAppTestCases:ServiceTest
Test: atest CtsAppTestCases:NotificationManagerTest
Change-Id: Ibe911627ad59b991f2e498689f7fa3019c19dc36
2021-05-24 14:28:16 -07:00
Hyunyoung Song
46d6e25d25 Merge "ApiCouncil review round3 / setHidden, Query.getExtras" into sc-dev 2021-05-24 21:14:10 +00:00
Adam He
102dd28dd0 Merge "Make APIs abstract once AiAi has implemented them." into sc-dev 2021-05-24 21:06:16 +00:00
TreeHugger Robot
06cd94a6de Merge "Update associate API by adding certificate param" into sc-dev 2021-05-24 21:00:17 +00:00
Guojing Yuan
cc4ffc849b Update associate API by adding certificate param
Fix: 184264581

Test: N/A
Change-Id: Ie28a2e68826744c0f020113d1b85b5a4b2d54c7f
2021-05-24 18:04:27 +00:00
Chris Ye
b3d0a2afe3 Merge "Add capabilities to android.hardware.lights.Light." into sc-dev 2021-05-24 17:34:58 +00:00
Hyunyoung Song
c94e76051f ApiCouncil review round3 / setHidden, Query.getExtras
Bug: 186756959
Test: atest CtsSearchUiServiceTestCases
Change-Id: I2d13556fd71ddf8ae4e44879a91039a698667001
2021-05-24 09:29:49 -07:00
Sergey Volnov
3cff27f756 Merge "HotwordDetectionService: Remove deprecated-at-birth APIs." into sc-dev 2021-05-24 08:48:07 +00:00
Chris Ye
9f98e33d8e Add capabilities to android.hardware.lights.Light.
Add capabilities of MONO, RGB and PLAYER_ID to
android.hardware.lights.Light, and the APIs to query the capabilities.

Bug: 181743615
Test: atest InputDeviceLightsManagerTest, atest LightsManagerTest, atest android.hardware.input.cts.tests
Change-Id: I266c83584d63815e1a71897e5975d6c13e8543bb
2021-05-22 18:28:14 -07:00
Joe Huang
9d78bec9fa Merge "SatellitePvt API council review" into sc-dev 2021-05-22 04:46:24 +00:00
Soonil Nagarkar
20b934e7db Merge "Update location bypass allowlist" into sc-dev 2021-05-22 04:04:54 +00:00
TreeHugger Robot
59bdbf467f Merge "Update signature on remove sensor privacy listener API" into sc-dev 2021-05-22 02:02:21 +00:00
Adam He
a5db52f9ed Make APIs abstract once AiAi has implemented them.
Bug: 187871949
Test: atest CtsTranslationTestCases
Change-Id: I2f332d7ed2b952f193d2b6df4a034c79035a71fd
2021-05-21 18:32:13 -07:00
Nate Myren
4421186590 Merge "Add PrivacyIndicator APIs to WindowInsets" into sc-dev 2021-05-22 00:13:34 +00:00
Ahaan Ugale
fb45d8ed94 Merge "Adjust HotwordDetectedResult with up-to-date information." into sc-dev 2021-05-22 00:11:26 +00:00
Sergey Volnov
966917e513 Adjust HotwordDetectedResult with up-to-date information.
Asked for API exception in b/168305377#comment49.

Bug: 168305377
CTS-Coverage-Bug: 183425641
Test: atest CtsVoiceInteractionTestCases
Change-Id: I50c39c430950f21950210feffc287203b49780c6
2021-05-21 14:08:00 -07:00
Evan Severson
6c8326f02a Update signature on remove sensor privacy listener API
If a listener can be registered for multiple sensors they should be able
to be removed individually.

Test: Build
Bug: 181681375
Change-Id: I04b867de8140adc8db0137e7d13c0f8d1a966a5e
2021-05-21 19:54:11 +00:00
Joe Huang
8945fbb3a1 SatellitePvt API council review
Remove getFlags/setFlags, determining the flag in Java side

Bug: 188798284
Test: atest CtsLocationPrivilegedTestCases, also try setting different flags in HAL to see if CTS can be passed.
Change-Id: I231148b62404ee4873da60546eebb75d83fae9a7
2021-05-22 02:02:53 +08:00
Hai Zhang
5044308999 Merge "Expose platform permission group mapping as public API." into sc-dev 2021-05-21 17:26:10 +00:00
Ahaan Ugale
8ed012f320 HotwordDetectionService: Remove deprecated-at-birth APIs.
Fix: 182788844
Test: atest CtsVoiceInteractionTestCases
Change-Id: I9050c110702f5785410e2fb847e239ce041eb9e6
2021-05-21 09:52:41 -07:00
Soonil Nagarkar
1ea818347e Update location bypass allowlist
Create a new DeviceConfig entry to replace the prior Settings entry on
which the location ignore settings allowlist is based. This allows us to
allowlist based on attribution tag, and eliminate holes for large
applications.

Test: manual + CTS + GTS
Bug: 187421886
Change-Id: I31e61db79b93e202bd8c66efae1bb5aaf0c88ff5
2021-05-21 09:25:47 -07:00
TreeHugger Robot
cc0987b12a Merge "Soft remove deprecated translation apis." into sc-dev 2021-05-21 08:39:35 +00:00