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
In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.
(cherry picked from 6387604f9e672ece85e07c4bcbd7be396867f06f)
Bug: 30188076
Test: make checkbuild
Merged-In: I13e88297731253420e4e5f5291d503f13a39a156
Change-Id: I58446eb8c45d8ac2bcdbc9fa40d1321e811bdd4b
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
In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.
Bug: 30188076
Test: make checkbuild
Change-Id: I13e88297731253420e4e5f5291d503f13a39a156
PlayerProxy is a wrapper on IPlayer for system components
to control players.
Test: use vendor/google_toolbox/team/audio/cmds/ClPlaybackActivity
Bug 30258418
Change-Id: I6a40290c7f711fc0242597a5c016fc71cb4baa10
An AudioPlaybackConfiguration contains an IPlayer
interface for system control of a player. It is not
exposed to non-system signature components.
AudioService, through PlaybackActivityMonitor, is monitoring
the death of the IPlayer so the matching player can get
unregistered in case it meets its maker.
Test: use vendor/google_toolbox/team/audio/cmds/ClPlaybackActivity
Bug: 30258418
Change-Id: Ibf3bceba91882ff16bffbf1219c55a1f89ccb13f
* changes:
[RingtoneManager] Option for cursor to list parent sounds
[RingtoneManager] API to delete custom ringtones
[RingtoneManager] API to add custom ringtones
Remove code that let these components be replaced by external
processes.
Bug: 33006669
Bug: 34106436
Test: manual. reboot device, play music, change volume,
view notifications
Change-Id: I458f11537ab9db6f23735487513815553004613f
Modify RingtoneManager.getCursor so that the cursor returned also
retrieves the parent profile's ringtones, adding the parent's id to
those ringtones
Test: manual (use ringtone picker in associated CL)
Bug: 30658854
Change-Id: I3b52b0dc41a5a3ff1a71a89fd8a0d33023021aba
Given a Uri, if it is a media file in one of the external ringtone
storages, this API deletes its file and database entry.
Test: manual - associated CL
Bug: 30658854
Change-Id: I987bd18577960f9a2b02ce37a4a2d5d033d7a969
So far, the only way for users to add custom ringtones was to either use
a 3rd party app or copy files to a specific directory in the storage,
and there was no API to make it easier to add custom ringtones.
This CL creates a hidden API in RingtoneManager that allows adding any
audio file as a custom ringtone, by copying that file into the ringtone
storage and asking MediaScanner to scan that file.
This API is not intended to be used by existing apps, but an associated CL
uses it in RingtonePickerActivity
Test: make && vendor/google/tools/flashall, plus manual testing with associated CL
Bug: 30658854
Change-Id: I2b291847c5430e1fc2c3fc6a351b6111a49fcbf3