Commit Graph

8228 Commits

Author SHA1 Message Date
Automerger Merge Worker
d56dcd2f71 Merge "Add OPUS encoding to the framework" am: 7252ee13be am: dfe9af14d3 am: 5a1fd6750b
Change-Id: Iad78f4366d0c2311a472aadcf0cf07227d3d71e7
2019-12-23 10:41:28 +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
Kyunglyul Hyun
7ec3d498ae Merge "MediaRouter: Add session-releated APIs to route provider" 2019-12-23 06:30:51 +00:00
Kyunglyul Hyun
24cc66f946 MediaRouter: Add session-releated APIs to route provider
This CL introduces "session" into MediaRouterProviderService.
When a client wants to use a route of a provider, it should
request the provider to create a new session and then,
the client will control the session instead of a route.

Clients can add/remove routes into/from the session
(a.k.a. dynamic grouping) and transfer media to the other
route in a provider with less delay.

RouteSessionInfo holds information about a session and
MediaRoute2ProviderService must set session info and implement
abstract methods.

Bug: 142762829
Test: atest mediaroutertest

Change-Id: Iaf668d9a2c360cd9c7dbc5f1766d14e0d81bb3e3
2019-12-23 10:29:30 +09:00
TreeHugger Robot
d3ab322a12 Merge "Create a utils class and handle filter subtypes" 2019-12-21 02:58:21 +00:00
shubang
1c53a33968 Create a utils class and handle filter subtypes
Also move checkPermission to Utils

Test: make;
Change-Id: I2958ca9fa39c822f50e8b998def4fd3233512673
2019-12-20 16:49:07 -08:00
shubang
e65b686cdf Complete frontend APIs
Test: make;
Change-Id: I576df2ee27809b50c9797a6bc80ebf3dc771a83e
2019-12-20 14:27:37 -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
TreeHugger Robot
b9a35bbaff Merge "MediaRouter2: add MRM.getActiveRoutes" 2019-12-20 10:18:42 +00:00
TreeHugger Robot
9b3d0531a5 Merge "MediaRouter: Renames supportControlCategory as supportControlCategories" 2019-12-20 10:03:53 +00:00
Kyunglyul Hyun
86998f446b MediaRouter2: add MRM.getActiveRoutes
This method will list up routes that are actively used
by some applications.

Once dynamic grouping is implemented, it will return
sessions instead of routes.

Bug: 146604082
Test: atest mediaroutertest

Change-Id: Ic013d3c2ded47b7ebca0b4cf99d2a7ea75045dc1
2019-12-20 17:45:24 +09:00
Kyunglyul Hyun
5c9a55ea9a MediaRouter: Renames supportControlCategory as supportControlCategories
Also adds a supportControlCategory that checks a single category.

Test: atest mediaroutertest
Change-Id: If878aa7df89fb61b38b52abad0adedccacb6df21
2019-12-20 17:29:59 +09:00
TreeHugger Robot
7a8341aadc Merge "MediaMuxer:allow negative presentation timestamps" 2019-12-20 07:29:44 +00:00
TreeHugger Robot
f050259df6 Merge "Unhide Descrambler class" 2019-12-20 04:13:54 +00:00
shubang
0ce6ae1560 Unhide Descrambler class
Test: make;
Bug: 139308734

Change-Id: I78f8fda2f83786cd46a9293949c50fc43f5cafd6
2019-12-19 16:29:56 -08:00
Mikhail Naganov
8dfb438b52 Merge "Add audio stream and usage for virtual assistant" 2019-12-20 00:08:22 +00:00
Shubang Lu
74c4faa398 Merge "Mark frontend APIs @SystemApi" 2019-12-19 23:20:59 +00:00
Kim Baekgyeong
b64fac77b5 Add audio stream and usage for virtual assistant
New stream type: AUDIO_STREAM_ASSISTANT
This is intended to be used by a virtual assistant like
Google Assistant, Bixby, etc.

The audio stream has own volume alias and the volume
does not change by volume changes of other streams.

Bug: 123745215
Test: make
Change-Id: Iad07d9f0b25ea35c6d565be677af7815bf2f6bd7
2019-12-19 21:35:34 +00:00
Automerger Merge Worker
90dc909c3a Merge "Revert "Use new UnsupportedAppUsage annotation."" am: edf7ce4f38 am: 019286764f am: f6253ef435
Change-Id: Id33f64eb9c8aa7d68cc52f7359b4f0a3d2675d8a
2019-12-19 12:13:32 +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
Hyundo Moon
c979fbf68c Merge "Revert "MediaRouter2: Create MediaRouter2A.java for rewriting MediaRouter2"" 2019-12-19 09:14:02 +00:00
Hyundo Moon
fca05e050b Revert "MediaRouter2: Create MediaRouter2A.java for rewriting MediaRouter2"
This reverts commit 3d60c71a2a.

Reason for revert: Decided to work on current MediaRouter2.

Change-Id: Iff87c027ab2ae5b1b331aa743b5d2447a44d7e69
2019-12-19 09:11:41 +00:00
TreeHugger Robot
0463387020 Merge "Use new UnsupportedAppUsage annotation." 2019-12-19 08:02:12 +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
Kyunglyul Hyun
a8b129b470 Merge "MediaRouter: add route session info" 2019-12-19 05:13:32 +00:00
Hyundo Moon
8d3a08c4fd Merge "MediaRouter2: Create MediaRouter2A.java for rewriting MediaRouter2" 2019-12-19 05:09:27 +00:00
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
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
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
53fe96661b 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
2019-12-18 15:42:06 +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
Kyunglyul Hyun
a67b35e16a MediaRouter: add route session info
Once connection is made, route session info will be sent from provider
to clients. So the clients can group routes based on the route sesison
info

Bug: 142762829
Test: atest RouteSessionTest

Change-Id: Ia85a51df1f12362f05477f536f35cc6b398f9c49
2019-12-18 19:38:51 +09:00
Hyundo Moon
3d60c71a2a MediaRouter2: Create MediaRouter2A.java for rewriting MediaRouter2
This CL introduces a draft class MediaRouter2A which will eventually
replace MediaRouter2.

Here are the reasons for introducing this class,
rather than directly editing MediaRouter2:
 - Introducing session/controller concept changes the role of
   MediaRouter2 a lot (e.g. no select/deselect, different callbacks),
   which makes rewriting much better than modifying current
   implementation.
 - Not to break current tests related to MediaRouterManager/Provider
 - Easier readability (no mixed code with previous implementation)

Bug: 146471105
Test: atest mediaroutertest:MediaRouter2ATest
Change-Id: I9dfe34fdb9d4530275b65d2805b6bdd0abcb662d
2019-12-18 17:34:03 +09: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
shubang
497fd60547 Mark frontend APIs @SystemApi
Test: make
Bug: 139308734
Change-Id: I8ae4ba97fd3a0d93fd91ad54a838a17d438d2daf
2019-12-17 18:43:09 +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