MediaRouter2Managers' preferred feature didn't get cleared even when the
MediaRouter2 is unregistered/died. As a result, when an app is
reinstalled/relaunched, the routes for the previous process are still
shown in the MediaRouter2Manager.
This CL fixes the problem.
Bug: 158824569
Test: Passed CTS and mediaroutertest
Also tested with reinstalling support7Demos.
Change-Id: Ib5d84c41862177af32931e0d69b02f461105bba6
This CL prevents duplicate logs which are printed from
different code locations, which makes investigating future bugs easier.
Also modifies some logs to make them clearer.
Bug: 157873330
Test: Builds successfully
Change-Id: I90ca0e6b46e2b796d069dbecef4a8000cca85b4b
The route ID of a bluetooth route was its hardware address and
SettingsLib depended on that to get BluetoothDevice.
We can't use the address as ID for a pair of hearing devices,
which has their own address but should have the same route ID.
Instead, this CL adds "address" field explictly to be used for bluetooth
routes.
Maybe it can be used by other devices as well.
Bug: 157708273
Test: make -j42 RunSettingsLibRoboTests && cts test
Change-Id: Ib940da9975fc8d68ec3fb7cf2c4a85c0d1a195f3
The audio format doesn't always make sense in recognition events, for
example in a failure or abort event, so we allow it to be null.
However since the SoundTrigger.java API doesn't allow that, we inject
a default if it is not available.
Bug: 157496890
Test: Simulated a device that doesn't support concurrent capture,
reproduced the bug, applied the fix, verified.
Change-Id: I1e4adf9f3ccdc0f62cb9ca5e8c07df3c40a9d2cd
The method can be called with a random requestId, or called multiple
times with the valid requestId. It can result unnecessary calls
to MediaRouter2Manager#onRequestFailed().
This CL resolves this problem.
Bug: 157873556
Test: Passes CTS and mediaroutertest
Change-Id: Ia7dd4ddafd532b9f23bf19491a0820d5a74f6a70
Add the callback to let MediaRouter2Manager get notified
of released sessions.
A test is also added to check if the manager is aware of
a released session when the session is released from the
media router.
Bug: 157872573
Test: atest mediaroutertest
Change-Id: Ifb96b23ed61cc15f5015c453727a487c3b09a92b
Eliminate potential race condition for postEventFromNative.
Fixes: 157755647
Test: atest com.android.car where race condition was hit
Change-Id: I5d11f8769d2c09a6a630332db447302e06a5869b
When a transfer is ignored by the provider.
It is handled as a failure by MediaRouter2Manager.
A test is added for timeout, which takes 30 seconds.
Bug: 157875723
Test: atest mediaroutertest
Change-Id: I3f0ec77551309c96f8f589057800082f6121d4e2
Bug: 149526397
Test: Passed CTS and mediaroutertest
Also checked logs that DEFAULT_ROUTE is not added.
Change-Id: Icc0a5f2ea8f93fd7baba132a9bd4a1f9d798bba9
This CL ignores attempts to transfer to unknown route in
MediaRouter2Manager.
This CL also fixes wrong acquisition of locks when getXXXRoutes.
Bug: 157875504
Test: atest mediaroutertest
Change-Id: Ic3415844551c672b42d19d9744d7538a9d7df7c3
It actually needs the foregroud service to be the type "mediaProjection"
Bug: 157265923
Test: m -j ds-docs-java
Change-Id: Ia5aab928be1755e3117432bdec423e88f997c55b
This CL ignores requests that contain unknown session IDs and
make sure sequence of binder calls are aligned with notifySession
Created/Updated/Released.
Bug: 157873546
Bug: 157873487
Test: Run CTS and atest mediarouter test
Change-Id: Ie31e2fca8160093cf54886180e67d40865a35d6d
This CL adds bug nubmers for TODOs which are needed to resolve in
Android R timeframe.
Bug: 157875570
Test: Builds successfully
Change-Id: I8d5adcabb4ec42feabf38ac3cedcd63e9a5a9cf2
Based on feedback from a partner, it sounds like getFrameAtTime()
and getScaledFrameAtTime() may end up returning low-quality bitmaps.
To make it clear that we want to create high-quality thumbnails,
this change explicitly requests ARGB_8888.
Bug: 157448043
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I39c7c552e8fa715ec13efa75c1c3a30d58492bfb
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
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