Stream types are deprecated to describe an audio playback use case.
But they are used for volume control. This API helps the developer
go from an AudioAttributes instance used for playback, to a
stream type used to describe which volume stream type should be
used when the user presses on the volume keys.
Test: see AudioAttributes cts test
Bug 21267880
Change-Id: I2b9da5b282e8ed2342c61c14a7f59b874d0ce979
Under certain conditions, i.e. USAGE_MEDIA and
CONTENT_TYPE UNKNOWN, MUSIC, MOVIE and large buffers
we route the AudioTrack to deep buffer to save power.
Change-Id: Ibc8a31750999da842e36156f939448989ee50511
Test: Play Movies, CTS
Bug: 30687201
1. Add _MILLIS for time related columns.
2. Remove PREVIEW_ prefix.
(COLUMN_PREVIEW_VIDEO_URI is an exception since the meaning is not
clear without it.)
3. Add _URI for COLUMN_LOGO
Test: cts-tradefed run cts -m CtsTvTestCases
Bug: 34806184
Change-Id: I1c75b0402508911a37491c7712f12574e574fb9b
PlayerProxy: more control options (pan, delayed start),
remove exceptions in method signatures.
Use delayed start on notification playback for better sync
between media apps and notifications
Disabled for now: support for AudioService (through
MediaFocusControl and PlaybackActivityMonitor) to enforce
audio ducking of focus owners losing audio focus with
AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK, and who don't
play audio that has a content labelled as CONTENT_TYPE_SPEECH.
This feature will be enabled when setting a VolumeShaper
on a player works.
Test: play music and play notification
Bug 30258418
Change-Id: I4e4d911645306bbde17f74288f3b61781fe0e3fe
provide SDK/API access to media metrics for user apps. This lets the
apps metrics data for their instances of player and codecs. Others
to come.
Bug: 34715803
Test: booted, invoked new APIs to verify desired results
Change-Id: Iaae6406aadef30adc893952961ac154a7c4c761d
If the media key listener is set, the listener will receive the media key
events before any other sessions, but after the global priority session.
If the event is handled by the listener, other sessions cannot get the event.
Privileged app needs permission android.permission.SET_MEDIA_KEY_LISTENER
to set the listener.
Bug: 30125811
Change-Id: I2b2cf4ac7873b70899194701c6921990dcb9de02
If the volume long-press listener is set, the listener will receive
the volume key long-presses instead of chaging the volume.
Privileged app needs permission
android.permission.SET_VOLUME_KEY_LONG_PRESS_LISTENER to set the listener.
Bug: 30125811
Change-Id: I5e8fafbb950e5e11522da0f14004648d0877bf3e
Disable the SYNC_PARENT_SOUNDS setting if a work profile ringtone is set
Test: cts-tradefed --test com.android.cts.devicepolicy.ManagedProfileTest
Bug: 30658854
Change-Id: I172f5396b47f03ac8afa365db0ec90f3a2dd0e29
Prior to android N, ExifInterface.setAttributes() accepted the
decimal values for SRATIONAL/URATIONAL formats. However in android N,
decimal values for RATIONAL formats are rejected. Since this behavior
breaks the backward compatibility, we should make setAttributes()
accept decimal values as before.
Bug: 34269464
Test: flashed modified build on angler and tested with an app
Change-Id: I9a77ce341c8c8c3ea74c8592b5a821243eb0257d
The player state of PlayerBase was not kept in sync with its
corresponding AudioPlaybackConfiguration. This caused
the configuration to never be removed and gc'd because
the state of PlayerBase when released was always the
unitialized state of 0 == released state.
Test: use a MediaPlayer then call release, verify the player
is not showing in the AudioService dumpsys
Bug: 30258418
Change-Id: I9a6704147949e1e45752e646648c8c882376752f
Only support recording to MP4 file now. When the recorded file is approcaching
file size limit, application will receive
MEDIA_RECORDER_INFO_MAX_FILESIZE_APPROACHING callback from mediarecorder.
Application could use setNextOutputFile to set the next output file before or
after receiving this callback. Upon reaching filesize limit, recorder will swap
the output file internally and notify application with
MEDIA_RECORDER_INFO_NEXT_OUTPUT_FILE_STARTED.
Test: Hack camera app to record more than filesize limit.
Bug: 28150626
Change-Id: I2daf8f798fe3631d6b7ef48ebea3a64ab4566f2d