Commit Graph

8683 Commits

Author SHA1 Message Date
Kyunglyul Hyun
82f3ed2925 Merge "MediaRouter2: Fix javadoc" into rvc-dev 2020-03-09 03:07:38 +00:00
Hyundo Moon
fde3c9ac59 Merge "Put requestId first in notifySessionCreated() arguments" into rvc-dev 2020-03-09 02:02:12 +00:00
Kyunglyul Hyun
c439bfe783 Merge "Remove MediaRoute2Info.getDeviceType" into rvc-dev 2020-03-09 01:54:48 +00:00
Hyundo Moon
f8e49f4bf7 Put requestId first in notifySessionCreated() arguments
For consistency, this CL applies the same changes also to the
internal methods.

Bug: 150922531
Test: CTS and mediaroutertest (Passed except already failing methods)
Change-Id: Iac0ab78464b16212cb3ad46519f5892e8d1b69d9
2020-03-06 23:33:56 +09:00
Kyunglyul Hyun
50919b97c3 Remove MediaRoute2Info.getDeviceType
The hidden method getType() should be used instead.

Bug: 150925607
Test: run cts test

Change-Id: I6b488a27c20aa3bfd10e9edbd6b4efab91bda22d
2020-03-06 20:43:04 +09:00
Kyunglyul Hyun
2dd6d27d4a Merge "Fix RoutingSessionInfo route ID issue" into rvc-dev 2020-03-06 11:27:36 +00:00
TreeHugger Robot
531bb231d8 Merge "Merge notifySessionCreationFailed into notifyRequestFailed" into rvc-dev 2020-03-06 06:52:21 +00:00
Kyunglyul Hyun
73c9b9f0ea MediaRouter2: Fix javadoc
Add a disclamer and cleanups some comments.
Add a link to AndroidX media router.

Bug: 150291987
Test: N/A
Change-Id: I6ba5505b52a256ac4ee30b087524f2a4263e8df7
2020-03-06 14:41:30 +09:00
Kyunglyul Hyun
5219072963 Fix RoutingSessionInfo route ID issue
In the previous CL, we relied on MediaRouterUtils.getOriginalId()
that returns a wrong ID when it has no provider ID but the separator.

Resolve the issue by resetting route ID in Builder class.

Bug: 150666870
Bug: 150751854
Test: cts test realted to MediaRouter2
Change-Id: Ib17cdc8385308ccadad79e117fcfede72b8af6b5
2020-03-06 13:54:45 +09:00
shubang
be1c41196f Filter changes according to API review
Bug: 150244216
Test: mmm;
Change-Id: I52a7df6bbd8a580a4ea6e8bff4f1ee1515acf3f4
2020-03-06 02:57:12 +00:00
TreeHugger Robot
e4146905d4 Merge "Add callback for codec format changed." into rvc-dev 2020-03-06 01:32:27 +00:00
TreeHugger Robot
6a84d7bef4 Merge "Tuner API: remove @FilterConfiguration.PacketType" into rvc-dev 2020-03-06 00:43:05 +00:00
jiabin
a02129ba9b Add callback for codec format changed.
When initializing a AudioTrack, there will be a IAudioTrackCallback
created systematically in JNI. It will be registered as a callback after
native AudioTrack created. Currently, it is used for notifying codec
format changed.

Bug: 150301890
Test: manual
Test: atest AudioMetadataTest
Change-Id: Ib35749ebbbef2b11b90750663d110430f0ce8390
2020-03-05 14:22:38 -08:00
Amy Zhang
2c2b5a7a0c Merge "Add an Executor to the new acquireTvInputHardware API" into rvc-dev 2020-03-05 18:48:00 +00:00
TreeHugger Robot
c6301c0885 Merge "Remove unnecessary logging" into rvc-dev 2020-03-05 18:13:57 +00:00
Hyundo Moon
7c2059c999 Merge notifySessionCreationFailed into notifyRequestFailed
Bug: 150582958
Test: Ran CTS and mediaroutertest
Change-Id: Ica95c7619d85565d49f238b46d3043358c94a37f
2020-03-05 23:10:46 +09:00
Jin Seok Park
dc1fe78978 Merge changes I7c542db9,I6f809ce2 into rvc-dev
* changes:
  [Media ML] Add uid as parameter
  [Media ML] Implement button session management
2020-03-05 09:50:44 +00:00
Kyunglyul Hyun
4e3f08bb16 Merge "MediaRouter2: Fix routes IDs in RoutingSessionInfo" into rvc-dev 2020-03-05 05:15:13 +00:00
TreeHugger Robot
03e1b5a327 Merge "Tuner API: improve the JavaDoc of Dvr" into rvc-dev 2020-03-05 04:47:03 +00:00
shubang
b838fbf8aa Tuner API: remove @FilterConfiguration.PacketType
There are some valid and reserved packet type values, so packet type
should not be enum.

According to specs
ITU-R BT.1869, https://screenshot.googleplex.com/HhktwijUqBF.png
ATSC A/330:2019,https://screenshot.googleplex.com/6ZQdO6HrmAS.png

Bug: 150639580
Test: mmm
Change-Id: Ie879a518635707dc71837fda12d90866faf35dc1
2020-03-04 19:42:24 -08:00
TreeHugger Robot
a7327a5cdc Merge "Tuner API: improve LNB JavaDoc" into rvc-dev 2020-03-05 02:46:52 +00:00
TreeHugger Robot
e5d57d4add Merge "Tuner JNI: Lnb" into rvc-dev 2020-03-05 02:08:08 +00:00
Kyunglyul Hyun
fe58399597 MediaRouter2: Fix routes IDs in RoutingSessionInfo
This CL fixes the issue that RoutingSessionInfo#getSelectedRoutes
return improper route IDs when it is recreated.

To ensure provider ID related feature, another test is added.
Since RoutingSessionInfo#setProviderId is a hidden method, the test
is not added to CTS.

The reason for moving "updating route ID logic" into Builder is from
considering use cases.
The original ID of the route is only checked when the provider ID is
set and a route is added to or removed from a RoutingSessionInfo,
which is very rare case.

This CL also fixes the issue that didn't release the previous routing
session when transfer.

Bug: 150666870
Bug: 150751854

Test: atest mediaroutertest
Change-Id: Ic05c11ebf43562b44214eb661c8b9c106f1c9d3e
2020-03-04 20:49:44 +09:00
Jin Seok Park
b40a716a90 [Media ML] Implement button session management
1. Add config values for setting custom dispatcher and provider
class names as @hide APIs.
2. Make MediaSessionService use the custom dispatcher and
provider classes (if they exist) via reflection.
3. Make SessionPolicyProvider/MediaKeyDispatcher abstract classes
and add a default constructor without parameters to make sure it
can be called via reflection.

TODO: Add API for getting/setting policies via MediaSessionManager
once b/149006225 is fixed.

Bug: 147027868
Test: build and manually test
Change-Id: I6f809ce2201cb8fc25d603654148f211a78ea107
2020-03-04 18:35:52 +09:00
shubang
1c1144e298 Tuner JNI: Lnb
Bug: 139308734
Test: make; acloud;
Change-Id: I728cce2a0b5829c5679d2ca806c7ea5dcc0882ae
2020-03-03 18:00:17 -08:00
Gopalakrishnan Nallasamy
11b93f6f14 Merge "MediaMuxer:Include info to specify last sample duration" into rvc-dev 2020-03-04 01:03:08 +00:00
Amy
7da63b82d6 Add an Executor to the new acquireTvInputHardware API
Test: manual
Bug: 149237987
Change-Id: I9fa83a1f829aaf18ccd08c97142df58d47776d9a
2020-03-03 16:49:03 -08:00
Kyunglyul Hyun
f8ac47cdae Merge "MediaRouter: Cleanup MediaRouter2Manager APIs" into rvc-dev 2020-03-02 08:07:23 +00:00
Jaewan Kim
1c6a0fa499 Merge "Fix MediaSession.Token#equals()" into rvc-dev 2020-03-02 06:28:20 +00:00
Kyunglyul Hyun
a3365d7537 MediaRouter: Cleanup MediaRouter2Manager APIs
As a following CL, RoutingController will be removed.
Instead, MediaRouter2Manager will use RoutingSesionInfo.
This CL adds necessary methods for that.

Added Callback#onTransferred and #onTransferFailed.

Bug: 150571233
Test: atest mediaroutertest
Change-Id: If2c23c483f80b6c93a14d1f1f93dfc40463ede1a
2020-03-02 15:02:09 +09:00
Kyunglyul Hyun
a448f383d0 Merge "Add "name" to RoutingSessionInfo" into rvc-dev 2020-03-02 02:42:28 +00:00
Andrew Lewis
26d2152ca4 Remove unnecessary logging
attemptDataSource expects setting data source to fail in some cases, so
we shouldn't log as it can be spammy.

Fixes: 148125536
Test: build (safe change to remove logging)
Change-Id: I92663e42b593d1ead45da9541810cd0d3843a495
2020-02-29 14:57:34 +00:00
shubang
6661e92374 Tuner API: improve LNB JavaDoc
Bug: 149786702
Test: mmm
Change-Id: I8d5355be252d3ba279dead76fa4ba43a7e27cf50
2020-02-28 17:58:18 -08:00
shubang
24eaf128f2 Tuner API: improve the JavaDoc of Dvr
Bug: 149787581, 149785208
Test: mmm;
Change-Id: I24460f69d190574f242742265a9c8bfea73fdd2a
2020-02-28 17:44:00 -08:00
Gopalakrishnan Nallasamy
b53728a073 MediaMuxer:Include info to specify last sample duration
Added ability to set duration of last sample by writing an empty buffer
with EOS flag marked along with presentation time stamp at the end.
Have updated the same and the default behavior in JavaDoc of MediaMuxer.

Bug: 141573686
Bug: 121052341

Test: Document is updated with new information properly.
Change-Id: If15d555e877f0d17040688858673946cf4fe86af
(cherry picked from commit 19261fac01)
2020-02-29 00:59:34 +00:00
Ytai Ben-tsvi
2cba965676 Merge "Pass models to soundtrigger middleware with shared memory" into rvc-dev 2020-02-28 21:29:53 +00:00
Ytai Ben-Tsvi
d5065ba8a5 Pass models to soundtrigger middleware with shared memory
This both avoids the need to make extra copied for the models and
allows exceeding the parcel size limits.

Bug: 150100907
Test: Manual testing of basic sound trigger functionality
Change-Id: Ic4c5c1a9de3e29b1b6fa82442254e1afe7daec19
2020-02-28 13:01:24 -08:00
TreeHugger Robot
fde0af9177 Merge "Make MediaRouter2 callback classes as abstract" into rvc-dev 2020-02-28 11:38:39 +00:00
Hyundo Moon
899535c9ff Make MediaRouter2 callback classes as abstract
This is per API review.

Bug: 149912538
Test: Ran CTS and atest mediaroutertest
Change-Id: Id52bb7b06da4f414099607b1bde781005e47ded3
2020-02-28 18:27:42 +09:00
TreeHugger Robot
0eba93a5ed Merge "Tuner JNI: demux" into rvc-dev 2020-02-28 01:22:41 +00:00
Nicholas Ambur
626b24958f Merge "remove client token passing active VI service" into rvc-dev 2020-02-27 18:01:24 +00:00
Kyunglyul Hyun
d02172c6e6 Add "name" to RoutingSessionInfo
The name of dynamic group can be set by providers.

Bug: 150249359
Test: cts tests
Change-Id: I1b74fe5b7976eb0ad6a52fd29203446dde480de8
2020-02-27 19:12:10 +09:00
Jaewan Kim
745b35004a Fix MediaSession.Token#equals()
This also fixes the Activity#setMediaController() which previously
ignored because the MediaSessionService failed to find session set to
the foreground activity.

Bug: 149006225
Test: Run MediaActivityTest in CtsMediaTestCases
Change-Id: I8a22665a109ce480ae9604f5c7262bf2b3c2db8c
2020-02-27 07:31:47 +00:00
shubang
bee73460b8 Tuner JNI: demux
Bug: 139308734
Test: make; acloud create;
Change-Id: I4e821ea24eb109cca54087ea6163d42b6e8f5639
(cherry picked from commit 551d3282f7)
2020-02-25 23:02:19 +00:00
shubang
82530bf904 Tuner API: Remove superclass Dvr
Bug: 149785982
Test: make;
Change-Id: I39721db253ec1212c5cd9774c8466afdf47799d2
2020-02-25 14:04:01 -08:00
TreeHugger Robot
c5162ed949 Merge "media: fix MediaCodecTest#testException" into rvc-dev 2020-02-25 18:21:19 +00:00
Amy Zhang
282b5c2043 Merge "Add @NonNull annotation per API Council's suggestion" into rvc-dev 2020-02-25 18:16:49 +00:00
Nicholas Ambur
1ec50c8f2f remove client token passing active VI service
Previous implementation relied on client to pass a token which the
service used to verify if it was the active service. This is seen to be
a security concern as there is no way to verify how the client obtained
the token. Instead, a check is done to confirm the caller's UID matches
the UID of the active service.

In the case of voice model enrollment, KeyphraseEnrollmentInfo class is
leveraged. A client is allowed to enroll if it is the active voice
interaction service or if it is a voice model enrollment application
bundled with the system image.

All previous manifest permision checks still apply.

Bug: 148159858
Test: gts-tradefed run gts-dev -m GtsAssistIntentTestCases -t \
com.google.android.assist.gts.KeyphraseModelManagerTest \
\#testShouldEnrollOnlyWhenActiveService

Merged-In: Ie2c4653d365770a9123a22bc69822518b4ccc568
Change-Id: Ie2c4653d365770a9123a22bc69822518b4ccc568
(cherry picked from commit c6f4118f9e)
2020-02-25 01:20:05 +00:00
Amy
38ff0181c3 Add requestFrontend implementation in TunerResourceManager
Test: atest TunerResourceManagerServiceTest
Bug: 147380513
Change-Id: Icec048913e2cbe141448c0c322d37c233588dfcd
(cherry picked from commit 9d150f58bd)
2020-02-24 14:27:36 -08:00
Amy
9db88a2f0d Add @NonNull annotation per API Council's suggestion
Test: make framework-minus-apex -j8
Bug: 150127251
Change-Id: I667668ec97cc46f2513c63eeadcc56d5a26cb41f
2020-02-24 14:10:40 -08:00