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
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
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
The only hidden API usuage, c-tor of TimedText, is temporarily commented
out.
Test: make media2
Bug: 112766913
Change-Id: I6330724e65bb42db678f23134677dfd8675a3970
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
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
This reverts commit 0852ebab41.
Reason for revert: Return and parameter types of added SystemApi are not themselves part of the API.
Bug: 119749862
Change-Id: I9f89abc25d2f3f6cff60c2465fca8e471e7f1f2a
The method checks whether the provided AudioFormat can be played
via currently connected output devices w/o SRC or downmixing
by the framework.
Bug: 120044865
Test: atest CtsMediaTestCases:AudioTrackTest#testIsDirectPlaybackSupported
Change-Id: I63e8334a60d48c17999f500d87360f9c71185dfb