Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv \
git diff HEAD^ HEAD | grep '^[+-][^+-]' | grep -v '.import'
Change-Id: I087bb1cecbe59f1cf0c2e770c735d7a433722c6f
RouteSessionController controls the session in media route providers.
Adding, removing, transferring routes can be done by using this class.
Bug: 146400872
Test: Builds successfully
Change-Id: I42cd862463b205b77f2e508ee3a49cc81b4c6ddd
An upcoming change will move MediaStore to be within the recently
created MediaProvider APEX. This means that MediaStore will need to
be fully built against @SystemApi, and so this CL adjusts APIs to
support a clean transition:
-- Listing of "recent" storage volumes and scan paths for "internal"
storage is now handled by StorageManager directly, so that partners
retain control over what is deemed recent.
-- StorageVolume now returns the MediaStore volume name and the
filesystem directory where its contents are presented to apps.
-- Conversion of legacy thumbnail "kind" values to dimensions now
happens directly inside MediaStore.
-- PendingParams and PendingSession are completely removed.
-- Contributed media APIs are completely removed.
-- Media for demo users is now surfaced as a unique StorageVolume.
-- Migrate most MediaStore APIs to accept ContentResolver, which
supports easy usage of ContentResolver.wrap().
Bug: 144247087, 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Exempt-From-Owner-Approval: in-place refactoring
Change-Id: I445528b2779bb37b9f2558e67a3cfc9f60412092
* changes:
Migrate SoundTrigger implementation to new service
Implement the soundtrigger_middlewware service
Add a permission for preempting sound trigger sessions
Sound trigger middleware service definition
Add audio.common types AIDL definition
This CL splits the MediaSessionManager.Callback (abstract class) with
OnMediaKeyEventDispatchedListener and
OnMediaKeyEventSessionChangedListener (interfaces with default methods).
It's to follow the API guideline and also to help the Bluetooth for
minally registering callbacks. (The Bluetooth currently only overrides
onAddressedPlayerChanged)
Bug: 138648566
Test: Build and run
Change-Id: I8607662b00db7fb32cf3f4ee527c52b9fd8a6d7c
(cherry picked from commit f5ff735fae)
* changes:
MediaSessionManager: Split abstract class Callback into interfaces
MediaSessionManager: Use Executor instead of Handler
Allow to register multiple callbacks in MediaSessionManager
This service is intended to replace:
frameworks/av/include/soundtrigger/ISoundTriggerHwService.h
This change only adds the replacement service, follow up
changes migrate the clients to use the new service and remove
the old one. The new service is feature-equivalent to the new
one, but offers the following advantages:
- AIDL interface (as opposed to hand-written parceling code).
- Pure Java implementation all the way to the HAL.
- Better documentation.
- Rigorous error handling.
- Unit tests.
- Reduced code complexity (less layers, better separation of
concerns).
- Permission-based security model (as opposed to some baked-in
assumptions about process affinity).
Change-Id: I79f4eff105d3e6245990be068b933d4d48c35a0d
Bug: 142070343
MediaProvider has standardized on being an indexed view of files that
we discover on disk, so that we can always recover that indexed
information in case of user data wipe or corruption. This means
that MediaProvider no longer supports abstract "object references".
This doesn't prevent future MTP implementations from bringing back
object reference support, and the recommended path forward would
be to have MtpDatabase convert object references into playlist files
that are written to disk. MediaProvider will then gladly scan those
playlist files to be visible to users.
Shift to directly using the existing Files.getContentUri() API for
all MediaProvider interactions.
Bug: 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I829027bb9fbcf5991c1ddee0aec04ad7e7b240cd
The AudioPolicyManager currently only handles one device per
audio device type. Thus sending a disconnection event for an
unused second A2DP device to the APM when one was already
connected, would cause A2DP to be unavailable completely for
audio routing. This happened in the case of fast connection /
disconnection of different A2DP devices.
The fix consists in keeping track in AudioDeviceInventory
of which audio device is seen by the APM, and only connect
one at a time, and never disconnect an unused device.
Also remove mention of "BT dock" since identification of
BT devices as docks is obsolete.
Bug: 145627818
Test: atest AudioDeviceBrokerTest
Change-Id: I18d5094bb388d4b0f614b611cbc086019742f229
MR2.getRoutes() right after MR2.setControlCategories() will return
routes filtered with new control categories.
In order to call backs properly, mHandledControlCategories is added,
which is changed only in handler.
getRoutes() is also changed such that routes are evaluated lazily
to avoid unnecessary evaluation.
CallbackRecords are implemented in a way that doesn't acquire explicit
lock.
Callbacks are modified so that newly register callbacks no longer
get notified existing routes.
Also, fixed test according to changes of MR2 and MRM.
Bug: 145488462
Test: atest mediaroutertest (5 times)
Change-Id: I9ba3d74bcf423d801249420d947f41eccb37d67a
These are the AIDL files that define the sound trigger middleware
interface.
This service is intended to replace the existing
frameworks/av/include/soundtrigger/ISoundTriggerHwService.h
using AIDL in order to avoid a large amount of hand-written
parceling code and other forms of boilerplate, and provide
cross-language support.
Change-Id: Ia783ba4f1ea7335a984396e7024cac0411699403
Bug: 142070343
This is a subset of the types defined in
hardware/interfaces/audio/common/2.0/types.hal.
Specifically, the subset that sound trigger depends on.
These files were auto-generated using the hidl2aidl tool, and
later manually edited to workaround some missing features in
the conversion tool or AIDL (mostly around enum support).
Change-Id: I1c0ffe8a2ebaf09eb4516beaaf4b6fc80985bfc9
Bug: 142070343
add support for model parameter control APIs with THRESHOLD_FACTOR
as the first supported parameter
Bug: 141929369
Test: Tested manually with test app and confirmed with GTS test
gts-tradefed run gts-dev -m GtsAssistIntentTestCases
Change-Id: I06874fcf2ae2ef8796e7c52c4475252e8a026e2c
This CL splits the MediaSessionManager.Callback (abstract class) with
OnMediaKeyEventDispatchedListener and
OnMediaKeyEventSessionChangedListener (interfaces with default methods).
It's to follow the API guideline and also to help the Bluetooth for
minally registering callbacks. (The Bluetooth currently only overrides
onAddressedPlayerChanged)
Bug: 138648566
Test: Build and run
Change-Id: I8607662b00db7fb32cf3f4ee527c52b9fd8a6d7c
Add audio usage for call assistant use cases.
Used by apps playing over call uplink path for call
screening or other in call assitant features.
This usage is reserved for system apps with privileged permission
android.Manifest.permission.MODIFY_PHONE_STATE.
Bug: 135213843
Test: make
Change-Id: I7a2278f36f44a474a47dd85d276340da4df460f3
Routing is done per AudioProductStrategy. For instance routing
media is done by using the AudioProductStrategy that supports
the AudioAttributes with USAGE_MEDIA.
Routing is for a connected device, AudioDeviceInfo, or for on a
device that is not currently connected, uniquely specified by
its role, type and address.
Preferred routing can be set, removed, queried (get).
When audioserver crashes, AudioService restores the preferred
routing operating on the audio policy engine.
Bug: 144440677
Test: atest AudioServiceHostTest#PreferredDeviceRoutingTest
Change-Id: I0647608088fe2906e78b71341615975a56747c2f
Note that these two already exist in NdkMediaFormat.
Bug: 132153067
Bug: 134057371
Test: Not applicable.
Change-Id: I602bd16e3cda302e538097a9a2ba3487f34fa0f9