Added some recovery code for the case of a dead driver.
Due to the sound trigger HAL process being tied to the audio server
via init.rc, this would also offer recovery from audio server death
as a by-product.
Bug: 146852437
Change-Id: I8cfea8ab108d482592c8094e8093066973f43288
This can be useful for debugging purposes.
Test: builds successfully / checked the message locally
Change-Id: I8928e131adf6e470309c2165343e8c467d3a692c
This CL adds API to get/set volume control ID for a session.
Volume control ID is set by volume providers (e.g. MediaRouter)
to notify which volume provider is used by the session
to other apps such as System UI, Settings.
Bug: 147528363
Test: atest CtsMediaTestCases:android.media.cts.MediaSessionTest
Change-Id: I9ecafeca8b5090b4c8a89029d1e6411fd48919cb
Make the synchronous AudioManager.unregisterAudioPolicy() method
compatible with situations where the owner of the policy has already
stopped / flushed the tracks or recorders associated with the policy
by catching the IllegalStateException that could be thrown.
Test: atest AudioServiceHostTest#testGetDevicesForAttributes
Change-Id: Ic0ae0732b775a10135f6cbdd31d5e3409e550942
This API is for TunerResourceManager to get the callingPid of a TIS
client from TIF with the sessionId provided by TIS when TIS requests
resources from the TunerResourceManager.
This CL is also handling the creating and storing mechanism of the
sessionId.
The sessionId is provided by TIF when TIS created session through
TIF.
The sessionId to clientPid mapping is saved in a global map
in TIF service.
It is passed to the vendor TIS through new public API
onCreateSession(inputId, sessionId)/onCreateRecordingSession(inputId,
sessionId).
Test: Run with CTS on Cuttlefish
Bug: 147380882
Change-Id: I344a812add4a9637bf7eb226e5e4e3ead5b456a2
This CL renames following classes:
- RouteSessionInfo to RoutingSessionInfo
- RouteSessionController to RoutingController
Bug: 147527788
Test: atest mediaroutertest
Change-Id: I6d6c997d9119b668bd8879f2f5a8ca266ddbeccc
This CL removes RouteSessionInfo#isValid() since there is are no usages.
Also overrides equals() and hashCode().
Also, it applies following changes:
- Make the class as final
- Add javadoc for using an empty string for unknown client package name
- Throw exception in Builder#build() if there is no selected routes.
- Throw IllegalArgumentException in Builder#add/Remove*Routes(routeId)
when the given routeId is empty or null.
Tests for the class are also added.
Bug: 147524068
Test: atest mediaroutertest
Change-Id: I2cb6cc37a8216dd42dc72edee72bb5211259c66a
This CL covers APIs for discovering routes published by
MediaRoute2ProviderService.
Bug: 147402721
Test: atest mediaroutertest
Change-Id: I978a6489ae1bcfcd6bb427d4a939c49ff3420e2d
Add a new @SystemApi for querying audio playback routing for
a given AudioAttributes.
Note that unlike the (@UnsupportedUsage) getDevicesForStream API,
this method takes into account any current dynamic policy (unless
it is based on uid).
Bug: 144440677
Test: atest AudioServiceHostTest
Change-Id: I0431e792a209865ffa771a521c2f0792c07ce5d4