Commit Graph

17783 Commits

Author SHA1 Message Date
Jeff Sharkey
cbdf88ce58 Merge changes from topic "nearby-bluetooth-permission-group" into sc-dev am: 9f5392e8b7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13956893

Change-Id: Idef7bb2a70ff9a5f0c4eff73ccbdc6e2bae02259
2021-03-23 13:10:54 +00:00
Jeff Sharkey
9f5392e8b7 Merge changes from topic "nearby-bluetooth-permission-group" into sc-dev
* changes:
  Request new Bluetooth runtime permissions.
  Default grants for "Nearby devices" permission.
  Add BLUETOOTH_SCAN and BLUETOOTH_CONNECT app ops
  Split new NEARBY_DEVICES permissions
  Define new NEARBY_DEVICES permission group
2021-03-23 12:56:30 +00:00
Guillaume Chelfi
29e2f587fa Merge "Add tunnel mode video peek related APIs" into sc-dev am: 4f576188b4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13472392

Change-Id: I85836e2dc5c69cc361f074b922c050a566e1bd40
2021-03-23 12:47:33 +00:00
TreeHugger Robot
97f611b4f1 Merge "System MR2: Add MediaRouter2#registerRouteCallback(executor, callback)" into sc-dev am: da809dde02
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13960213

Change-Id: Ifa54558e8670e291c37e913eeed226406a37c959
2021-03-23 12:46:09 +00:00
Guillaume Chelfi
4f576188b4 Merge "Add tunnel mode video peek related APIs" into sc-dev 2021-03-23 12:30:33 +00:00
Hyundo Moon
96ab01b44f System MR2: Add MediaRouter2#registerRouteCallback(executor, callback)
This CL adds registerCallback(executor, callback) as @SystemApi
for system MediaRouter2.

Bug: 183453134
Test: Passed CTS
Change-Id: I50e942714946ae8af7ad69432cefcd8015040d4d
2021-03-23 09:46:54 +00:00
TreeHugger Robot
f5de8b7f09 Merge "Remove invalid javadoc link to VideoView" into sc-dev am: 9a5dfd3731
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13951829

Change-Id: Ic62c0513ce6d7a4f44919f422dfa45189d1b21b8
2021-03-22 21:57:59 +00:00
TreeHugger Robot
9a5dfd3731 Merge "Remove invalid javadoc link to VideoView" into sc-dev 2021-03-22 21:41:53 +00:00
Jeff Sharkey
7b14b87647 Request new Bluetooth runtime permissions.
An upcoming platform change is introducing a new "Nearby devices"
runtime permission which contains the new BLUETOOTH_CONNECT and
BLUETOOTH_SCAN permissions.

We have logic in place to use <split-permission> to translate the
older BLUETOOTH and BLUETOOTH_ADMIN permissions into these new
runtime permissions, but modern apps will need to pivot to
requesting them directly as part of targeting Android S.

This change requests both the old and new permissions to avoid
breakage while the new permission enforcement is being phased in.

Bug: 181813006
Test: atest CtsPermission2TestCases
Test: atest CtsPermission3TestCases
Test: atest CtsStatsdAtomHostTestCases
Change-Id: I39f45e7d22d132d44c84017cd98e6d9e98533c7f
2021-03-22 15:34:05 -06:00
TreeHugger Robot
71cf0b48ce Merge "Add toString method to AudioProfile class" into sc-dev 2021-03-22 20:10:31 +00:00
Daniel Cardenas
9887b0f9ed Add toString method to AudioProfile class
Bug: 183425455
Test: TVTS
      ag/13404743
Change-Id: I47f22580484c453237756670b5197b007d43e44b
(cherry picked from commit f5c29ceccd)
2021-03-22 20:10:18 +00:00
Santiago Seifert
a1fe7ef57f Remove invalid javadoc link to VideoView
Before this change, the MediaPlayer javadoc referenced VideoView's
javadoc, even though it was not relevant. The link can be removed
because a correct link is provided further down in MediaPlayer's
javadoc to the MediaPlayer guide.

Bug: 182880215
Bug: 182798119
Change-Id: Ife353257e10f73ef319f1913c9e59046e4ec10ce
2021-03-22 18:54:06 +00:00
Guillaume Chelfi
c072caf19b Add tunnel mode video peek related APIs
Bug: 157501309
Test: atest android.media.cts.DecoderTest#testTunneledVideoPlayback
      atest android.media.cts.DecoderTest#testTunneledVideoFlush
CTS-Coverage-Bug: 157501309

Change-Id: I5107106bb64d96ac6cc7d8704955b2f4477b94a8
2021-03-22 18:46:44 +01:00
Shubang Lu
4adeaa816c Merge "Unhide media metrics APIs" into sc-dev am: f505c5d215
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13833146

Change-Id: I9cf43eaa3963ac5207ca907b8909caa7de928fe6
2021-03-22 13:17:13 +00:00
Shubang Lu
f505c5d215 Merge "Unhide media metrics APIs" into sc-dev 2021-03-22 01:27:07 +00:00
shubang
be0b58d62a Unhide media metrics APIs
1. playbackId class
2. metrics bundle for future backwards compatibility
3. new enums and fields

Bug: 167036690
Test: atest android.media.metrics.cts
Change-Id: I09889dfd247017ee43fb833d9df98420dccf54a6
2021-03-19 18:34:47 -07:00
Nate Myren
d86bbd1b4f Merge "Clarify AudioRecord.Builder.setContext documentation" into sc-dev am: c3d290dcec
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13901977

Change-Id: I41a9ed517b6d12c838ac9c5e72c11f35a490e889
2021-03-19 20:15:52 +00:00
Nate Myren
c3d290dcec Merge "Clarify AudioRecord.Builder.setContext documentation" into sc-dev 2021-03-19 19:42:31 +00:00
Treehugger Robot
616d91d0eb Merge "Reset min_sdk_version of libmedia_jni" am: 0afaa9d9f6 am: 80ff97c8a5 am: 3d01b54d52 am: 7ff0c7c352
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640145

Change-Id: Ia6e3544a08a5ef3bfe026a061db8a30a394c09b1
2021-03-19 13:26:35 +00:00
Treehugger Robot
7ff0c7c352 Merge "Reset min_sdk_version of libmedia_jni" am: 0afaa9d9f6 am: 80ff97c8a5 am: 3d01b54d52
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640145

Change-Id: I793ab1a84edc7f71434378f364960332761c33c9
2021-03-19 13:09:24 +00:00
Treehugger Robot
3d01b54d52 Merge "Reset min_sdk_version of libmedia_jni" am: 0afaa9d9f6 am: 80ff97c8a5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640145

Change-Id: I9e37f8f478b3e08c1ca68296ce733035fd0f0009
2021-03-19 12:26:54 +00:00
Treehugger Robot
0afaa9d9f6 Merge "Reset min_sdk_version of libmedia_jni" 2021-03-19 11:41:03 +00:00
Andy Hung
faba8616eb Merge "AudioTrack: get/setStartThresholdInFrames" into sc-dev am: 45d9b3b7fb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13902345

Change-Id: I94629f9533435f6ecdb3a6dd3b2b4c0a4c858918
2021-03-19 07:25:18 +00:00
Andy Hung
45d9b3b7fb Merge "AudioTrack: get/setStartThresholdInFrames" into sc-dev 2021-03-19 07:07:25 +00:00
TreeHugger Robot
091c99c0df Merge "Add MediaRecorder.SystemSource." into sc-dev am: ef1688ac1a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13856195

Change-Id: Ifff7661c200b38f0f3b7b0a12e1a6effe9474fae
2021-03-18 23:22:36 +00:00
TreeHugger Robot
ef1688ac1a Merge "Add MediaRecorder.SystemSource." into sc-dev 2021-03-18 23:06:41 +00:00
Andy Hung
1c34209969 AudioTrack: get/setStartThresholdInFrames
setStartThresholdInFrames is used to set the start threshold
in frames for streaming AudioTrack playback.
Normally this is the entire buffer capacity in frames
but may be reduced for low latency playback,
compressed formats, and direct tracks.

See CTS test AudioTrackTest#testStartThresholdInFrames
for example calling details and behavior.

Test: atest AudioTrackTest#testStartThresholdInFrames
Test: atest AudioTrackTest#testStartThresholdInFramesExceptions
Bug: 183003720
Change-Id: I5064d04961e48b530c49071ff84c2e0d2065f41b
2021-03-18 11:20:02 -07:00
Kholoud Mohamed
380d831b94 Merge "Created a new testAPI isFullVolumeDevice in AudioManager" into sc-dev am: 0039406fa3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13877106

Change-Id: I5dd8d73082cf9646a7259f28ec46ef9c6781fd07
2021-03-18 10:35:43 +00:00
Kholoud Mohamed
0039406fa3 Merge "Created a new testAPI isFullVolumeDevice in AudioManager" into sc-dev 2021-03-18 10:14:32 +00:00
Andy Hung
a3b80e013c Merge "SoundPool: Avoid busy waiting during stream restart" am: dfb0754d31 am: 361882fae0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1642443

Change-Id: I37868ad22d887b2e75544126499a7cc4da9298e9
2021-03-17 23:24:02 +00:00
Jean-Michel Trivi
34e2c14ff3 Merge "MediaFormat: new MIME types for MPEG-H audio" into sc-dev am: f06d4de3f7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13902806

Change-Id: I29e085b051e515a4c74b048b13c266b135a31481
2021-03-17 22:06:41 +00:00
Jean-Michel Trivi
f06d4de3f7 Merge "MediaFormat: new MIME types for MPEG-H audio" into sc-dev 2021-03-17 22:04:42 +00:00
Andy Hung
cf0b405f68 Merge "SoundPool: Avoid busy waiting during stream restart" into sc-dev am: 95a83adc9c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13888813

Change-Id: I9cbebca9213115f13bdcb97584440f5fe2dfab14
2021-03-17 21:12:28 +00:00
Andy Hung
daa60c22d6 SoundPool: Avoid busy waiting during stream restart
A stream on the restart queue can cause the StreamManager to
busy-wait.  This was introduced by a fix
commit ba04dbe773.

Test: Verbose log on StreamManager.cpp, run SoundPool CTS tests.
Bug: 182923919
Merged-In: Iae794bc957869426a4e1e27cd3c088aa9dd83208
Change-Id: Iae794bc957869426a4e1e27cd3c088aa9dd83208
2021-03-17 10:45:07 -07:00
Jean-Michel Trivi
bb9e2099fe MediaFormat: new MIME types for MPEG-H audio
Add new MIME types for MPEG-H audio

Bug: 178619392
Test: atest android.media.cts.MediaFormatTest
Change-Id: I6b0026e6b5b979b6c3e3ca0b1c675e890662c0df
2021-03-17 10:07:39 -07:00
Andy Hung
95a83adc9c Merge "SoundPool: Avoid busy waiting during stream restart" into sc-dev 2021-03-17 16:10:46 +00:00
Nate Myren
076ab7300b Clarify AudioRecord.Builder.setContext documentation
Fixes: 182945070
Test: none
Change-Id: I127b3633f2deac03116321a115adfa50583a00be
2021-03-17 08:55:05 -07:00
kholoud mohamed
3783921323 Created a new testAPI isFullVolumeDevice in AudioManager
* Created isFullVolumeDevice to replace usage of dumpsys audio in cts
tests.
* Added a new permission QUERY_AUDIO_STATE to the newly created API and
the existing API that it depends on:
- getDevicesForAttributes
- getDeviceVolumeBehavior

Test: The new API is accessible from cts tests
Bug: 182260585
Change-Id: I9d6bd24695ae306930b2518b1b12288aca46ebe9
2021-03-17 15:39:50 +00:00
Hyundo Moon
87efd95aef Merge "System MR2: Set clientPackageName on system routing session" into sc-dev am: a85407a4cb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13886929

Change-Id: I63e5b037c4c4065368becb8b590ea7ac13a24076
2021-03-17 07:02:46 +00:00
Hyundo Moon
a85407a4cb Merge "System MR2: Set clientPackageName on system routing session" into sc-dev 2021-03-17 06:29:55 +00:00
Jiyong Park
147c20f115 Reset min_sdk_version of libmedia_jni
libmedia_jni is the non-updatable part of the platform. However, it has
been built with `min_sdk_version: "29"` inherited from
libcodec2-internal-defaults and then again from libcodec2-impl-defaults.
The setting is for the codec2 cc_* modules that are part of the media
APEX.

So far, this however, hasn't caused a problem because the build system
ignored min_sdk_version for the platform variants. This will change
starting from I88f64c5a35f1b5276c3350e177b116932011a940. Then
libmedia_jni will actually be built with min_sdk_verison: 29, and it
will be enforced that any APIs above the API level 29 should be guarded
with __builtin_available.

Adding the guards will not only be cumbersome, but also wouldn't give
any benefit because libmedia_jni is tied to the platform. The check will
always be true.

Instead, this change resets the min_sdk_version of libmedia_jni, so that
it can keep the existing behavior.

Bug: N/A
Test: m libmedia_jni
Change-Id: Ie963d71f60cbfe849b5400a5ecf2d52119078554
2021-03-17 14:20:54 +09:00
Chih-yu Huang
454d184d52 Merge "Close the handle returned by WrapNativeCodec2GrallocHandle()" into sc-dev am: 09cf0e5cea
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13855246

Change-Id: I675d7b9338d01faf9a0457f6c2df5f66cb884ca6
2021-03-17 01:42:11 +00:00
Chih-yu Huang
09cf0e5cea Merge "Close the handle returned by WrapNativeCodec2GrallocHandle()" into sc-dev 2021-03-17 01:16:40 +00:00
Andy Hung
d7ebcd20f9 Merge "SoundPool: Improve single stream SoundPool handling" am: 0f8c08544a am: 4140a29ad5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1640980

Change-Id: Ia9a5ec255a1d35dbefe882980db682a077079888
2021-03-16 23:35:24 +00:00
Shuzhen Wang
8c4c6d4eaa Merge "ImageWriter: Fix a minor documentation error" into sc-dev am: eb4aacc2c3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13537203

Change-Id: I24c90cc013ccf30f13d78d2184e2dde56d2ae18c
2021-03-16 21:37:25 +00:00
Shuzhen Wang
eb4aacc2c3 Merge "ImageWriter: Fix a minor documentation error" into sc-dev 2021-03-16 21:10:30 +00:00
Andy Hung
43da3d54c4 SoundPool: Improve single stream SoundPool handling
By design, the StreamManager ramps down volume
on a Stream stop to prevent pops and glitches.
When the SoundPool is configured only with a single stream,
there may be a short period of unavailability of that stream
while stop is called by the worker thread; an immediate
play after a stop may return 0 (failure).

To allow immediate play after stop for a *single* Stream configured
SoundPool, we lock the StreamManager worker thread so that the
stop call is processed and the stream is visible to the client for use.

We prefer not to keep this lock for the multiple Stream case as it
prevents concurrent initiation of sounds from multiple StreamManager
worker threads and such blocking is not appropriate for games.

Test: SoundPoolAacTest SoundPoolHapticTest
Test: SoundPoolMidiTest SoundPoolOggTest
Bug: 175097719
Bug: 177287876
Merged-In: Iec777d6319d5ed76000d4c5b12336b106dacede4
Change-Id: Iec777d6319d5ed76000d4c5b12336b106dacede4
2021-03-16 21:01:05 +00:00
Paul Mclean
2b46c544dc Merge "Enabling testing of VolumeGroup APIs" 2021-03-16 20:36:34 +00:00
Andy Hung
0821db29bf SoundPool: Avoid busy waiting during stream restart
A stream on the restart queue can cause the StreamManager to
busy-wait.  This was introduced by a fix
commit ba04dbe773.

Test: Verbose log on StreamManager.cpp, run SoundPool CTS tests.
Bug: 182923919
Change-Id: Iae794bc957869426a4e1e27cd3c088aa9dd83208
2021-03-16 12:13:35 -07:00
Henry Fang
bd07cdc90b Merge "Tuner FW: clean up Dvr/Filter message-queue resources upon close" am: e42498a501 am: c86d34a950
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1634480

Change-Id: I747f2bb48f1464e996c6fd460f51b3709f6d471a
2021-03-16 18:39:36 +00:00