Commit Graph

7260 Commits

Author SHA1 Message Date
Sungsoo Lim
cfd36a5ab5 Handle disconnection of MediaSession2/Controller2
Bug: 122055262
Test: build
Change-Id: I388ab76beb8fc41b47e8f6310cc0bcb79b6acc9f
2018-12-31 17:01:53 +09:00
TreeHugger Robot
4c4d22265d Merge changes I9cab65f9,I1773aa05
* changes:
  Add MediaSession2 builder and update JAVADOCs
  Add init MediaSession2 and MediaController2
2018-12-31 04:08:11 +00:00
TreeHugger Robot
6118bf44cc Merge "Change the value of AudioManager#FLAG_FROM_KEY" 2018-12-31 03:50:26 +00:00
Sungsoo Lim
938e8e91e8 Add MediaSession2 builder and update JAVADOCs
Bug: 122055262
Test: build
Change-Id: I9cab65f9b09cbe5d5570e4de649ffdff09b20b80
2018-12-31 11:46:04 +09:00
Sungsoo Lim
f894f77d49 Add init MediaSession2 and MediaController2
This CL only covers the connection logic between MediaSession2
and MediaController2.

Bug: 122055262
Test: build
Change-Id: I1773aa053ea1fce0cc548f334416e47d373f7f86
2018-12-31 11:45:46 +09:00
Andy Hung
2e961480fe MediaCodecInfo: Fix getSupportedSampleRates for null array
Test: MediaCodecTest#testPCMEncoding
Bug: 122116282
Change-Id: I3d7e16d130a6653e95e285b38678a8b4946319d7
2018-12-28 15:19:20 -08:00
Mathew Inwood
31755f94e1 Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 11:50:04 +00:00
Jaewan Kim
5999fd7ec3 Merge "Media2: Initial commit of Session2Token" 2018-12-28 04:38:40 +00:00
Jaewan Kim
e1af131a37 Media2: Initial commit of Session2Token
Test: Build
Bug: 121233595
Change-Id: Ib568013f3b7a2d358fd38a937faddaa17925923a
2018-12-27 22:56:39 +09:00
Sungsoo Lim
bf37bd47fd Add Session2Command and Session2CommandGroup
Bug: 121230641
Test: build
Change-Id: Id9d79c90e99db7b78467cf3811d6dff667335a2e
2018-12-27 15:08:44 +09:00
Hyundo Moon
ca0080d919 Change the value of AudioManager#FLAG_FROM_KEY
As suggested by API review, this CL changes the value of FLAG_FROM_KEY
from 1 << 12 to 1 << 16. Also expands Javadoc of the flag as suggested.

Bug: 121325822
Test: make update-api -j / make -j
Change-Id: Ie40c609c717c68a97b01d88f68ce8ff465e3a89e
2018-12-27 13:47:52 +09:00
TreeHugger Robot
51cf66745a Merge "MediaRecorder:edit javadoc for vorbis encoder" 2018-12-26 21:48:46 +00:00
Gopalakrishnan Nallasamy
2675ac3c16 MediaRecorder:edit javadoc for vorbis encoder
MediaRecorder.AudioEncoder has unsupported VORBIS audio encoder constant declared. Edited javadoc
comment for the same as optional support.

Bug: 120211083

Test: make offline-sdk-docs
      - edited comment visible in MediaRecorder.AudioEncoder.html#VORBIS

Change-Id: I3294d9a768a8f439579f238ee2f1db93f20bc178
2018-12-26 11:48:41 -08:00
Yiwen Chen
2232e86186 Merge "Make RingtoneManager and Ringtone class support VolumeShaper" 2018-12-22 04:54:10 +00:00
Yiwen Chen
301b5bf50c Make RingtoneManager and Ringtone class support VolumeShaper
Bug: 120789399
Test: When finish the whole change, flash into a dev phone to test first.
Change-Id: I4620fac5f1c34d37b3b33565cebbea2c091a5d08
2018-12-21 16:11:27 -08:00
Wei Jia
2472c30d81 MediaPlayer2: keep EventCallbacks when reset
Test: cts
Bug: 112549021
Change-Id: I1eb4f47bf1c289a35a45e1017a28d7bd4ab8c5e8
2018-12-21 15:34:29 -08:00
TreeHugger Robot
edc0290709 Merge "MediaPlayer2: fix a typo" 2018-12-21 03:48:22 +00:00
Wei Jia
a6f5f7d89b MediaPlayer2: fix a typo
Test: cts
Bug: 112549021
Change-Id: I2b3803045d5e96d3ae186a8ff53dd11ea53bb18f
2018-12-20 15:43:57 -08:00
Eric Laurent
333dfad3bf Add AudioRecordingConfiguration changed callback
Add a callback reporting changes in current audio recording
configuration for AudioRecord and MediaRecorder.
The callback is called when the capture path configuration
changes (pre preprocessing, format, sampling rate...) or capture
is silenced/unsilenced by the system.

Bug: 111438757
Test: CTS tests for AudioRecord and MediaRecorder
Change-Id: Ifd5c5b4f5ee8911822a3f05412c84edf2db7858a
2018-12-20 19:17:29 +00:00
TreeHugger Robot
5f658dfbb3 Merge "MediaPlayer2: allow reusing DataSourceDesc" 2018-12-20 18:13:58 +00:00
Eric Laurent
c7a0cdfe1b AudioRecordingConfiguration: report more info about active use case
Report more information in onRecordingConfigChanged() callback and
AudioRecordingConfiguration:
    - For client:
      - Port ID (package private)
      - Enabled effects
      - Silenced by policy
    - For stream:
      - Active effects
      - Active audio source

Bug: 111438757
Test: CTS tests for AudioRecordingConfiguration
Change-Id: I84952614ee5d9ede23afd5836c68da7a20e79a2e
2018-12-19 17:57:09 -08:00
Wei Jia
c14da1ea14 MediaPlayer2: allow reusing DataSourceDesc
Test: cts
Bug: 112549021
Change-Id: Ib1c8daddcb04be00b75df3e4928904376a5e16bd
2018-12-19 17:50:18 -08:00
Sungsoo Lim
728e13b7b9 Add MediaItem2
Bug: 121216661
Test: build
Change-Id: I7dfd36bbc1feeeb0a80641940579b3d6187bd2f2
2018-12-19 15:03:49 +09:00
Jeff Sharkey
e8b3d96bc6 Merge "Improve thumbnail generation utilities." 2018-12-18 22:04:40 +00:00
Jeff Sharkey
32f6c7c097 Improve thumbnail generation utilities.
The existing APIs were pretty limited by only accepting a "kind"
value, so improve them to accept an arbitrary size, and offer a way
to cancel requests when no longer needed.

The older APIs were a mix of both public and @UnsupportedAppUsage,
so mark them all both public and deprecated so we can clearly steer
developers towards better options.  (The deprecated methods are
implemented using the new APIs internally for sanity.)

Use modern ImageDecode internally, which is more robust than
BitmapFactory.  Add CTS to confirm that we generate thumbnails of
reasonable sizes.

Bug: 119887587
Test: atest android.media.cts.ThumbnailUtilsTest
Change-Id: I4ca35569ad5c661b327a0cb24a48ebc21f6087b7
2018-12-18 10:03:10 -07:00
TreeHugger Robot
77a8a387f0 Merge "MediaPlayer2: add DataSourceDesc for source dependent API's" 2018-12-18 02:02:40 +00:00
Dongwon Kang
f51deea70e Merge "Remove unusued code; MediaPlayerBase and MP.set|getBufferingParams" 2018-12-18 01:24:35 +00:00
Dongwon Kang
5fbf64934f Remove unusued code; MediaPlayerBase and MP.set|getBufferingParams
Test: build
Bug: 112766913
Change-Id: I999a637a1cb47a28a032478f3c56ab0645837f92
2018-12-17 13:34:33 -08:00
Wei Jia
78a88fcba4 MediaPlayer2: add DataSourceDesc for source dependent API's
Test: cts
Bug: 112549021
Change-Id: Iecdb8cecc21abfdb906f30f93f3a5d02c2d8e16a
2018-12-17 10:57:06 -08:00
Jin Seok Park
864323beba Merge "AML: Remove unbundling MediaMetadata in MediaSessionRecord" 2018-12-17 05:04:04 +00:00
Jin Seok Park
a13857321f AML: Remove unbundling MediaMetadata in MediaSessionRecord
In order to record a log when MediaMetadata is unparceled in the
system process, MediaMetadata calls Bundle#setDefusable when it
is initialized. In order to avoid unnecessarily making
Bundle#setDefusable a public API, this CL removes the unparceling
instance in MediaSessionRecord by extracting the necessary
information inside MediaSession and sending them to
MediaSessionRecord separately.

Bug: 119789387
Test: Build
Change-Id: I7d44fd05250a291bd8d64850cc3c6f47236f9f62
2018-12-16 17:49:49 +09:00
Wei Jia
acf2796db9 DataSourceCallback: fix java docs
Test: make offline-sdk-docs
Bug: 112549021
Change-Id: I4c082f3e9547a768f9327cfaf874f3bba0dab8bf
2018-12-14 11:16:30 -08:00
Eric Laurent
7674052684 AudioEffect: make effect descriptor parcelable
Make AudioEffect.Descriptor class parcelable so that a list of
active effects can be included into AudioRecordingConfiguration.

Note: AudioEffect.Descriptor class was made final but it is OK as it
was never consumed by any SDK API.

Bug: 111438757
Test: make
Change-Id: I238b4ea47c613fd2abacc8729d9baf31423283a4
2018-12-13 10:49:51 -08:00
TreeHugger Robot
b3c1557892 Merge "AudioPresentation: add toString method" 2018-12-12 21:44:44 +00:00
Dongwon Kang
24b90d3bab Merge "Add media2 build target to prevent hidden API usage in MediaPlayer2" 2018-12-12 21:20:26 +00:00
TreeHugger Robot
04c132139f Merge "Add AudioPresentation selection support for MediaCodec" 2018-12-12 17:54:40 +00:00
Ray Essick
447bedc7fa Merge "Opus Encoding plumbing" 2018-12-12 17:18:57 +00:00
Adrian Roos
e77ff79fdb Merge "API: Clean up redundant and ineffective usages of SystemApi and TestApi" 2018-12-12 13:43:34 +00:00
TreeHugger Robot
f7e01a4ac4 Merge "Add API for querying haptic playback support." 2018-12-12 02:32:28 +00:00
Dongwon Kang
43c88f346e Add media2 build target to prevent hidden API usage in MediaPlayer2
The only hidden API usuage, c-tor of TimedText, is temporarily commented
out.

Test: make media2
Bug: 112766913
Change-Id: I6330724e65bb42db678f23134677dfd8675a3970
2018-12-11 18:30:27 -08:00
jiabin
66f9e72e27 Add API for querying haptic playback support.
Bug: 111454766
Test: Manually test
Change-Id: Ic6a0aba877a417faf8ff0c9f2e7b0ea99e3d7fbf
2018-12-12 00:07:47 +00:00
ybai
5e05320c72 Add AudioPresentation selection support for MediaCodec
Bug: 119312182
Test: compile
Change-Id: I5cfc577b681ea6dcc1692abf71837fd5f41616ea
2018-12-11 12:46:21 -08:00
Adrian Roos
66f859135b API: Clean up redundant and ineffective usages of SystemApi and TestApi
Everything that is marked SystemApi or TestApi, but not @hide is still
part of the public SDK, it is therefore not sound to have that combination.

In the future, specifing such a combination will be considered an error
to prevent inadvertently exposing SystemApi and TestApi as public API.

Bug: 115333477
Change-Id: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea
Test: METALAVA_PREPEND_ARGS="--error UnhiddenSystemApi" m checkapi
Exempt-From-Owner-Approval: API cleanup
2018-12-11 20:38:02 +01:00
Mikhail Naganov
d42695defd AudioPresentation: add toString method
Found it useful to have this method for debugging.
App developers should be able to use it, too.

Bug: 63901775
Bug: 119312182
Test: atest android.media.cts.MediaExtractorTest#testGetAudioPresentations
Change-Id: I3b984abad979df7730aafd95ee4627b740184552
2018-12-11 10:30:21 -08:00
TreeHugger Robot
3ec349a400 Merge "Add AudioTrack.isDirectPlaybackSupported method" 2018-12-11 13:54:38 +00:00
TreeHugger Robot
45dbe4ed82 Merge "Add eac3-joc MIME type" 2018-12-11 10:29:05 +00:00
Andy Hung
d10a82edfe Merge "AudioFormat: Add getFrameSizeInBytes" 2018-12-10 23:50:58 +00:00
TreeHugger Robot
833960a416 Merge "Add MediaCodec constants for HDR10+" 2018-12-10 20:54:39 +00:00
Orion Hodson
b6a49777b7 Merge "Remove ScopedBytes use" am: 422fa22456 am: 7c58021208
am: 2e09a6b61a

Change-Id: Ieda76179a3e533230d14d19a4fef84e3b8f55394
2018-12-10 02:51:17 -08:00
Orion Hodson
2e09a6b61a Merge "Remove ScopedBytes use" am: 422fa22456
am: 7c58021208

Change-Id: I8c552ea28fa7fb5577a7932c599a0f615df28125
2018-12-09 12:16:36 -08:00