As audio device type can not be used as bit mask any more, refactoring
the code to use a set for a combination of audio device type instead.
Bug: 135621476
Test: atest AudioDeviceBrokerTest
Test: audio smoke test
Change-Id: I2c6fabfafcc6eaf607975076d9ee1a78887a2c85
In the constructor of MediaRouter2, it gets system routes from
MediaRouterService.
Test: atest mediaroutertest:MediaRouter2Test
Change-Id: I26512343faefe11b353734184f0bbae566025b4b
I thought that routes with empty name are invalid and providers
shouldn't publish those.
BT devices seem to be able to have empty name, however, so we have
to choose between
a) ignoring empty named bluetooth routes
b) allowing empty named routes
If a BT device was invalid, BT or Audio should hide the device.
So even the name is empty, the route may be valid and we choose b).
Test: atest mediaroutertest
&& atest A2dpServiceTest
Change-Id: I9b4866711bc4f4c2c13e790519ea1f4d408fa5d1
go/cleanup-greylist-txt
These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.
This is partial merge of aosp/Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09. Telephony greylist cleanup has been done separately. Note that annotations outside of frameworks/base/ have been merged from AOSP.
Bug: 137350495
Test: m
Exempt-From-Owner-Approval: merge
Change-Id: I015c466e8b69cc0fed5e9d394ba865aad11d8ba6
Currently, the offset value returned from getAttributeRange() does
not take into account the offset to the EXIF data within the image
file. This CL fixes the code to return the correct offsets.
The existing test code could not detect this issue because it does
not explicitly seek to the given offset and retrieve/compare the
data. This CL also adds test code to do this. Make tag information
is also added because all test files have this information, while only
a select few have thumbnail/GPS tag information.
This CL also fixes a bug where the thumbnail offset was not being
updated if the data was passed with StripOffsets tag.
Bug: 143118731, Bug: 143663411
Test: atest ExifInterfaceTest
Change-Id: Ib5e33335cfafa81e3584e96d49a764ad873835a9
Introduce a new class to store information about an audio device,
containing its role (input or output), device type and address.
Bug: 144440677
Test: atest AudioServiceHostTest#testAudioDeviceAddress
Change-Id: I86d32590c54609b8d8a9f7ea60d9b4bf76113935
Clients can pass paths like "/sdcard" which don't map directly to
a real storage volume.
Bug: 141837797
Test: none
Change-Id: Iec110472e224c381e33dc9f8e60e1b10e2fbfc0e
Also improved Javadoc for constructors, including specifying
when exceptions are thrown.
Bug: 142347585, Bug: 144321109
Test: make update-api && Run cts test
Change-Id: I08b5725caa3d5af36b10425ef0b0b956a08e747e
Added following logics
- MediaRouter2 does not select the route anymore, but 'requests'
to the MediaRouter2Service.
- The request is sent to the MediaRoute2ProviderService.
- If the provider send the control hints, the route is now
'selected'. (The method for sending hints is not included in this CL)
- If the provider didn't send the control hints in timeout,
the selection request is cancelled.
Tests for this CL will be added when we introduce a new method
MediaRoute2ProviderService#sendControlHints()
(method name is not final).
Test: Builds successfully
Change-Id: I5aafcc29f9d39a88bac05b8e8ebae1280ef1f8fc
Nick is the TLM of media TV.
Adding OWNERS to avoid bugging people from other media teams
Test: n/a
Change-Id: I2c99a7a1ab78c634fc94dfe96b6617b0bde4efdf
Merged-In: I2c99a7a1ab78c634fc94dfe96b6617b0bde4efdf
Add new audio mode MODE_CALL_SCREENING allowing call screening
to take place while other audio use cases are still active.
Also add API to indicate if the platform supports this audio mode.
Bug: 140384450
Test: make
Change-Id: I056f79580d9c7b4de5eabb6d8d8c917f39162bcd
This CL updates callbacks for MediaRouter2Manager such that
onRoutesAdded, onRoutesRemoved are added and onRoutesChanged is changed.
onControlCategories also is added to know when getAvailableRoutes() can
be called.
It also updated tests for that and add some helper methods to test
easily.
Test: atest mediaroutertest
Change-Id: I122ce8f8472e01284f13b8aec79e3b8e97fc712b
AudioAttributes.Builder.setFlags() is a public method and should only
allow to set public flags
Test: CTS AudioAttributesTest
Change-Id: Ib75e3487f5297f6a200ffe326c53a0f58458b51f
Retrieve audio HAL processes pids from service manager and send them
to AudioFlinger native service. This is needed to dump audio HAL process tombstones
and because audioserver process does not have the SELinux permission to
list services.
Bug: 141528385
Test: Force watchdog and verify tombstone creation
Change-Id: I3e35b8040779e041b8d8c2e72d1e650d6f8fe818
go/cleanup-greylist-txt
These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.
Bug: 137350495
Test: m
Change-Id: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
Merged-In: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09