Commit Graph

7952 Commits

Author SHA1 Message Date
shubang
fb5cb3c815 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
2019-08-22 18:54:15 -07:00
Wei Jia
e5a12e0ddb Metadata: recycle Parcel
Test: cts
Bug: 139319531
Change-Id: Ica1a7333fc15869b16b55669c3ba001187670eb7
2019-08-13 16:23:35 -07:00
Kyunglyul Hyun
c7228815bb Merge "Media: Remove @MainThread from MediaRouter2" 2019-08-12 06:10:57 +00:00
TreeHugger Robot
2dacad29c4 Merge "ExifInterface: Add missing ifd format name "IFD"" 2019-08-12 04:05:37 +00:00
Kyunglyul Hyun
d1f0b6e0b3 Media: Remove @MainThread from MediaRouter2
Now it uses mLock to synchronize mCallbackRecords, mControlCategories,
and mClient instead of enforcing main thread.

Also, check concurrency of MediaRouter2 and MediaRouter2Manager.

This CL also removes control category parameter from addCallback(registerCallback)
not to permit two callbacks in an application to have different control categories.

Function names are changed from add/remove callbacks to register/unregister callbacks
to follow the API guideline.

Test: atest mediaroutertest

Change-Id: I40f2bc45f7d108416182b68b4ae23127f8bb2eb4
2019-08-12 12:33:12 +09:00
Kyeongkab.Nam
4e2e511a8b Merge "Fix a lock issue in AudioPortEventHandler" am: 0985eea389 am: 41c9e7092e am: 4b98ce6898 am: bb3c59e776
am: 741db323d9

Change-Id: I81e6ebc76cdc82e0622543bb8972beeae4bf03d1
2019-08-11 19:20:43 -07:00
Kyeongkab.Nam
4b98ce6898 Merge "Fix a lock issue in AudioPortEventHandler" am: 0985eea389
am: 41c9e7092e

Change-Id: I27966dd0d709e66a624ee1fc1b5045132a24385b
2019-08-11 18:49:12 -07:00
Kyeongkab.Nam
41c9e7092e Merge "Fix a lock issue in AudioPortEventHandler"
am: 0985eea389

Change-Id: If2113f4150e35c7aeb1751181dab8aa2ea05dee4
2019-08-11 18:38:44 -07:00
Kyunglyul Hyun
9f3868d3d1 ExifInterface: Add missing ifd format name "IFD"
There has been IFD_FORMAT_IFD = 13 but IFD_FORMAT_NAMES[13]
was not defined, which could throw ArrayIndexOutOfBoundsException.

By providing proper name, we can prevent the exception.

Test: atest exifinterfacetest
Change-Id: Ib11b83a55d54ad2fc6377bb5cc55f6c2fdbe231c
2019-08-12 10:27:18 +09:00
Treehugger Robot
0985eea389 Merge "Fix a lock issue in AudioPortEventHandler" 2019-08-12 01:22:58 +00:00
Kyeongkab.Nam
6dbaaf2d8a Fix a lock issue in AudioPortEventHandler
It used "this" as a lock object to guard mListeners. but "this" is
pointing to mHandler in handler thread.
This causes the IndexOutOfBoundsException.

bug: 138951761
Test: manual
Change-Id: I826c7c68ecff4fc0d39addd3d56bc989e00848bc
2019-08-09 09:30:44 +09:00
Jaewan Kim
95c783e2d2 MediaSessionManager: Use Executor instead of Handler
Bug: 138648566
Test: Build
Change-Id: I89a612cb1408dfb2cc4f624c7e0f8c8a55e0a732
2019-08-05 16:56:49 +09:00
Aurimas Liutikas
74dd35ccb0 Merge "Fix broken Javadoc links in frameworks/base" am: 4a532813df am: fbcbeec03c am: 3bd2895bdd am: c79a232e42
am: f9b868681d

Change-Id: I8fc2530c0f2735d320c1b641642aa3b8dd48b1f7
2019-08-04 02:29:44 -07:00
Aurimas Liutikas
3bd2895bdd Merge "Fix broken Javadoc links in frameworks/base" am: 4a532813df
am: fbcbeec03c

Change-Id: I5caaf35da16d1890bccad4b6296c44f564117d72
2019-08-04 01:25:41 -07:00
Aurimas Liutikas
fbcbeec03c Merge "Fix broken Javadoc links in frameworks/base"
am: 4a532813df

Change-Id: I5a6152fa6baab86dde980af57b84167b154b44c7
2019-08-04 00:49:17 -07:00
Aurimas Liutikas
92ff83bddc Fix broken Javadoc links in frameworks/base
Test: running metalava with syntax check enabled.
Change-Id: I13ec355b591b0ae3cfb5009794b1ed844d27cba8
2019-08-02 15:40:29 -07:00
TreeHugger Robot
096fe3ea33 Merge "Copy flags except MUTE_HAPTIC in setLegacyStreamType." 2019-08-02 17:36:37 +00:00
jiabin
a9b4f094d4 Copy flags except MUTE_HAPTIC in setLegacyStreamType.
FLAG_MUTE_HAPTIC will be set in AudioAttributes.mFlags. But it should
only be controlled by mMuteHapticChannels in AudioAttributes.Builder.
When copying flags in AudioAttributes.Builder, FLAG_MUTE_HAPTIC should
be ignored.

Bug: 138807243
Test: run SoundPoolHapticTest
Change-Id: I21395399746353b947355b89e5dbd379f42f5d20
2019-08-01 15:41:20 -07:00
Mark Goldstein
d5333390d5 Fix minor typo
Bug: 134914150

Test: Docs bash

Exempt-From-Owner-Approval: Docs-only change

Change-Id: I3cf02d169f3fee409cd39b11094ca1cb161d290c
2019-07-22 17:26:16 +00:00
Mark Goldstein
a940560b6e Fix typo: Change setOutFormat to setOutputFormat.
Test: No test needed.

Change-Id: Ib4ca2f770866d3ada481d9aecabd092b03d6e99e

Exempt-From-Owner-Approval: Docs-only change
2019-07-19 17:26:39 +00:00
Kyunglyul Hyun
e23e5ed72b Media : Implement getAvailableRoutes in MediaRouter2Manager
This CL adds capability to media route 2 info, which can be used
to get available routes for each app, which set control categories.

The test for control category is changed to test getAvailableRoutes().

Test: atest mediaroutertest

Change-Id: If93d64f02b4868b5e04b737431291b18a52177de
2019-07-17 17:00:04 +09:00
Eric Laurent
f361061451 audio record: fix getPortId() after release
Some race condition can cause AudioRecordingMonitorImpl to call
getPortId() on the client object after it has been released causing
an exception to be thrown by the JNI.

Test: Use audio Recorder app and check that no exception is thrown
when recording stops

Change-Id: I6cc1aee0a2ccae879e2cb5df7af757f33436d1f3
2019-07-12 17:29:33 -07:00
Kyunglyul Hyun
0987e3d5e4 Merge "Media: Implement Seamless Transfer with a single provider." 2019-07-11 05:38:48 +00:00
Sungsoo Lim
97e2f0897b Merge "Allow to register multiple callbacks in MediaSessionManager" 2019-07-11 04:17:49 +00:00
TreeHugger Robot
dfb94f02fc Merge "Fix ThumbnailUtils thumbnail pts calculation" 2019-07-09 22:53:50 +00:00
Chong Zhang
0da7cdc103 Fix ThumbnailUtils thumbnail pts calculation
bug: 137113185
test: manual test the clip attached in the bug in Download app.
Change-Id: I824cf1a5c5e08b87e7534a4c2287286134838917
2019-07-09 12:20:53 -07:00
Kyunglyul Hyun
a0d47419e3 Media: Implement Seamless Transfer with a single provider.
Seamless transfer for a single provider case and two providers case
should be dealt with in different ways.

For a single provider case, the provider can handle transfer and returns
the result of transfer.

For multiple providers case, the media app handles the transfer.

This CL covers seamless transfer within a single provider.

If a user requests semless transfer in System UI, MR2Manager.selectRoute
should be called and this request is sent to MediaRoute2ProviderService
that can handle seamless transfer internally.

The new test, testSingleProviderSelect() in MediaRouterManagerTest tests the path for
seamless transfer and ensure transfer request is handled by a provider.

From this CL, we use packagename instead of uid to select app for seamless transfer.
This is required to handle unlaunched apps that don't have uid.
It would prevent to use media router 2 in a multi-user case, that will
be supported by another CL.

I also added onUnselectRoute in MediaRoute2ProviderService, which is
essential to notify a provider that a media app stopped casting.

Bug: 136775407
Test: atest mediaroutertest

Change-Id: Ie3d0e988a72eedea6036f465454e661c424a0495
2019-07-09 17:18:52 +09:00
Sungsoo Lim
14ddf75c47 Allow to register multiple callbacks in MediaSessionManager
Bug: 126758528
Test: manually
Change-Id: I613593a88c115a5ac694b8c984f3ae36e9cc1c78
2019-07-09 09:07:15 +09:00
Marco Nelissen
292fdc1c93 Remove libexif usage from libmedia_jni.so
Test: manual, connect with MTP and PTP
Change-Id: I33128db25b8aae60df7854c61fc2a3873a1bced9
(cherry picked from commit f7ec16802c)
(cherry picked from commit efb865ace2)
(cherry picked from commit 5954d210d3)
2019-07-08 05:29:38 +00:00
Jaewan Kim
ae8c789a0d Merge "Media2: Make Javadoc consistent for recommending use of AndroidX" into qt-dev am: d1a84cb578 am: 9917209b15
am: 1bac830d6b

Change-Id: Iea268914656816f899552293b7362a1ee4f89d44
2019-07-03 20:38:31 -07:00
Jaewan Kim
1bac830d6b Merge "Media2: Make Javadoc consistent for recommending use of AndroidX" into qt-dev am: d1a84cb578
am: 9917209b15

Change-Id: I1435d9d111c60cc33198ead82f1ec021198c6cf5
2019-07-03 18:29:10 -07:00
Jaewan Kim
dde5c27a4c Merge "Media2: Make Javadoc consistent for recommending use of AndroidX" into qt-dev
am: d1a84cb578

Change-Id: I4aa3b7fe6e10ae8d80ccbeec26818c157ccc4114
2019-07-03 17:44:55 -07:00
TreeHugger Robot
d1a84cb578 Merge "Media2: Make Javadoc consistent for recommending use of AndroidX" into qt-dev 2019-07-03 21:59:30 +00:00
Marco Nelissen
5954d210d3 Remove libexif usage from libmedia_jni.so
Test: manual, connect with MTP and PTP
Change-Id: I33128db25b8aae60df7854c61fc2a3873a1bced9
(cherry picked from commit f7ec16802c)
(cherry picked from commit efb865ace2)
2019-07-03 18:13:53 +00:00
Marco Nelissen
efb865ace2 Remove libexif usage from libmedia_jni.so
Test: manual, connect with MTP and PTP
Change-Id: I33128db25b8aae60df7854c61fc2a3873a1bced9
(cherry picked from commit f7ec16802c)
2019-07-03 15:48:46 +00:00
Jaewan Kim
db90afdb78 Media2: Make Javadoc consistent for recommending use of AndroidX
Bug: 136602530
Test: Build docs offline and checked manually.
Change-Id: I70df7b05a6749b9ba492ac03cd3b9179a7416b9c
2019-07-03 14:55:55 +09:00
Marco Nelissen
8cef141941 Remove libexif usage from libmedia_jni.so
Test: manual, connect with MTP and PTP
Change-Id: I33128db25b8aae60df7854c61fc2a3873a1bced9
Merged-In: I33128db25b8aae60df7854c61fc2a3873a1bced9
2019-07-02 15:06:06 -07:00
Marco Nelissen
f7ec16802c Remove libexif usage from libmedia_jni.so
Test: manual, connect with MTP and PTP
Change-Id: I33128db25b8aae60df7854c61fc2a3873a1bced9
2019-07-02 15:48:17 +00:00
Mathew Inwood
77f6a6c262 Merge "Restore some greylist entries." into qt-dev am: 4c46902338 am: 07f3dfc625
am: c9cddd528f

Change-Id: Ia5906c5a5953ada2e52ff03d93c0d453eb676194
2019-06-28 23:52:49 -07:00
Mathew Inwood
07f3dfc625 Merge "Restore some greylist entries." into qt-dev
am: 4c46902338

Change-Id: I1e1e60d2d47c24576ff8c9f41c0676e781348dbb
2019-06-28 23:32:29 -07:00
Mathew Inwood
36292fc9e2 Restore some greylist entries.
In Q, these APIs were either:
- removed from the greylist entirely without good reason
- Moved to the restricted greylist without any public alternative
  information added

So they are being moved back to the greylist for Q.

Test: Treehugger
Bug: 136102585
Change-Id: I6518440a7b0de8292ad05b4df9f0f9580d18b2a5
2019-06-28 09:21:36 +00:00
Kyeongkab.Nam
f571b16bea Merge "Fix equals API bug on TvTrackInfo" am: 609ac6fe3a am: c6d3763fd7 am: 01ffb2b2dd
am: c35ff0f362

Change-Id: Idf26ba1eaaa16e41d36f624f44a832b1e5879b2c
2019-06-27 12:14:54 -07:00
Kyeongkab.Nam
01ffb2b2dd Merge "Fix equals API bug on TvTrackInfo" am: 609ac6fe3a
am: c6d3763fd7

Change-Id: I717c3054fce981004ab358b44dcb3bc7b1a1fbb2
2019-06-26 21:18:21 -07:00
Kyeongkab.Nam
37be9f904a Fix equals API bug on TvTrackInfo
Member variable of mVideoActiveFormatDescription is not compared
on equals API. The variable should be compared on the equals API.

Test: build
Change-Id: Ib8fde63afb0504140f34ebd695f4524db9c74748
2019-06-26 11:13:53 +09:00
Kyunglyul Hyun
13bc105b80 MediaRouter: Make MR2M.CB.onRouteSelected to be called
With this, MediaRouter2Manager.Callback.onRouteSelected will be called properly.

This CL also adds provider id to MediaRoute2Info to distinguish routes
with the same id from different providers.

Test: atest mediaroutertest

Change-Id: If353a4decad489576a39b1a93c7d99c7fe238abe
2019-06-25 14:29:02 +09:00
Marco Nelissen
64c4d58295 Merge "MediaMetadataRetriever: improve error reporting" 2019-06-24 19:29:18 +00:00
Marco Nelissen
703e224909 MediaMetadataRetriever: improve error reporting
Add a message to various throws.

Bug: 27150793
Test: build
Change-Id: I5a03096ad1e44ccf57eb13db1c5db8c50407d9fb
2019-06-24 11:03:11 -07:00
Hyundo Moon
6f3e20096f Merge "Merge "Do not allow adding custom Parcelable in Bundles" into qt-dev am: 1348399885 am: d762136f02" into qt-r1-dev-plus-aosp
am: 9741440ab9

Change-Id: Ia5fc024f9f6885dbf5c00e0d8da46cdd1e24980c
2019-06-24 09:22:51 -07:00
Hyundo Moon
0a29885ea8 Merge "Do not allow adding custom Parcelable in Bundles" into qt-dev am: 1348399885
am: d762136f02

Change-Id: I57d4319c30cd92b0df4d72f112b8f36c50eac1fa
2019-06-24 08:50:50 -07:00
Hyundo Moon
b535723ff5 Merge "Do not allow adding custom Parcelable in Bundles" into qt-dev
am: 1348399885

Change-Id: Ibca40676bb609379cda3797b5120be76a62041d3
2019-06-24 08:09:54 -07:00