This removes hidden API usages from the fwk to apex, which would be
prohibited.
With this API, the dispatching logic is changed as follows for sending
key events directly to MediaSessionRecord through MediaSessionService.
Before:
PhoneWindow
-> MediaController.dispatch***AsSystemService(key)
-> MediaSessionRecord
After:
PhoneWindow
-> MediaSessionManager.dispatch**AsSystemService(sessionToken, key)
-> MediaSessionService
-> MediaSessionRecord
Bug: 123485698
Test: Build, flash and injected some key events
Change-Id: I3e0bca7565ae2f142c3389322d867700646d5038
Due to the @UnsupportedAppUsage on
MediaMetadata.getKeyFromMetadataEditorKey, we'd better not to move the
class to APEX. This CL moves the MediaMetadata back to framework.
Also, in order to avoid hidden framework API usages in mainline module,
this CL moves the usage of hidden constructor of MediaMetadata.Builder()
from MediaSessionEngine to MediaSession.
Bug: 123488217
Test: make update-api -j; make -j;
vendor/google/tools/flashall;
atest CtsMediaTestCases:android.media.cts.MediaSessionTest;
atest CtsMediaTestCases:android.media.cts.MediaControllerTest;
Change-Id: I21b4f0f59214478071bb0eafa93bb9538e44bf4e
This removes hidden annotation usages from the framework to the apex,
which would be prohibited.
Test: Build
Bug: 123485698
Change-Id: I9f6b17a61c5438e0d538a7a97587c375d8603613
This CL changes the return type of ISessionManager.getSessions()
from List<ControllerLink> to List<MediaSession.Token>.
Bug: 123488663
Test: Ran below tests
atest CtsMediaTestCases:android.media.cts.MediaSessionTest;
atest CtsMediaTestCases:android.media.cts.MediaControllerTest;
atest CtsMediaTestCases:android.media.cts.MediaSessionManagerTest;
Change-Id: Ie4d259dc3691977451c7751ae06816d67079a3f4
In order to support reading HEIF format images in AndroidX
ExifInterface, we need to unhide the Exif-related constants
inside MediaMetadataRetriever.
Bug: 123493429
Test: update-api
Change-Id: I8b9c1709d9fb00f7ad2d7815d4c280678408ea03
To help confirm that we're actually testing developer-visible
behaviors, we need to build against public APIs, since there have
been plenty of examples in this suite of "testing" hidden API
behaviors, which are then misleading to developers.
Bug: 120429729
Test: atest cts/tests/tests/provider/
Exempt-From-Owner-Approval: Trivial API annotations
Change-Id: I07fe33e54f611a6060217f0706fb99b809961f4d
Add API to add support for specifying delay and padding values
for the current compressed stream.
Add API to indicate the end of stream after a write() operation
Bug: 122825812
Test: atest AudioTrackOffloadTest
Change-Id: Ib4dc76938fb5cea77ce67aa12aca7d38f66e756c
Need to actually respect the given usage or the API doesn't
work. Shift the default to be done Java-side where it's clear
if usage was user-provided or not. Remove the incorrect
validations and assertions around usages.
Add missing HardwareBuffer#isSupported to let users
check if a usage & format combination is supported.
Change-Id: I70bfe6e6c41e78425a38af6b17d421f0e80e818b
Fixes: 123423319
Test: HardwareBuffer CTS tests
New AudioDeviceBroker class running in audio service.
Has dedicated message loop for handling audio device
connections and disconnections.
New helper classes for AudioDeviceBroker:
- BtHelper for Bluetooth
- AudioDeviceInventory to manage list of devices
Bug: 112863932
Test: media CTS + audio CTS Verifier
Change-Id: I3e8f662a9d82fa7245695888e14fac7f4fc6e728
- media2-abi-* included in updatable-media.jar
- Moves the media2-abi files into media/apex
- Resolves a hidden api usage
Bug: 123209084
Test: build
Change-Id: I9f9b0b9c288da5c7acbfedcb56867ff405ac0d61
There are several hidden API usages from Media 1.0 APIs.
To move Media 1.0 APIs into mainline module, this CL removes
the unnecesarry usages or makes them as system APIs.
Bug: 119539695
Test: pass MediaSessionTest and MediaControllerTest, and
manually check whether SystemUI can control sessions.
Change-Id: I824113229964ad9b5785ecd488b5851b0dace626
In order to avoid regression, this CL sets a dummy object to
MediaSession.mCallback when a callback is set.
Since the previous versions of MediaSessionCompat checks the nullity
of mCallback by reflection, this needs to be set.
This was slipped in previous merged CL
"3ff5777: Introduce MediaSessionEngine".
Bug: 119749862
Test: make -j;
Change-Id: Iea12a77e7edd51ef3cee7e83c057f39e5528c3b6
This was slipped off in previously merged CL
"3e8c1c9: AML: Apply changes under frameworks/av to frameworks/base".
Bug: 122711373, Bug: 122432476
Test: atest CtsMediaTestCases:android.media.cts.MediaSessionTest;
Change-Id: I865e12f0c2d740afb97f1103f12dff1c22a3eebb
In order to move PlaybackState into mainline module, it shouldn't
have any hidden API usage from framework.
Bug: 119539695
Test: build
Change-Id: If319950330b5731212ba0a7a6010ef0ffa62afe7