* Added a new class BluetoothCodecConfig that contains codec-related
configuration or capabilities: codec type, priority, sample rate,
bits per sample, channel mode, and codec specific fields.
* Extended the Bluetooth A2DP AIDL interface to get/set the current
codec configuration
* Added new call handleBluetoothA2dpDeviceConfigChange() to the Media
Framework that is called when there are changes in the
Bluetooth A2DP device configuration - e.g., the A2DP codec is changed.
Test: A2DP streaming to headsets, TestPlans/71390
Bug: 30958229
Change-Id: I9a82716cbc2a5efbe77352a031ac80c88f6a2459
Make beginning of player tracking synchronous, init uid/pid/piid
on the server side, and return the piid.
Anonymize configurations in the getter of active configurations
when the client isn't privileged.
Test: run cts -m CtsMediaTestCases -t android.media.cts.AudioPlaybackConfigurationTest
Bug: 30955183
Change-Id: I1610ae0067fd26d297057663352e679c8963a2d7
Prevent NPE when the instance is running without a context.
This enables writing command-line test apps.
Test: vendor/google_toolbox/team/audio/cmds/ClMediaPlayer
Change-Id: Ie74112334675c5d9d3efdb28c7178c49d8729acb
Define USAGE_ASSISTANT for new use cases involving audio help,
query responses and more.
Test: make offline-sdk-docs
Bug: 30947943
Change-Id: Idf93ce4c0f014dbc9b491244cbad9e643cc03413
Define new player types to describe the two types of AudioPlayer
in OpenSL ES: those with a buffer queue source, those that
play from a given URI or FD.
Add a warning in the interface description of AudioService
that changes should be reflected in the native interface too.
Test: make, NDK tests to follow
Bug: 30955183
Change-Id: I7b530ea6e3b13f238f662ce8b9612e7df574a9c5
AudioService keeps track of status of implementations of PlayerBase.
AudioService's PlaybackActivityMonitor maintains a list of
playback configurations for each PlayerBase, and a list
of clients that want to receive updates about the playback.
Playback activity clients can query the playback configuration
of the system through AudioManager, or register a callback
for updates. For clients with MODIFY_AUDIO_ROUTING permission
(system), the playback configurations contain more information
about each player (player type, uid, pid, state), and can see
all players, not just the "active" ones. The act of stripping
off data about the players that is not supposed to be seen
by non-system clients, is referred to as "anonymization". It
is implemented in system server, so no system data is ever
sent to playback activity clients without system permission.
More information about the AudioPlaybackConfiguration is
available in the SystemApi (uid, pid, player type, player state).
Test: run cts -m CtsMediaTestCases -t android.media.cts.AudioPlaybackConfigurationTest
Bug: 30955183
Change-Id: I85997594c0378216419f5f0fdaa0714996fd3573
This is part of weaning apps off accessing system identifiers via
system properties API. Apps should use android.os.Build API instead.
Bug: 33700679
Test: Enable MTP mode then check that mtp-detect output same as before this commit
Change-Id: I4e6696cdee18b9c3e987c432c095911e85a997db
This was caught by clang's static analyzer. Warning:
frameworks/base/media/mca/filterfw/native/core/shader_program.cpp:1031:3:
warning: Potential leak of memory pointed to by 'attrib.owned_data'
return StoreAttribute(attrib);
Bug: None.
Test: The static analyzer no longer complains.
Change-Id: Ibef0368dfa48ba57e38019a5a3e33d5bacd847a2
- For all camera2 paths, and anything shared between the legacy API and
camera2, switch to using String for camera IDs.
- Remove assumption that camera device IDs must be a dense set of small
integers, and rewrite the camera ID query methods
- Change operation of ICameraService.addListener: it now returns the list of
available devices directly, instead of invoking callbacks. This is
needed to ensure an up-to-date list of cameras is immediately available
on connection to the camera service.
- Add new CameraStatus object to use as the addListener return value
- Update tests to work with new interface
Test: cts-tradefed run cts -m Camera --skip-connectivity-check -d -o --abi armeabi-v7a --disable-reboot
Bug: 32991422
Change-Id: I6ff4a5dd014c6aefe0750850eeece6f3267a3e5b
Functionfs requires MtpServer to write descriptors before the device can be
configured. This adds a new configure call that will occur only when
functions are changed (new argument added to updateUsbStateBroadcast for this)
and be called after sys.usb.config is changed but before the waitForState
call to ensure compatibility with configfs devices.
Bug: 30976142
Change-Id: I7e94a5847d3b19c0fd75139e1b15a3f2a1cea01d
Test: Manual
The IFD entry has a 4-byte field COUNT. It is read as int type
and is used as array size by ExifInterface. If a crafted JPEG
file contains a negative value, a NegativeArraySizeException
occurs.
Test: passed ExifInterface CTS
Change-Id: Ief29936400f04636928df09e7f357cbf25345383
Signed-off-by: NIEJuhu <niejuhu@xiaomi.com>
The IFD entry has a 4-byte field COUNT. It is read as int type
and is used as array size by ExifInterface. If a crafted JPEG
file contains a negative value, a NegativeArraySizeException
occurs.
Change-Id: Ief29936400f04636928df09e7f357cbf25345383
Signed-off-by: NIEJuhu <niejuhu@xiaomi.com>
Deprecate methods where stream types are not used for
volume control operations.
Add a warning in the logs about the use of stream
types to encourage migration to audio attributes.
Since STREAM_ACCESSIBILITY is added in O for the
volume of a11y audio, throw an exception when
trying to use it for playback.
Test: make offline-sdk-docs
Bug: 30955183
Change-Id: I7fcf79f1de68f217a9b19561aa1325ade169dfcf
AudioManager:
- add missing references to STREAM_ACCESSIBILITY
- add STREAM_ACCESSIBILITY in getDevicesForStream() method
(this method is only ever called for STREAM_MUSIC)
Test: make offline-sdk-docs
Bug: 30448020
Change-Id: I449082ff01e9822e7e7dca69762c197468237d67
VolumePolicy: define two a11y modes: 1/ legacy where
a11y volume aliases to media volume, 2/ a11y where
the a11y volume is independent from any other stream
type volume.
Refactor accessibility service listening to accomodate
communicating to the volume controller when the
a11y service is running.
Make accessibility stream alias conditional on a11y
service running. Reflect the behavior in the
volume controller.
Test: enable Talkback and verify logs in Vol controller
Bug 30448020
Change-Id: I80535ba259a22b6d93e62a7b3ca462a19d4c84b7
New stream type for accessibility volume.
Add related appOps.
Test: see added CTS tests in AudioManagerTest & Stub
Bug 30448020
Change-Id: I34f96713b22fedf75322b8ffe2b96a7c566f5009