Commit Graph

7962 Commits

Author SHA1 Message Date
Jean-Michel Trivi
01a8d9d840 setWiredDeviceConnectionState requires MODIFY_AUDIO_ROUTING
AudioService: make setWiredDeviceConnectionState enforce the
privileged MODIFY_AUDIO_ROUTING permission

Bug: 151240738
Test: verify plug/unplug headset is WAI
Change-Id: Icde5c2fdfa970baf596d00f808dca8300be8743f
2020-03-25 09:16:46 -07:00
Andrei Litvin
6f5847cb3c Set owners for the tv remote service aidl files.
I added one line for each file since it seemed easier to read
than a comma separated list. This seems consistent with
services/core/java/com/android/server/pm/OWNERS

Test: not applicable

Change-Id: I8ccb7e59896bec40d32864c2d3f750e3b1a517b5
2020-03-18 10:34:45 -04:00
Mikhail Naganov
7dcb80ce2f Visualizer: Ensure multi-thread safety
Add @GuardedBy annotations and ensure they are met when
doing an ErrorProne build.

Refactored Java code to simplify handling messages
from the native code by using 'Handler.post' with
Runnable instances.

Bug: 149375271
Bug: 151442554
Test: RUN_ERROR_PRONE=true m framework-minus-apex
      check warnings for Visualizer class
Test: run EffectsTest for Visualizer both in single
      threaded and multi-threaded usage scenarios,
      validate there are no lockups in the app
      and no messages from FORTIFY in the log
Change-Id: I50752fad02f2a23ed8d0368b2550dbf7f879a706
2020-03-17 12:44:12 -07:00
Automerger Merge Worker
0396aae65b Merge "RingtoneManager: Don't crash if the ringtone doesn't have a numerical ID" am: ff78aab391
Change-Id: Ia4af051076066cb3cd66cb5d95162339b989dad4
2020-02-18 22:06:22 +00:00
Andy Hung
ff78aab391 Merge "RingtoneManager: Don't crash if the ringtone doesn't have a numerical ID" 2020-02-18 21:48:53 +00:00
nchalko
e982fa4084 Merge "Add encoding information to TvTrackInfo" am: f3681741e3
Change-Id: Id263372457ab5849cdadd3f6788c64ad462310fe
2020-02-18 21:11:28 +00:00
Kyeongkab.Nam
ada0f3079c Add encoding information to TvTrackInfo
Add TIF API for getting encoding in order for TV App to use it.

Test: build
Bug: 112835103
Change-Id: I975dda20f129cb05d55eb59a1a60bcdb22b2533e
Merged-In: I975dda20f129cb05d55eb59a1a60bcdb22b2533e
2020-02-18 17:45:00 +00:00
Scott Warner
fb3973a917 RingtoneManager: Don't crash if the ringtone doesn't have a numerical ID
When changing the notification sound for some apps with app-provided sounds,
the notification URI doesn't have a numerical ID.
For example, Outlook's email notification URI has the id 'new_email'

Test: m, outlook doesn't crash anymore, test google calendar
Change-Id: Ibf0c6f2f13e1c76ce02784165b97b92e8f7e432c
2020-02-14 14:33:02 +01:00
Treehugger Robot
71ab50ae23 Merge "DO NOT MERGE - Merge QQ1A.200205.002 into master" 2020-02-08 01:29:23 +00:00
Automerger Merge Worker
513b456663 Merge "TvProvider API standardization for ATSC3.0 and DVB" am: 19f99b96eb
Change-Id: Ic859063c1dacbad5152b5210fae0c410219e77bc
2020-02-05 21:23:12 +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
Automerger Merge Worker
33e7011c7f Merge "audiomanager: fix volume group callback" am: bb10358ac2
Change-Id: I1f9329952a84a5fe2463163600793771ffe253c5
2020-01-31 16:05:58 +00: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
Automerger Merge Worker
c7fa9073aa Merge "TIF: Add content ratings" am: 0a69a874a7
Change-Id: I07e3a41bfea72c0b5a9920b8da8e12f578bdbaba
2020-01-24 04:25:54 +00: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
nchalko
5a55714a9e Merge "Update documentation for TV DVB devices."
am: 315e9d65d7

Change-Id: Ibcacfcfedbc0fd27d8156dbb2943441339240884
2020-01-23 10:14:49 -08: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
nchalko
7e6df33644 Merge "Fix equals and hashCode APIs on TvTrackInfo"
am: 2e8d16f714

Change-Id: I3a88659ad590b1e7c62840e6d737befa4a7d4ecd
2020-01-22 15:39:05 -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
Xin Li
e13851556b DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into stage-aosp-master
Bug: 146167222
Change-Id: Ifeb003ec9b3bf824f04d31a117aea65d517241fb
2020-01-15 16:15:41 -08: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
Automerger Merge Worker
859b6345c3 Merge "Use new UnsupportedAppUsage annotation." am: 57a0beab18 am: 2eff83dcb3
Change-Id: I48f93c43b66f4d329ef6068b4f74b4c68809c099
2020-01-10 15:17:50 +00: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
Automerger Merge Worker
de4117c1cd Merge "Add spoken subtitle information to TvTrackInfo" am: e515bb6fb6 am: 2fba623381
Change-Id: I0b198c59944430638650e0a2294a193114d3ded9
2020-01-09 04:52:17 +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
Automerger Merge Worker
b373c7f8d3 Merge "Add hearingImpaired information to TvTrackInfo" am: 53379f83d1 am: 84ffee36cd
Change-Id: I2ac5ec9f0d19774cc9af3ae887c20e139044a10a
2020-01-08 18:44:09 +00: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
Automerger Merge Worker
4dd0da999b Merge "Add audio description information to TvTrackInfo" am: f04ee52d5a am: d0d2f7222f
Change-Id: Id2db7faafbd8a12cd5e46aacbfb32db9ac0d18b5
2020-01-08 03:27:10 +00:00
Treehugger Robot
f04ee52d5a Merge "Add audio description information to TvTrackInfo" 2020-01-08 02:43:24 +00:00
Automerger Merge Worker
9273dd9bc3 Merge "Mark DVB methods and classes as System APIs." am: 046609406d am: acb2a3c481
Change-Id: I47c18f8c7cae7cca62440edcdb05913bc7dc5431
2020-01-06 20:34:54 +00:00
Automerger Merge Worker
1c80c22f40 Merge "Fix MediaCodec FLAC Javadoc" into oc-mr1-dev am: 546c644f27 am: af521c4ced am: 98274d96f5 am: 9868e4c737 am: 03bdd73cca
Change-Id: I1dd0de6e7c63fd6199def4578aef323af9322f90
2020-01-02 22:05:29 +00:00
Automerger Merge Worker
03bdd73cca Merge "Fix MediaCodec FLAC Javadoc" into oc-mr1-dev am: 546c644f27 am: af521c4ced am: 98274d96f5 am: 9868e4c737
Change-Id: I60a049225fd042ee6c559c0a1dcbc99b4b49d92e
2020-01-02 21:50:42 +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
Automerger Merge Worker
98274d96f5 Merge "Fix MediaCodec FLAC Javadoc" into oc-mr1-dev am: 546c644f27 am: af521c4ced
Change-Id: Id28175d26ec9910e184d5520cdf280e3ab831cf4
2020-01-02 21:11:32 +00:00
Automerger Merge Worker
af521c4ced Merge "Fix MediaCodec FLAC Javadoc" into oc-mr1-dev am: 546c644f27
Change-Id: I511da6d59c3b525cb678d6bb08a6cfa8e4e5a94f
2020-01-02 20:47:01 +00:00
Automerger Merge Worker
98b09fda03 Merge "Refactor AudioPlaybackConfiguration to reduce usages of hidden APIs" am: dcb8aa7cba am: 21984f9031
Change-Id: I1e0e5b57ff169354c33ac4c22bc5db83d87f19a3
2019-12-23 18:30:25 +00:00
Treehugger Robot
dcb8aa7cba Merge "Refactor AudioPlaybackConfiguration to reduce usages of hidden APIs" 2019-12-23 18:03:35 +00:00
Automerger Merge Worker
5a1fd6750b Merge "Add OPUS encoding to the framework" am: 7252ee13be am: dfe9af14d3
Change-Id: Id49eb5581d46a855bd89f2c6485f2b5d5962d5e7
2019-12-23 10:24:45 +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
Automerger Merge Worker
f6253ef435 Merge "Revert "Use new UnsupportedAppUsage annotation."" am: edf7ce4f38 am: 019286764f
Change-Id: I48d12a1de59ea56b9423dc4100dfe464f093c083
2019-12-19 11:17:48 +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
Automerger Merge Worker
757ed29038 Merge "AudioService: setMasterMute protected by MODIFY_AUDIO_ROUTING" into qt-qpr1-dev am: a2bfc8ce91
Change-Id: I199f8957c0df1d3efeb85cbe8e561e31045ee409
2019-12-19 00:42:17 +00:00
Jean-Michel Trivi
5e851cf9d8 AudioService: setMasterMute protected by MODIFY_AUDIO_ROUTING
Require MODIFY_AUDIO_ROUTING system permission to exercise
hidden (non-SDK, non-SystemApi) method setMasterMute

Bug: 141622311
Test: see bug for POC app
Change-Id: I4ee93276daa1285c55c4c838e2b43833135d76f6
2019-12-18 13:24:16 -08:00
Automerger Merge Worker
c7f44bacbe Merge "Use new UnsupportedAppUsage annotation." am: 1385dca8f6 am: 068a9faf3d
Change-Id: Ibad1c39310722d99f2de6bb0d9fad64caa5dbba1
2019-12-18 16:21:37 +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