Java subtype and HAL subtype don't match, which lead to a bug in
configure();
Other minor fixes.
Bug: 157278203
Test: make; cts;
Change-Id: I791d3a06c68499cf359fd718d2ca24a20ac35796
The original code for translating volume key presses into CEC
commands was sending the equivalent of a key up / key down for
each call to adjustSuggestedStreamVolume. This behavior caused
CEC commands to pile up in HdmiControlService, and a repeated
key press (user keeping finger on volume button on remote) would
cause volume to still change on the CEC device handling volume
even after the key was released.
The fix consists in changing how PhoneWindowManager communicates
with AudioService, by passing the key event directly, so AudioService
can communicate the key up / key down information to the CEC
library, which already deals with repeated commands on the CEC bus.
Bug: 137311120
Test: connect DUT to CEC TV or receiver capable of handling vol cmds,
keep pressing on vol key, verify releasing key stops volume
changes on TV/receiver.
Change-Id: I7a75af651b6b424129515a8991b5afb15c62dba3
Merged-In: I7a75af651b6b424129515a8991b5afb15c62dba3
(cherry picked from commit 12ba113894ec8ad7c24913a0a09ea70047d25353)
(cherry picked from commit 7e58c9145d71ba92053ad6629f910456566cfea9)
Define an attenuation threshold under which the
MODIFY_AUDIO_SETTINGS permission is required to adjust volume.
Verify permission at the interface of audio service, and
propagate this information so its used when getting a valid
index during a volume adjustment or set.
Make the audio service dump display the min index when it
differs from the normal min index.
Enforcement is only for STREAM_ALARM.
Bug: 137015603
Test: use POC app in bug, verify ALARM volume not at 1 with \
adb shell dumpsys audio
Change-Id: I7ccb50e314bb0e27ba25346eab9cdd3e4dd1dceb
This reverts commit a8f97ffdaa.
Reason for revert: break git_master of errorprone target
out/soong/.intermediates/frameworks/base/services/core/services.core.unboosted/android_common/errorprone/srcjars/frameworks/base/services/core/java/com/android/server/audio/AudioService.java:4710: error: [EqualsNaN] == NaN always returns false; use the isNaN methods instead
MIN_STREAM_VOLUME[AudioSystem.STREAM_ALARM], deviceForAlarm) == Float.NaN) {
^
(see https://errorprone.info/bugpattern/EqualsNaN)
Did you mean 'if (Float.isNaN(AudioSystem.getStreamVolumeDB(AudioSystem.STREAM_ALARM,'?
Bug: 157108450
Change-Id: Icf74dcbefccee6138473101e8dc23fba35faf5ce
Define an attenuation threshold under which the
MODIFY_AUDIO_SETTINGS permission is required to adjust volume.
Verify permission at the interface of audio service, and
propagate this information so its used when getting a valid
index during a volume adjustment or set.
Make the audio service dump display the min index when it
differs from the normal min index.
Enforcement is only for STREAM_ALARM.
Bug: 137015603
Test: use POC app in bug, verify ALARM volume not at 1 with \
adb shell dumpsys audio
Change-Id: I083a26fd8eeebd4e5434ed02a4a803cbb920ab84
MediaMuxer.java: move to stop state even if nativeStop() throws
exception.
android_media_MediaMuxer.java: revert recent change, throw
only runtime exception for any error as it used to be. Log error now.
Bug: 156649746
Test: atest android.media.cts.MediaMuxerTest
atest android.media.cts.MediaRecorderTest
atest android.mediav2.cts.MuxerTest
Change-Id: I82e16fcb065a40f25036bbad181798f1fd36132b
Add a list of clients for speakerphone mode requests similar
to Bluetooth SCO clients. This allows to keep track of requests
by different apps in case of overlap or concurrency and to apply
the most relevant mode according to current audio mode owner.
Also:
- Restore requested speakerphone mode when SCO audio is disconnected
instead of returning to earpiece.
- Remove special check on permission while in call in
AudioService.setSpeakerphoneOn because the priority is now
managed by AudioDeviceBroker based on audio mode owner (the owner
for MODE_IN_CALL must have the modify phone state permission).
- Fix condition in AudioService.setMode() preventing from changing
mode while in call. Now allows releasing mode to NORMAL or
reapplying the same mode and just change mode owner.
- Add more information in dumpsys for AudioDeviceBroker and BtHelper.
Bug: 154464603
Test: test transitions between cell call and VoIP calls
Test: Test regressions with calls in speakerphone mode and Bluetooth
Test: AudioManagerTest#testRouting, NoAudioPermissionTest#testRouting
Change-Id: I0d288acf2373c96d52eb91a6ab7142cc3535c719
This is a follow up CL to our previous CL [1], which enabled
AudioService to be notified about the UID of the currently used IME.
Although there is no change in the overall approach, with the help
from InputMethodManagerService AuditoService can be notified new IME
UIDs more quickly especially when IMEs are switching to other ones
(e.g. due to user switching or profile switching).
[1]: I11e17b13513627c88ccb8e4db66c5359e9ee7f7b
ed4e8c3fab
Bug: 147037345
Test: use voice input with Gboard 9.5.0 during a simulated RTT call.
Change-Id: I44e3331a7bad6d36227f7e2d0523dd14d933b6a1
1. Add a test api in TvInputManager to add hardware device for testing
2. Add Shell permission for TV_INPUT_HARDWARE
3. Add TUNER_RESOURCE_ACCESS permission for TvInput Framework.
Test: atest android.media.tv.cts
Bug: 155114656
Change-Id: I227f13cbf14532d8732729412ae9c2518755ef02
Modified java doc for METADATA_KEY_SAMPLERATE and
METADATA_KEY_BITS_PER_SAMPLE in MediaMetadataRetriever.
Test: api update
Bug: 155718941
Change-Id: I3d0d7acf1cafc53d635744810238e9bb6b57b917
While an app has an active screen capture MediaProjection, enable the
SYSTEM_ALERT_WINDOW app op for it if it requests the permission and
the user hasn't explicitly allowed or denied it. This enables the app
to use TYPE_APPLICATION_OVERLAY windows to show custom UI on top of
what is being captured. Needed for live-streaming apps.
Test: Manual, using a hand-written fake recording app and a real one
Test: atest MediaProjectionTest
Bug: 148002116
Change-Id: I503f3223608627c80520e98be840f793efd53d2a
By doing this, calling getRoutes() after instantiation will not return
an empty list.
Bug: 156319555
Test: Passed CTS
Change-Id: I4e5158b89d54e06f36dc37a3ca345849f0c91440
With this CL, some methods such as getAllRoutes, getActiveSessions
can be used without registering a callback.
Bug: 155042836
Test: atest mediaroutertest
Change-Id: Iba38d73a95c1d184bc89ff91d128b00109029d0a
Only selected routes can be deselectable and not selected routes
can be selectable from this CL.
Bug: 154918270
Test: Manually and atest mediaroutertest
Change-Id: I2e66d814190b003c935b21a744d24fa2b5d2c7ac
Add encapsulation info in AudioDevicePort. Instead of returning a size 0
array, query AudioDevicePort for getEncapsulationModes and
getEncapsulationMetadataTypes.
Test: atest EnumDevicesTest, manually
Bug: 155799506
Change-Id: I4eff64aeb135a75ad51c9b3618a34747be8920f1
Also add a lot of TODOs to make sure we document all the things
in the API at the end.
Bug: 145628554
Test: atest MediaTranscodeManagerTest
Change-Id: Ia77ce381b3bbbe546c96ffe4e1c37675b0d238ee
Translate KEY_ATMOS_PRESENT from Key<Boolean> to Key<Integer>
for JNI handling.
Test: AudioMetadataTest#testFormatKeys
Bug: 155392886
Change-Id: I69abbc451cdc6dfd23bf3d5d3a146ba884b9026e