Commit Graph

8195 Commits

Author SHA1 Message Date
TreeHugger Robot
92f2b0da89 Merge "Make MediaController.getTag public" 2019-12-19 03:01:05 +00:00
Sungsoo Lim
46effee5ee Make MediaController.getTag public
Bug: 146527402
Test: build
Change-Id: Iff105885aec205422d34f19fcf51340c6b6cdc71
2019-12-19 03:00:37 +00:00
Automerger Merge Worker
277353090c Merge "Use new UnsupportedAppUsage annotation." am: 1385dca8f6 am: 068a9faf3d am: c7f44bacbe
Change-Id: I30839db2fe99ba4670ec1b39d5e64540fdd15f69
2019-12-18 16:31:41 +00: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
Kyunglyul Hyun
c0a7060d76 Merge "MediaRouter: make setControlCategories synchronous" 2019-12-18 10:45:11 +00:00
Hyundo Moon
0d648ab28e Merge "MediaRouter2: Add RouteSessionController" 2019-12-18 05:31:53 +00:00
Andy Hung
6f7b073a51 Merge "MediaMetrics: Add MediaMetrics Java interface" 2019-12-18 05:02:54 +00:00
Hyundo Moon
cc26ad6675 MediaRouter2: Add RouteSessionController
RouteSessionController controls the session in media route providers.
Adding, removing, transferring routes can be done by using this class.

Bug: 146400872
Test: Builds successfully
Change-Id: I42cd862463b205b77f2e508ee3a49cc81b4c6ddd
2019-12-18 12:49:58 +09:00
Jeff Sharkey
04b4ba1e15 Shuffling to prepare for MediaProvider APEX.
An upcoming change will move MediaStore to be within the recently
created MediaProvider APEX.  This means that MediaStore will need to
be fully built against @SystemApi, and so this CL adjusts APIs to
support a clean transition:

-- Listing of "recent" storage volumes and scan paths for "internal"
storage is now handled by StorageManager directly, so that partners
retain control over what is deemed recent.
-- StorageVolume now returns the MediaStore volume name and the
filesystem directory where its contents are presented to apps.
-- Conversion of legacy thumbnail "kind" values to dimensions now
happens directly inside MediaStore.
-- PendingParams and PendingSession are completely removed.
-- Contributed media APIs are completely removed.
-- Media for demo users is now surfaced as a unique StorageVolume.
-- Migrate most MediaStore APIs to accept ContentResolver, which
supports easy usage of ContentResolver.wrap().

Bug: 144247087, 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Exempt-From-Owner-Approval: in-place refactoring
Change-Id: I445528b2779bb37b9f2558e67a3cfc9f60412092
2019-12-18 01:35:46 +00:00
Andy Hung
f2310c7065 MediaMetrics: Add MediaMetrics Java interface
Test: Verify media.metrics dumpsys, atest MediaMetricsTest
Bug: 138583596
Change-Id: Ic0e86fcbb4768f9d21a32dae7e69e071a67d965d
2019-12-17 16:38:51 -08:00
Ytai Ben-tsvi
0d52f4202c Merge changes from topic "soundtrigger_refactor"
* changes:
  Migrate SoundTrigger implementation to new service
  Implement the soundtrigger_middlewware service
  Add a permission for preempting sound trigger sessions
  Sound trigger middleware service definition
  Add audio.common types AIDL definition
2019-12-17 22:33:55 +00:00
Jeff Sharkey
fc9836e503 Merge "Disable support for object references." 2019-12-17 18:55:00 +00:00
Jaewan Kim
c7e715266f 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
(cherry picked from commit f5ff735fae)
2019-12-17 23:50:39 +09:00
Automerger Merge Worker
1625c4d817 Merge changes from topic "msm_callback" am: 7e8dffc582 am: 4dc8b3207b
Change-Id: I387c36213524e474cf1617be02816b5acbde748a
2019-12-17 03:19:58 +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
Jean-Michel Trivi
840f2f4fa5 Merge "AudioService: manage single audio device type in APM" 2019-12-16 23:48:05 +00:00
Ytai Ben-Tsvi
93c117c86f Implement the soundtrigger_middlewware service
This service is intended to replace:
frameworks/av/include/soundtrigger/ISoundTriggerHwService.h

This change only adds the replacement service, follow up
changes migrate the clients to use the new service and remove
the old one. The new service is feature-equivalent to the new
one, but offers the following advantages:
- AIDL interface (as opposed to hand-written parceling code).
- Pure Java implementation all the way to the HAL.
- Better documentation.
- Rigorous error handling.
- Unit tests.
- Reduced code complexity (less layers, better separation of
  concerns).
- Permission-based security model (as opposed to some baked-in
  assumptions about process affinity).

Change-Id: I79f4eff105d3e6245990be068b933d4d48c35a0d
Bug: 142070343
2019-12-16 14:15:37 -08:00
Jeff Sharkey
8f5cdbb49b Disable support for object references.
MediaProvider has standardized on being an indexed view of files that
we discover on disk, so that we can always recover that indexed
information in case of user data wipe or corruption.  This means
that MediaProvider no longer supports abstract "object references".

This doesn't prevent future MTP implementations from bringing back
object reference support, and the recommended path forward would
be to have MtpDatabase convert object references into playlist files
that are written to disk.  MediaProvider will then gladly scan those
playlist files to be visible to users.

Shift to directly using the existing Files.getContentUri() API for
all MediaProvider interactions.

Bug: 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I829027bb9fbcf5991c1ddee0aec04ad7e7b240cd
2019-12-16 14:10:56 -07:00
Jean-Michel Trivi
788417d14a AudioService: manage single audio device type in APM
The AudioPolicyManager currently only handles one device per
audio device type. Thus sending a  disconnection event for an
unused second A2DP device to the APM when one was already
connected, would cause A2DP to be unavailable completely for
audio routing. This happened in the case of fast connection /
disconnection of different A2DP devices.
  The fix consists in keeping track in AudioDeviceInventory
of which audio device is seen by the APM, and only connect
one at a time, and never disconnect an unused device.
  Also remove mention of "BT dock" since identification of
BT devices as docks is obsolete.

Bug: 145627818
Test: atest AudioDeviceBrokerTest

Change-Id: I18d5094bb388d4b0f614b611cbc086019742f229
2019-12-16 12:50:25 -08:00
Kyunglyul Hyun
484074aedb MediaRouter: make setControlCategories synchronous
MR2.getRoutes() right after MR2.setControlCategories() will return
routes filtered with new control categories.

In order to call backs properly, mHandledControlCategories is added,
which is changed only in handler.

getRoutes() is also changed such that routes are evaluated lazily
to avoid unnecessary evaluation.

CallbackRecords are implemented in a way that doesn't acquire explicit
lock.

Callbacks are modified so that newly register callbacks no longer
get notified existing routes.

Also, fixed test according to changes of MR2 and MRM.

Bug: 145488462
Test: atest mediaroutertest (5 times)
Change-Id: I9ba3d74bcf423d801249420d947f41eccb37d67a
2019-12-16 15:50:38 +09:00
Automerger Merge Worker
b083edb7ad Merge "Use TelephonyManager API to check if device is voice capable." am: c5480019ce am: 8bdcb6c2ce
Change-Id: I4aeee332f002f7777a94c50b85b4601bfec55108
2019-12-13 23:52:55 +00:00
Treehugger Robot
c5480019ce Merge "Use TelephonyManager API to check if device is voice capable." 2019-12-13 23:26:40 +00:00
TreeHugger Robot
3082d6f971 Merge "Use TelephonyManager API to check if device is voice capable." 2019-12-13 21:26:25 +00:00
Ytai Ben-Tsvi
ab58ef6483 Sound trigger middleware service definition
These are the AIDL files that define the sound trigger middleware
interface.
This service is intended to replace the existing
frameworks/av/include/soundtrigger/ISoundTriggerHwService.h
using AIDL in order to avoid a large amount of hand-written
parceling code and other forms of boilerplate, and provide
cross-language support.

Change-Id: Ia783ba4f1ea7335a984396e7024cac0411699403
Bug: 142070343
2019-12-13 10:32:44 -08: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
Automerger Merge Worker
c343a5e019 Merge "TIF: Add TvInputService#onHdmiDeviceUpdated()" am: efacbc6cc8 am: c08c2563cf am: c93513a768
Change-Id: Ibf313f658b0335b281dca4ec1cc5dc85322c3582
2019-12-13 10:39:42 +00:00
Automerger Merge Worker
c93513a768 Merge "TIF: Add TvInputService#onHdmiDeviceUpdated()" am: efacbc6cc8 am: c08c2563cf
Change-Id: I9a223167038bb241aeaf0912d31f869c1cc4977b
2019-12-13 10:16:54 +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
Ytai Ben-Tsvi
d58b04ae47 Add audio.common types AIDL definition
This is a subset of the types defined in
hardware/interfaces/audio/common/2.0/types.hal.
Specifically, the subset that sound trigger depends on.
These files were auto-generated using the hidl2aidl tool, and
later manually edited to workaround some missing features in
the conversion tool or AIDL (mostly around enum support).

Change-Id: I1c0ffe8a2ebaf09eb4516beaaf4b6fc80985bfc9
Bug: 142070343
2019-12-12 15:10:35 -08:00
Nicholas Ambur
e0b8b8cd03 Merge "add SoundTrigger HAL 2.3 per model parameter apis" 2019-12-12 21:37:01 +00:00
Eric Laurent
b2b30e8639 Merge "audio: add call assistant usage" 2019-12-12 18:10:43 +00:00
Santiago Seifert
7d47a49673 Merge "Add pixel aspect ratio information to MediaFormat" 2019-12-12 12:33:51 +00:00
Michele
5dbecd9db3 Use TelephonyManager API to check if device is voice capable.
Bug: 146075164
Test: make
Change-Id: I3f19a65012ea355091bbbf22ee3c11054ed19e37
2019-12-12 00:10:19 -08:00
Nicholas Ambur
a0be6be387 add SoundTrigger HAL 2.3 per model parameter apis
add support for model parameter control APIs with THRESHOLD_FACTOR
as the first supported parameter

Bug: 141929369
Test: Tested manually with test app and confirmed with GTS test
gts-tradefed run gts-dev -m GtsAssistIntentTestCases
Change-Id: I06874fcf2ae2ef8796e7c52c4475252e8a026e2c
2019-12-11 19:16:48 -08: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
Eric Laurent
0eb901b79b audio: add call assistant usage
Add audio usage for call assistant use cases.
Used by apps playing over call uplink path for call
screening or other in call assitant features.
This usage is reserved for system apps with privileged permission
android.Manifest.permission.MODIFY_PHONE_STATE.

Bug: 135213843
Test: make
Change-Id: I7a2278f36f44a474a47dd85d276340da4df460f3
2019-12-11 21:38:52 +00:00
Santiago Seifert
c294a4720c Add pixel aspect ratio information to MediaFormat
Bug: 132153067
Bug: 134057371
Test: Not applicable.
Change-Id: I6369640e2b49350ef368c25820197281f3c30ae5
2019-12-11 11:27:46 +00:00
shubang
030afb56c8 Add DvrSettings
Test: make; cuttlefish;
Change-Id: Ia7e3199a4aa794dc41bf5d10f09fbf82b41b512f
2019-12-10 16:29:45 -08:00
Jean-Michel Trivi
21cd5413e0 Audio routing by strategy SystemApi
Routing is done per AudioProductStrategy. For instance routing
media is done by using the AudioProductStrategy that supports
the AudioAttributes with USAGE_MEDIA.
  Routing is for a connected device, AudioDeviceInfo, or for on a
device that is not currently connected, uniquely specified by
its role, type and address.
  Preferred routing can be set, removed, queried (get).
  When audioserver crashes, AudioService restores the preferred
routing operating on the audio policy engine.

Bug: 144440677
Test: atest AudioServiceHostTest#PreferredDeviceRoutingTest

Change-Id: I0647608088fe2906e78b71341615975a56747c2f
2019-12-10 09:23:24 -08:00
Santiago Seifert
3e59f30c2d Merge "MediaFormat: Add ENCODER_DELAY and ENCODER_PADDING" 2019-12-10 13:24:26 +00:00
Santiago Seifert
8095a83b37 MediaFormat: Add ENCODER_DELAY and ENCODER_PADDING
Note that these two already exist in NdkMediaFormat.

Bug: 132153067
Bug: 134057371
Test: Not applicable.
Change-Id: I602bd16e3cda302e538097a9a2ba3487f34fa0f9
2019-12-10 11:32:46 +00:00
TreeHugger Robot
46fcbd69e6 Merge changes from topic "tuner_api_filter_read"
* changes:
  Add read methods for filter
  Add a cpp filter wraper
  Filter settings and configure()
2019-12-09 21:39:29 +00:00
shubang
964e6137e0 Add read methods for filter
Test: make; cuttlefish;

Change-Id: Id04843051e2060eb6612643dff8f889f1266c1f2
2019-12-09 10:57:46 -08:00
Marco Nelissen
30fa0b895a Merge "Fix bad javadoc link" am: b002876a41 am: b6aaed3796
am: 1f20c66f56

Change-Id: Ia552668066598993fd00749f83c9a2880785f26c
2019-12-06 14:47:32 -08:00
Marco Nelissen
1f20c66f56 Merge "Fix bad javadoc link" am: b002876a41
am: b6aaed3796

Change-Id: Ic8767b6afc40789a6b6c11c20edc61ede8da3c87
2019-12-06 14:42:45 -08:00
shubang
75c870854c Filter settings and configure()
Test: make; acloud;
Change-Id: Idf5774b1b7d6fbd2e512c55abf5618ce26cc7965
2019-12-06 14:40:20 -08:00
Marco Nelissen
b002876a41 Merge "Fix bad javadoc link" 2019-12-06 22:30:15 +00:00