Commit Graph

7857 Commits

Author SHA1 Message Date
Marco Nelissen
f0ef85669c Move JetPlayer implemention and JNI
The JetPlayer implementation in libmedia was only used by the
JetPlayer JNI code in libandroid_runtime. This change moves
both implementation and JNI to libmedia_jni. This reduces
libandroid_runtime's dependency on libmedia, and results in
a net size reduction of the libraries involved.

Test: atest JetPlayerTest
Change-Id: I028c774fdea167924b064855267254c15f22fddb
Merged-In: I028c774fdea167924b064855267254c15f22fddb
2019-10-17 21:33:07 +00:00
Tobias Thierer
8edd837b79 Track MimeMap moving to libcore.content.type.
Another CL in this topic moves libcore.net.MimeMap to package
libcore.content.type. This CL updates associated references.

Bug: 136256059
Bug: 124232146
Test: Treehugger
Test: CtsMimeMapTestCases
Exempt-From-Owner-Approval: move affecting imports only
Change-Id: I30aac8b28a1740180ea01834a2bb66b61cb255d4
2019-10-04 12:52:38 +00:00
Dmitry Shmidt
3d23393159 AudioService: Add reporting of Mic Mute on start
Bug: 141192769
Test: Manual

Change-Id: I728e5bf9594622b7b80b640abd0f4938972d77ef
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2019-09-27 13:33:08 -07:00
Aurimas Liutikas
00be951a08 Add missing nullability annotations.
To prepare for enabling MissingNullability Metalava check this CL
works on adding missing nullability issues that metalava flags if
we tell it to flag new things since API 29.

This is not a complete CL, mostly addresses public api and
toString/equals for @SystemApi

Exempt-From-Owner-Approval: Large scale nullability clean up
Bug: 124515653
Test: make -j checkapi
Merged-In: I109260842cfc25f06e40694997fcbb4afa02c867
Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
2019-08-30 00:14:44 +00:00
Xin Li
80860803a4 DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5713463) into stage-aosp-master
Bug: 134405016
Change-Id: I303c0268e8e454b0f0f460eb286812a50c9add88
2019-08-14 12:04:06 -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
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
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
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
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
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
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
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
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
Hyundo Moon
1348399885 Merge "Do not allow adding custom Parcelable in Bundles" into qt-dev 2019-06-24 04:26:17 +00:00
Lajos Molnar
ba0ce1d6a9 Merge "media: clarify frame dropping behavior for decoder output" into qt-dev
am: cfb6f93443

Change-Id: I069b15b05fc1032177c4874cd7ff2d2041076e22
2019-06-21 12:50:37 -07:00
Hyundo Moon
6cddbe14e1 Do not allow adding custom Parcelable in Bundles
This CL prevents the API users from passing any Bundles with
custom Parcelable to following APIs:
 - MediaSession2.Builder#setExtras()
 - MediaController2.Builder#setConnectionHints()
 - MediaSession constructor

Bug: 135572812
Test: Passed followings tests
  atest CtsMediaTestCases:android.media.cts.MediaSessionTest;
  atest CtsMediaTestCases:android.media.cts.MediaControllerTest;
  atest CtsMediaTestCases:android.media.cts.MediaBrowserTest;
  atest CtsMediaTestCases:android.media.cts.MediaSessionManagerTest;
  atest CtsMediaTestCases:android.media.cts.MediaSession2Test;
  atest CtsMediaTestCases:android.media.cts.MediaController2Test;
  atest CtsMediaTestCases:android.media.cts.MediaSession2ServiceTest;
Change-Id: I703c9fc0b180fb7bb3bf9bbec677f01a2a128c7a
2019-06-21 15:21:07 +09:00
Lajos Molnar
9a5a383d9e media: clarify frame dropping behavior for decoder output
Bug: 135390389
Change-Id: Ie1b83e2db85703ea6fb03483b0ce08924de93e4f
2019-06-19 23:37:43 +00:00
Eric Laurent
fef36889bb Merge "audioservice: add RTT mode observer" into qt-dev
am: a66bfb90b6

Change-Id: I9b0e2ac080e648bf42ad4f3e1e787daa651a4b91
2019-06-11 18:33:35 -07:00
Eric Laurent
6acdc094d6 audioservice: add RTT mode observer
Add content observer for RTT mode: when RTT is ON during a call,
The assistant is allowed to capture audio similarly to when an
accessibility service is in the foreground.

Bug: 132976361
Test: use voice input during a call with RTT enabled.
Change-Id: Ief04d886370b50ae3dac0a72dbd1a4ea5f2c66a3
2019-06-11 15:01:45 -07:00
Neil Fuller
ca48dd8182 Switch to HexEncoding from ByteStringUtils
Migration in preparation for deletion of ByteStringUtils.

Also contains an import ordering change needed for upload.

Bug: 124232146
Test: build only
Change-Id: I0c71751de9a142a81ce43b4eaea497bf291afcbc
(cherry picked from commit 8fdca745d6)
2019-06-06 14:01:38 +00:00
Mathew Inwood
d255776d9d Merge "Move two audio APIs back the the greylist." into qt-dev
am: 811c8a06e0

Change-Id: I151f641eef449d5476b5792c92eba1352e04c6fb
2019-05-31 15:22:14 -07:00
TreeHugger Robot
811c8a06e0 Merge "Move two audio APIs back the the greylist." into qt-dev 2019-05-31 22:07:49 +00:00
Jesse Evans
f754d1397c Merge "Fix documentation bug with METADATA_KEY_LOCATION" into qt-dev
am: 8b1f5ba17e

Change-Id: Iafbdb290293c6b2fd2b32b196b60f83f5c0f6a2b
2019-05-31 13:58:17 -07:00
Jesse Evans
fabc1ad011 Fix documentation bug with METADATA_KEY_LOCATION
MPEG4Writer::writeGeoDataBox() has always written latitude
before longitude since it was introduced. And the ISO-6709
is also to have +-{latitude}+-{longitude}/ so we should have
the correct information here.

This is likely to be important for Q since lat/long are no
longer accessible via MediaStore.

Bug: 134100244
Test: documentation change only
Change-Id: If157e3b0a639da9e012c0dd23fcfacfa0a59c28e
2019-05-31 18:02:05 +00:00
Jeff Sharkey
1aa2934cf2 Merge "video files with mimetype video/x-ms-asf can't scan to Gallery" into qt-dev
am: 6f574c4d3a

Change-Id: I50973ff724c5a3dbb65744be81c786de8956615d
2019-05-30 17:31:05 -07:00
Jeff Sharkey
6f574c4d3a Merge "video files with mimetype “video/x-ms-asf” can't scan to Gallery" into qt-dev 2019-05-31 00:10:04 +00:00
Vineet Jhunjhunwala
5a7b1183a3 video files with mimetype “video/x-ms-asf” can't scan to Gallery
video files with mimetype  “video/x-ms-asf”  are considered as PlayList
file type due to below check in MediaFile.Java
Do not consider it as playlist file and remove case of “video/x-ms-asf”

Bug: 133940458
Test: The video is show in gallery
Change-Id: I6af45b597d9b8d9b277e1ae89f2afe019ee2eead
2019-05-30 15:54:37 -06:00
Jean-Michel Trivi
3222703156 Merge "AudioService: remove dead BT code" into qt-dev
am: 3de2438d5c

Change-Id: I99388c3ec13278731b2e403aa308c2eb8131da21
2019-05-30 11:59:24 -07:00
TreeHugger Robot
3de2438d5c Merge "AudioService: remove dead BT code" into qt-dev 2019-05-30 18:36:34 +00:00
Mathew Inwood
5e757204d3 Move two audio APIs back the the greylist.
These APIs are used by older versions of the unity game engine, and many
of these games are not in a position where they are able to update
unity. To keep these games working now and in the future, leave these
APIs on the derestricted greylist.

Bug: 134049522
Test: m
Change-Id: I541ed6fbacfc1e405a319af5c2ff785625afb26a
2019-05-30 15:26:56 +01:00
Jin Seok Park
49d3fb772a Merge "Catch OutOfMemoryError and log warning" into qt-dev
am: f66a0737ca

Change-Id: I73ffd7764f57470afcaac23ab5546d6ea786c387
2019-05-30 02:55:06 -07:00
Jin Seok Park
f66a0737ca Merge "Catch OutOfMemoryError and log warning" into qt-dev 2019-05-30 09:40:57 +00:00
Jin Seok Park
6e3113302f Catch OutOfMemoryError and log warning
Bug: 133827762
Test: atest CtsMediaTestCases:android.media.cts.ExifInterfaceTest
Change-Id: I5c6e247136e033968f418a50276971a8a686e021
2019-05-30 14:26:11 +09:00
Tobias Thierer
eed3cc94d7 Merge "Fix MediaHTTPConnection.disconnect() blocking for a long time." into qt-dev
am: 0c1f41d303

Change-Id: I7a779fde87442bce23b1c6edc344197be2111f4f
2019-05-29 16:01:49 -07:00
TreeHugger Robot
0c1f41d303 Merge "Fix MediaHTTPConnection.disconnect() blocking for a long time." into qt-dev 2019-05-29 22:51:36 +00:00
Beverly
e0d4554fa0 Merge "Change suppresible type of voice comm signalling" into qt-dev
am: c9dcf2ff78

Change-Id: If272dbfe8acec4020c78b834d786890af2261c9f
2019-05-29 09:53:34 -07:00
Beverly
1feff71387 Change suppresible type of voice comm signalling
USAGE_VOICE_COMMUNICATION_SIGNALLING shouldn't be considered
SUPPRESSIBLE_SYSTEM. It includes the ring tone sound when in a call.
Instead, it should not be suppressible like USAGE_VOICE_COMMUNICATION.

Test: manual
Fixes: 131756661
Change-Id: Ide8aafafe58c421f3b699e6de9358b4e73ad01c5
2019-05-29 13:36:12 +00:00
Tobias Thierer
7dc093c08b Fix MediaHTTPConnection.disconnect() blocking for a long time.
MediaHTTPConnection.seek() was creating new connections in a while
loop without checking whether another thread was busy concurrently
disconnecting.

When a new connection was created between the time the disconnect()ing
thread had disconnected the old one and acquired the synchronized
block, the new connection wouldn't be disconnected and therefore
seek() would not encounter an IOException; therefore, seek() would
not return quickly, leaving the disconnecting thread waiting to
acquire the synchronized block for a long time.

This CL fixes this by making seek() throw IOException quickly if
it discovers that another thread is trying to disconnect. This
is checked shortly before and after the new connection is created,
to avoid a race based on the order between the new connection
being created and the disconnecting thread reading the old
connection value. Note that this still doesn't stop a new
connection being created shortly after the previous one was torn
down - it only stops the disconnecting thread waiting for a long
time to acquire the synchronized lock.

Fixes: 131894499
Test: The following command hang 3/3 times before this CL, but
      succeeded 3/3 times afterwards:
      atest android.media.cts.NativeDecoderTest#testAMediaDataSourceClose

Change-Id: I3862a4367d0e46c64c0cbf7bcaa369aca5692871
2019-05-29 01:17:43 +01:00
Eric Laurent
3de238984e Merge "AudioTrack: implement gapless transition for offload mode" into qt-dev
am: 1c66d4c716

Change-Id: I21427829d6fe6acff15c899e8d2e84b898b0d7a3
2019-05-28 12:21:11 -07:00
TreeHugger Robot
1c66d4c716 Merge "AudioTrack: implement gapless transition for offload mode" into qt-dev 2019-05-28 19:11:28 +00:00
Eric Laurent
bb23d7c8b5 AudioTrack: implement gapless transition for offload mode
Bug: 119775911
Test: test track transition with offload playback cmd line app
Change-Id: Ib105f65eb62845feceff45fbda9bec165e219841
2019-05-28 08:33:18 -07:00
Jean-Michel Trivi
58dfb9816a AudioService: remove dead BT code
Remove dead BT code that supported the implementation of
AudioManager.handleBluetoothA2dpActiveDeviceChange() but
was made obsolete with d7c9598 ("Restructure A2DP active device
change").

Bug: 132416679
Test: m -j (no functional changes)

Change-Id: Iedca8a5225548f205920ef50bb3ad8865eb99d1d
2019-05-24 10:59:52 -07:00