Commit Graph

7909 Commits

Author SHA1 Message Date
Treehugger Robot
71ab50ae23 Merge "DO NOT MERGE - Merge QQ1A.200205.002 into master" 2020-02-08 01:29:23 +00:00
Xin Li
5b8d15365a DO NOT MERGE - Merge QQ1A.200205.002 into master
Bug: 147428392
Change-Id: I7939379e221123a74b387bf78ce90d68e0468ff0
2020-02-05 10:45:09 -08:00
Kyeongkab.Nam
5d08d4f235 TvProvider API standardization for ATSC3.0 and DVB
TvProvider API standardization and customization for Digital Tuner TV
Input support. (Programs.COLUMN_EVENT_ID, ProgramColumns.COLUMN_SPLIT_ID,
Programs.COLUMN_GLOBAL_CONTENT_ID, Channels.TYPE_ATSC3_T,
Channels.COLUMN_GLOBAL_CONTENT_ID)

Bug: 139424812
Bug: 139425741
Test: Manual
Change-Id: Idb4158cd2c9833ce9dd007de3b8fc5ccfe2a36b4
2020-01-31 11:10:13 -08:00
François Gaffie
9a2725c0b7 audiomanager: fix volume group callback
The AudioVolumeGroup change callback for a given group may be lost.
It is due to a poor copy paste in the Handler implementation where
the previous messages where removed.
In the case of volume group, it is forbidden to remove handled message
otherwise previous group change will not be reported.

Test: run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testVolumeGroupCallback
Bug: 136121584
Change-Id: I7434e66f02143c7da0f7156347d899e81467ee98
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
2020-01-29 10:25:07 -08:00
Kyeongkab.Nam
bbed3d5492 TIF: Add content ratings
Put comments for the newly added DTMB, New Zealand
and Thailand rating strings.

Test: manual
Bug: 112835405
Change-Id: I4b1e8b87efdd675bdcddec86433164518da0f2bf
2020-01-24 02:49:07 +00:00
Nick Chalko
aafdda0247 Update documentation for TV DVB devices.
Change-Id: Idcc80691be435e755203e9dd30a439c06ba0a5b5
Test: m framework-all update-api -j
Bug: 148065722
2020-01-23 09:13:02 -08:00
Kyeongkab.Nam
b30b38506b Fix equals and hashCode APIs on TvTrackInfo
Current hashCode API cares only for mId and it returns same values
even if other member variables are different.
To avoid for returning same values between different TvTrackInfo of
each program, hashCode API should care all variables used on
equals API. Note that mId is defined as unique only in the same
program.

Test: build
Change-Id: I4d72f6ce80141d92f86e548804e1f0257ed6fcfb
2020-01-22 11:10:32 +09:00
Artur Satayev
53ada2ab28 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv \
      git diff HEAD^ HEAD | grep '^[+-][^+-]' | grep -v '.import'
Merged-In: I853372f3c6fef905553bb31be4f1bb48df735f7a
Change-Id: I853372f3c6fef905553bb31be4f1bb48df735f7a
2020-01-14 15:54:55 +00:00
Eric Laurent
a25bf98613 AudioEffect: add contructor for device effect
Add a @SystemApi constructor to AudioEffect class
allowing to attach an audio effect to an input or output
device.

Bug: 136294538
Test: make
Change-Id: I0cb5cf5f38f95605a8605f3347aaa7e187db4e8a
Merged-In: I0cb5cf5f38f95605a8605f3347aaa7e187db4e8a
2020-01-10 11:28:00 -08:00
Jean-Michel Trivi
9f7e6eb601 AudioDeviceAddress: new class to store audio device information
Introduce a new class to store information about an audio device,
containing its role (input or output), device type and address.

Bug: 144440677
Test: atest AudioServiceHostTest#testAudioDeviceAddress
Change-Id: I86d32590c54609b8d8a9f7ea60d9b4bf76113935
Merged-In: I86d32590c54609b8d8a9f7ea60d9b4bf76113935
2020-01-10 11:28:00 -08:00
Artur Satayev
7651f0a4c0 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I4bc8c9482e4bb1af21363f951affff7ee3fefeab
Merged-In: I4bc8c9482e4bb1af21363f951affff7ee3fefeab
2020-01-09 15:13:52 +00:00
Kyeongkab.Nam
f692b95b2a Add spoken subtitle information to TvTrackInfo
Add TIF API for getting spoken subtitle attribute for audio tracks
in order for TV App to use it.

Test: build
Bug: 112835103
Change-Id: I2ebc27dae020bce14cd1a3464e91416c7a4415ec
2020-01-09 09:13:08 +09:00
Kyeongkab.Nam
8bbcf8aae5 Add hearingImpaired information to TvTrackInfo
Add TIF API for getting hearing impaired attribute for audio and
subtitle tracks in order for TV App to use it.

Test: build
Bug: 112835103
Change-Id: I4046b5d49fcec2b944972bc532e844f0bdab9476
2020-01-08 17:51:27 +09:00
Treehugger Robot
f04ee52d5a Merge "Add audio description information to TvTrackInfo" 2020-01-08 02:43:24 +00:00
Nick Chalko
f26efab443 Mark DVB methods and classes as System APIs.
Guard with DVB_DEVICE permission.
Add @DvbDeviceType IntDef

Bug: 146385357
Test: m framework
Change-Id: Id6c77049e7338b6503adc12e14264fa4a892a65d
2020-01-02 13:19:43 -08:00
Treehugger Robot
dcb8aa7cba Merge "Refactor AudioPlaybackConfiguration to reduce usages of hidden APIs" 2019-12-23 18:03:35 +00:00
Rahul Sabnis
eeef865a2a Refactor AudioPlaybackConfiguration to reduce usages of hidden APIs
Bug: 141947725
Test: Manual
Change-Id: Ia95776cda3408c321d94494cb25b9cd85cb8662a
2019-12-20 14:48:57 -08:00
Kevin Rocard
3ae06329dc Add OPUS encoding to the framework
Audio offload support was added to AudioTrack in Q,
but only a few encoding were exposed (MP3 & AAC).

This patch adds only Opus support.
For R we probably want to expose all format that the framework supports.

Bug: 146540917
Test: AudioTrackOffloadTest AudioFormatTest
Change-Id: I2ca57d45081668f76f8d9e153f66d1fd41209685
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-12-20 19:30:18 +00:00
Austin Wang
a63a2c0130 Revert "Use new UnsupportedAppUsage annotation."
This reverts commit a5264903e2.

Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=sdk_phone_armv7-sdk&lkgb=6083299&lkbb=6085371&fkbb=6083313, bug b/146533269

Change-Id: Ie5b031d7b277cf0e09b0a9776b26bf74f5f69e70
2019-12-19 06:38:19 +00:00
Artur Satayev
a5264903e2 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv \
      git diff HEAD^ HEAD | grep '^[+-][^+-]' | grep -v '.import'
Change-Id: I087bb1cecbe59f1cf0c2e770c735d7a433722c6f
2019-12-18 12:07:36 +00:00
Jin Seok Park
aa68a4f19e [DO NOT MERGE] Return correct offsets for getAttributeRange()
Cherry-picked from ag/9745767

Currently, the offset value returned from getAttributeRange() does
not take into account the offset to the EXIF data within the image
file. This CL fixes the code to return the correct offsets.

The existing test code could not detect this issue because it does
not explicitly seek to the given offset and retrieve/compare the
data. This CL also adds test code to do this. Make tag information
is also added because all test files have this information, while only
a select few have thumbnail/GPS tag information.

This CL also fixes a bug where the thumbnail offset was not being
updated if the data was passed with StripOffsets tag.

Bug: 143118731, Bug: 143663411
Test: atest ExifInterfaceTest
Change-Id: I94c3438020d1091a8829a96e1b0a5ef4193d9dc9
(cherry picked from commit e6e97865f3)
2019-12-18 06:23:07 +00:00
Jaewan Kim
7e8dffc582 Merge changes from topic "msm_callback"
* changes:
  MediaSessionManager: Split abstract class Callback into interfaces
  MediaSessionManager: Use Executor instead of Handler
  Allow to register multiple callbacks in MediaSessionManager
2019-12-17 02:29:33 +00:00
Treehugger Robot
c5480019ce Merge "Use TelephonyManager API to check if device is voice capable." 2019-12-13 23:26:40 +00:00
Michele
72d27bb104 Use TelephonyManager API to check if device is voice capable.
Bug: 146075164
Test: make
Change-Id: I3f19a65012ea355091bbbf22ee3c11054ed19e37
Merged-In: I3f19a65012ea355091bbbf22ee3c11054ed19e37
2019-12-13 14:46:37 +00:00
Kyeongkab.Nam
f6d1e09fd7 TIF: Add TvInputService#onHdmiDeviceUpdated()
Add API to update device infos to TvInputInfo.

Bug: 145047101
Test: Manual
Change-Id: I67438193cc00d3bf76b8ebaa02869b6ff4e04b77
2019-12-13 02:06:12 +00:00
Jaewan Kim
f5ff735fae MediaSessionManager: Split abstract class Callback into interfaces
This CL splits the MediaSessionManager.Callback (abstract class) with
OnMediaKeyEventDispatchedListener and
OnMediaKeyEventSessionChangedListener (interfaces with default methods).

It's to follow the API guideline and also to help the Bluetooth for
minally registering callbacks. (The Bluetooth currently only overrides
onAddressedPlayerChanged)

Bug: 138648566
Test: Build and run
Change-Id: I8607662b00db7fb32cf3f4ee527c52b9fd8a6d7c
2019-12-12 10:23:14 +09:00
Jaewan Kim
c37f70d6fe MediaSessionManager: Use Executor instead of Handler
Bug: 138648566
Test: Build
Change-Id: I89a612cb1408dfb2cc4f624c7e0f8c8a55e0a732
Merged-In: I89a612cb1408dfb2cc4f624c7e0f8c8a55e0a732
(cherry picked from commit 95c783e2d2)
2019-12-12 10:23:06 +09:00
Sungsoo Lim
5fe3d3ae41 Allow to register multiple callbacks in MediaSessionManager
Bug: 126758528
Test: manually
Change-Id: I613593a88c115a5ac694b8c984f3ae36e9cc1c78
Merged-In: I613593a88c115a5ac694b8c984f3ae36e9cc1c78
(cherry picked from commit 14ddf75c47)
2019-12-12 10:22:55 +09:00
Marco Nelissen
b002876a41 Merge "Fix bad javadoc link" 2019-12-06 22:30:15 +00:00
Marco Nelissen
738d5e11ce Fix bad javadoc link
Method link was referring to itself.

Bug: 144964777
Test: build offline-sdk-docs, open doc in browser
Change-Id: Ib373b16d36ee91ebe10f5c6c2a635c65480a48e0
2019-12-06 10:37:31 -08:00
jiabin
955b2132b1 Refactor audio device type in audio frameworks.
As audio device type can not be used as bit mask any more, refactoring
the code to use a set for a combination of audio device type instead.

Bug: 135621476
Test: atest AudioDeviceBrokerTest
Test: audio smoke test
Change-Id: I2c6fabfafcc6eaf607975076d9ee1a78887a2c85
Merged-In: I2c6fabfafcc6eaf607975076d9ee1a78887a2c85
2019-12-05 15:32:44 -08:00
Eric Laurent
a270b7c0e5 AudioService: communicate audio HAL process pids to native audioserver
Retrieve audio HAL processes pids from service manager and send them
to AudioFlinger native service. This is needed to dump audio HAL process tombstones
and because audioserver process does not have the SELinux permission to
list services.

Bug: 141528385
Test: Force watchdog and verify tombstone creation
Change-Id: I3e35b8040779e041b8d8c2e72d1e650d6f8fe818
Merged-In: I3e35b8040779e041b8d8c2e72d1e650d6f8fe818
2019-12-05 12:51:41 -08:00
Robert Horvath
16a5ce0026 Merge "Rename OWNER to OWNERS for media/tv"
am: a4ff2b159f

Change-Id: I6fb78bc065217e79f3425d999ee75e37fe2edc4c
2019-11-18 01:07:48 -08:00
Robert Horvath
e207293928 Merge "Add OWNERS for media TV"
am: 4776c31c22

Change-Id: I218c902b159ed68aa083130287d41fc7806bae5d
2019-11-18 01:05:37 -08:00
Robert Horvath
a4ff2b159f Merge "Rename OWNER to OWNERS for media/tv" 2019-11-18 08:13:40 +00:00
Robert Horvath
4776c31c22 Merge "Add OWNERS for media TV" 2019-11-18 08:10:47 +00:00
Kyeongkab.Nam
916e2747d0 Add audio description information to TvTrackInfo
Add TIF API for getting audio description attribute for audio tracks
in order for TV App to use it.

Test: build
Bug: 112835103
Change-Id: Ie2e0533718d5a814714a6b7209fb993c1c00794d
2019-11-13 11:59:14 +09:00
Robert Horvath
ff389051bf Rename OWNER to OWNERS for media/tv
OWNERS file was misspelled.

Test: n/a
Change-Id: If71bebd6a0a7c7e7242e485fc27da0fdb70a7e96
2019-11-12 15:47:01 +01:00
shubang
8da39947ad Add OWNERS for media TV
Nick is the TLM of media TV.
Adding OWNERS to avoid bugging people from other media teams

Test: n/a
Change-Id: I2c99a7a1ab78c634fc94dfe96b6617b0bde4efdf
Merged-In: I2c99a7a1ab78c634fc94dfe96b6617b0bde4efdf
2019-11-12 15:45:37 +01:00
Artur Satayev
7a565c45b1 Merge "Add @UnsupportedAppUsage annotations for greylist."
am: 423c3a32d6

Change-Id: I5387b4742fdaf67ad3189356f2361f73969b53a8
2019-11-11 09:13:24 -08:00
Artur Satayev
fc46be7dbd Add @UnsupportedAppUsage annotations for greylist.
go/cleanup-greylist-txt

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

Bug: 137350495
Test: m

Change-Id: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
Merged-In: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
2019-11-08 16:17:13 +00:00
Pawin Vongmasa
23b72c725c Merge "MediaCodec: Release lock before calling onFrameRendered()"
am: c03b91a7ef

Change-Id: I362a0153d83363b0c2b419480dcbe01df6976a90
2019-11-08 06:00:38 -08:00
Pawin Vongmasa
5a07fb4e59 MediaCodec: Release lock before calling onFrameRendered()
Test: atest CtsMediaTestCases -- \
--module-arg CtsMediaTestCases:size:small

Bug: 143672592
Change-Id: I4fb55eb8a90913544a793097c977fee539e09776
2019-11-07 15:54:54 -08:00
Xin Li
6f48900f50 DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master
Bug: 142003500
Change-Id: If5056a73ede668b0048ca107b686413695e5b3b6
2019-10-30 14:33:01 -07:00
Treehugger Robot
c91c7ab339 Merge "Add OWNERS for media/tv files" 2019-10-29 22:31:08 +00:00
Treehugger Robot
0ac7e561e9 Merge "AudioService: handle errors when reconnecting mixes after server crash" 2019-10-23 16:40:09 +00:00
Jean-Michel Trivi
d497edd979 AudioService: handle errors when reconnecting mixes after server crash
Log errors when reconnecting dynamic policy mixes after an audio
server crash.
  Add IntDef for AudioSystem errors, and conversion to String.
  Add support for notifying an AudioPolicy user that it was
unregistered.

Bug: 133279309
Test: connect DAP, kill audio server, verify no errors reported
Change-Id: I1dbfdac1873ed9c44c20ca9d25bbe01ce9904ee5
Merged-In: I1dbfdac1873ed9c44c20ca9d25bbe01ce9904ee5
2019-10-23 08:22:00 -07:00
Marco Nelissen
eab83b8080 Move MidiDeviceInfo to libamidi, its only user
This removes the libmedia dependency from libamidi, and reduces
overall size.

Test: build
Change-Id: I16b62ef8288bc68a46ae9ac6318efb95fa469e4f
Merged-In: I16b62ef8288bc68a46ae9ac6318efb95fa469e4f
2019-10-23 07:58:56 -07:00
Marco Nelissen
f0ef85669c Move JetPlayer implemention and JNI
The JetPlayer implementation in libmedia was only used by the
JetPlayer JNI code in libandroid_runtime. This change moves
both implementation and JNI to libmedia_jni. This reduces
libandroid_runtime's dependency on libmedia, and results in
a net size reduction of the libraries involved.

Test: atest JetPlayerTest
Change-Id: I028c774fdea167924b064855267254c15f22fddb
Merged-In: I028c774fdea167924b064855267254c15f22fddb
2019-10-17 21:33:07 +00:00
Tobias Thierer
8edd837b79 Track MimeMap moving to libcore.content.type.
Another CL in this topic moves libcore.net.MimeMap to package
libcore.content.type. This CL updates associated references.

Bug: 136256059
Bug: 124232146
Test: Treehugger
Test: CtsMimeMapTestCases
Exempt-From-Owner-Approval: move affecting imports only
Change-Id: I30aac8b28a1740180ea01834a2bb66b61cb255d4
2019-10-04 12:52:38 +00:00