Commit Graph

9687 Commits

Author SHA1 Message Date
TreeHugger Robot
241f3b293b Merge "Add support for 10-bit YUV P010 ImageFormat" into sc-dev 2021-02-05 06:18:27 +00:00
Andy Hung
1d55f0d409 Merge "AudioRecord: Fix permission documention" into sc-dev 2021-02-04 01:35:02 +00:00
TreeHugger Robot
4fa23b75b1 Merge "Add constant values for MPEG-H." into sc-dev 2021-02-03 18:54:13 +00:00
Andy Hung
7ef5694ee0 AudioRecord: Fix permission documention
Document existing behavior: Annotate construction and build with
@RequiresPermission(android.Manifest.permission.RECORD_AUDIO)

Test: make docs and view.
Test: atest NoAudioPermissionTest
Bug: 167394786
Change-Id: I5ab69010e8805b35f79571eee1b40c1e9452f1fc
2021-02-03 09:58:48 -08:00
Kyunglyul Hyun
c5a8e95227 Merge "Change MR2Manager.Callback to interface" into sc-dev 2021-02-03 08:00:39 +00:00
Ray Essick
c82197a055 Merge "Audio encoder specifies channel-range" into sc-dev 2021-02-03 00:51:05 +00:00
Bhalchandra Gajare
42679e26a4 Merge "AudioAttributes: add ability to set Hotword mode for capture" into sc-dev 2021-02-02 20:03:28 +00:00
Ray Essick
3acc244e52 Audio encoder specifies channel-range
Allow the audio encoder XML to specify ranges of channels instead
of just a max (which had implied min==1).

Bug: 156273760
Test: atest android.media.cts.MediaCodecTest#testPrependHeadersToSyncFrames
Change-Id: Ib862e09074ffc34874f2c7d1a9f074096cebc046
Merged-In: Ib862e09074ffc34874f2c7d1a9f074096cebc046
2021-02-02 17:28:09 +00:00
Adrian Roos
84199909eb Merge changes from topic "nullablecollection" into sc-dev
* changes:
  API: Suppress existing NullableCollections lints (TaskOrganizer)
  API: Suppress existing NullableCollections lints (S edition)
2021-02-02 09:24:38 +00:00
Kyunglyul Hyun
00b31a9ff1 Change MR2Manager.Callback to interface
Interfaces are recommended than classes.

Bug: 178044350
Test: Build successful
Change-Id: I671d47b527222b52e57da627a8350405450dd9ac
2021-02-02 05:57:25 +00:00
Amy Zhang
e0a71c1435 Merge "Improve documation of RestartEvent of Tuner Filter" into sc-dev 2021-02-01 19:00:25 +00:00
Adrian Roos
d7f33cd648 API: Suppress existing NullableCollections lints (S edition)
Bug: 152525509
Test: make checkapi
Change-Id: Idf96709bf93ef49ca5ad3cdd1f14d06e0d9e09d7
Exempt-From-Owner-Approval: API lint large scale change
2021-02-01 14:54:34 +00:00
Bhalchandra Gajare
c86c4cae91 AudioAttributes: add ability to set Hotword mode for capture
Allow setting Hotword mode for capture usecases that want to use the low
power DSP based hotword source for capturing audio. This will be only
available for AudioSource.VOICE_RECOGNITION. There is no guarantee that
this mode will be available on the device. The caller must have the
CAPTURE_AUDIO_HOTWORD permission granted.

Bug 178317696
Test: Able to setHotwordMode from AGSA application. Confirmed
HAL receives the flag and audioSource correctly in open_input_stream.

Merged-In: I1fb80a047654e2abb8a587bf2f6ff82fcacd67b6
Change-Id: I1fb80a047654e2abb8a587bf2f6ff82fcacd67b6
(cherry picked from commit 25c32fbd9e)
2021-02-01 09:56:10 +00:00
Hyundo Moon
666804029d Merge "Add a new system service: MediaCommunicationService" into sc-dev 2021-02-01 06:11:27 +00:00
jiabin
f836836b3d Add constant values for MPEG-H.
MPEG-H is a new surround audio codec. Low complexity and baseline with
audio level as 3 and 4 is defined since they are relevant for the
current and upcoming commercial services.

Bug: 178619392
Test: make, atest AudioFormatTest
Change-Id: Iea5432765abeb485a31c8848793dffce1d4c6a0b
2021-01-29 20:27:26 +00:00
Amy Zhang
086e935ef2 Improve documation of RestartEvent of Tuner Filter
Test: make
Bug: 178498700
Change-Id: Ia963d3277accc574ff534ac17838d11a65bf861a
2021-01-29 18:22:08 +00:00
Amy Zhang
cd347c4bd0 Merge "Rename configureMonitorEvent to setMonitorEventMask" into sc-dev 2021-01-28 19:23:18 +00:00
Hyundo Moon
47b63528c3 Add a new system service: MediaCommunicationService
Bug: 175511943
Test: MediaCommunicationService can run.
      'adb shell service list' shows the service.
Change-Id: I81a1e11d96d1d30a29760507be6fe04592afcf70
Merged-In: I81a1e11d96d1d30a29760507be6fe04592afcf70
2021-01-28 13:07:53 +00:00
Jin Seok Park
258fca377d Add setMediaButtonBroadcastReceiver API
This API will replace the existing
setMediaButtonReceiver(PendingIntent) API to address the issue that
PendingIntent obejcts should not be persisted over reboots.

See go/replace-setmediabuttonreceiver for more details.

Bug: 161334442
Test: atest CtsMediaTestCases:android.media.cts.MediaSessionTest
Change-Id: I4ece6b8595b5f572426b96fbf06edb34c93eeb50
2021-01-28 05:34:48 +00:00
Amy Zhang
58a11fc1e4 Rename configureMonitorEvent to setMonitorEventMask
Change-Id: I7a215176989f2f244dec81fe44ed985e690c206e
Test: atest TunerTest
Bug: 175130122
2021-01-28 05:13:19 +00:00
Emilian Peev
fd37b04a35 Add support for 10-bit YUV P010 ImageFormat
Bug: 147711411
Test: Camera CTS
Change-Id: I44f61b44f1cc67e079417e72415a26c0793ab5e8
2021-01-27 17:30:49 +00:00
Shubang Lu
4adf45f942 Merge "Add Context constant for Playback Metrics Service" 2021-01-26 20:02:36 +00:00
Jiabin Huang
6c0b3e82ab Merge "Update doc for HapticGenerator." 2021-01-26 19:59:02 +00:00
TreeHugger Robot
54189bf9a3 Merge "Update class comment." 2021-01-26 17:53:31 +00:00
shubang
15c1dd0e51 Add Context constant for Playback Metrics Service
Bug: 159337195
Test: mmm
Change-Id: I771a5edd1ce022d196eb4b612f382f52f7701b4b
2021-01-25 17:28:10 -08:00
Shubang Lu
5d6049ab35 Merge "Unhide playback metrics APIs part 1" 2021-01-25 23:24:43 +00:00
TreeHugger Robot
af68bebbaa Merge "Camera: Initial support for Camera2 extension" 2021-01-25 23:16:30 +00:00
TreeHugger Robot
cfe6d4bf8b Merge "use UID instead of user ID for metrics according to design doc." 2021-01-25 21:12:46 +00:00
Henry Fang
ef216948e6 use UID instead of user ID for metrics according to design doc.
bug: 169537354
Test: manual
Change-Id: Ic90293b8534236cc99e7dfd22542ebad178517fd
2021-01-25 11:28:51 -08:00
Emilian Peev
9c778e19e1 Camera: Initial support for Camera2 extension
Add the necessary APIs that will allow Camera2 clients to access
and work with existing CameraX extensions.

Bug: 170481080
Test: Camera CTS

Change-Id: Iaa22fea69ebe01599b3f2e66c1b46ca92015cdc5
2021-01-25 09:59:26 -08:00
Daniel Cardenas
591df136c9 Update class comment.
An AudioProfile is specific to an audio format and lists supported
sampling rates and channel masks for that format.
An {@link AudioDeviceInfo} has a list of supported AudioProfiles.

Test: None
Change-Id: I491c60d88be2abc93463a0a85ed96d8c6c7601ed
2021-01-25 09:15:01 -08:00
Daniel Cardenas
df8e815f86 Class comment: Provides information about an audio device
Test: None
Change-Id: I3fb721b609267c4bd3a02490dd9aa7f4dd2926aa
2021-01-25 08:02:22 -08:00
Andy Hung
922f2c4330 Merge "audio: add implementation for TV related API" 2021-01-25 06:46:50 +00:00
Nicholas Ambur
28cc6364d6 add API for ST clients run in battery saver mode
New system API interface for both SoundTriggerManager and
AlwaysOnHotwordDetector to indicate if a recognition should run in
battery saver mode or not.

Clients supply this information through the existing startRecognition
calls, and the client must hold a new privledged permission,
SOUND_TRIGGER_RUN_IN_BATTERY_SAVER, to indicate this intention.

As a prerequisite, the device PowerManagerService must have the
SoundTrigger service enabled in the battery saver mode battery policy.
If not enabled, recognition will be paused as if the client did not
provide the indication to run in battery saver mode.

Bug: 172294448
Test: build with Google search apk using this feature and verify
recognition keeps running in battery saver mode

Change-Id: Ia43be99290e6fd7c50ff8e4908d6c60ea513b19a
2021-01-22 18:24:39 -08:00
jiabin
37fac86bc8 Update doc for HapticGenerator.
The controlling of which audio channel to be used for generating haptic
data is not yet provided.

Add doc for HapticGenerator#isAvailable.

Bug: 178196051
Test: make
Change-Id: I4717c5225f5a3701523b94ccc88f4f7aea9dd49b
2021-01-22 17:22:10 +00:00
Kuowei Li
f50ac2e32b audio: add implementation for TV related API
1. TunerConfiguration.
2. AudioDescriptionMixLevel getter/setter.
3. DualMonoMode getter/setter.
4. PlaybackRate getter/setter.

Test: TIS player with instrumented HAL
Test: atest AudioTrackTest#testTunerConfiguration
Test: atest AudioTrackTest#testDualMonoMode
Test: atest AudioTrackTest#testAudioDescriptionMixLevel
Test: atest AudioManagerTest#testGetAdditionalOutputDeviceDelay
Bug: 173482792
Change-Id: I47b022154983283aeeac41cf506818009e88995b
2021-01-21 12:46:49 -08:00
Robert Shih
9765788d7d Merge "MediaDrm: implement PlaybackComponent" 2021-01-21 16:36:20 +00:00
shubang
01ad1273a4 Unhide playback metrics APIs part 1
Bug: 159337195
Test: mmm
Change-Id: Ifb25bbafaf97aa582cb7981c24e585620c35ef21
2021-01-20 23:32:30 -08:00
Manish Singh
530d7d9cdb Add unsupported mime types in media capabilities
Since ApplicationMediaCapabilities now provides the option to add
unsupported mime types, we add the unsupported types to the bundle for
the case when we want transcoding to happen in MTP.

Test: manual
BUG=158466651

Change-Id: I1266c0753e43b84ec4f5bd181386f5c6aeb477d3
2021-01-20 19:34:56 +00:00
Treehugger Robot
f0678d7848 Merge "Don't set hdmiPortId for non HDMI device." am: 9923250234 am: a5a278129c am: 36605e338b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554092

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icbcfe59347f232eafde5360530720e3e34743b5a
2021-01-20 18:53:43 +00:00
Treehugger Robot
36605e338b Merge "Don't set hdmiPortId for non HDMI device." am: 9923250234 am: a5a278129c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554092

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie11f0ec4204d6c4987f32a9b18e8d632c8448f84
2021-01-20 18:46:49 +00:00
Robert Shih
21cfd9b232 Merge changes from topic "requiresSecureDecoder"
* changes:
  javadoc for MediaDrm#requiresSecureDecoder param mime
  MediaDrm: query secure codec requirement w/o session
2021-01-20 13:05:15 +00:00
Robert Shih
fed6252a3c javadoc for MediaDrm#requiresSecureDecoder param mime
Bug: 136119370
Test: build
Change-Id: I5a227ffd0b723fc3aaa81fb4e5827b23b9b4ab56
2021-01-20 01:56:44 -08:00
Robert Shih
0293712165 MediaDrm: implement PlaybackComponent
Also make PlaybackComponent available to tests

Bug: 159337195
Bug: 168341163
Test: GtsMediaTestCases MediaDrmTest#testSetPlaybackId
Change-Id: I9bba9340f77a5baddb7e946f0e0e84033350727c
2021-01-20 00:05:20 -08:00
Robert Shih
205f7a9fb1 MediaDrm: query secure codec requirement w/o session
Bug: 136119370
Test: GtsMediaTestCases
Change-Id: I37982e77deff5e2ac21c2d1a5bdf07b1d1f08b15
2021-01-19 21:12:10 -08:00
Henry Fang
2f4cec96c5 Don't set hdmiPortId for non HDMI device.
bug: 142698113
Test: Manaul
Change-Id: I2876dacb07e4ebb4ed43c5e95b14ab84c8d935cb
2021-01-19 13:40:57 -08:00
shubang
33e27dd2ef Add playback track change event
Test: make;
Bug: 167036690
Change-Id: I083ca1d5e7a8e708f2f6f63e19483d7fc59c492e
2021-01-19 10:36:30 -08:00
Kyunglyul Hyun
2f9749cd57 Merge "MediaRouterService binds services when necessary" 2021-01-19 06:06:26 +00:00
Manish Singh
219de7e4e8 Merge "Support transcode via MTP" 2021-01-18 16:36:34 +00:00
shubang
f2536f04f6 Add playback state event
Test: make;
Bug: 167036690
Change-Id: I6658b282096a3894ac8028a1a8255321d16bb7bc
2021-01-15 16:40:09 -08:00