When the Spatializer effect reports it is initialized, initialize
the sensors for head / screen.
Bug: 191404931
Test: adb logcat | grep SpatializerHelper
Change-Id: I58c22b69b32057765bced49fd9d56cbf3b6cf5a6
Spatializer instance returned by AudioManager.getSpatializer()
is never null.
Instead of having this getter return null when the device
doesn't support spatialization, the user can query the
instance for it's level of support for the feature.
The level of support is independent of the state of the
spatializer.
Bug: 191404931
Test: atest SpatializerTest
Change-Id: Id08670749b4d34230313d2cd829aa5ba414dae21
Implement initialization of SpatializerHelper, the AudioService
proxy for the native Spatializer effect.
Implement release of Spatializer effect when feature is disabled
Implement Spatializer available dispatch.
Track routing changes reported through AudioSystem to
check if device for media routing is compatible with
spatialization. Use result to update Spatializer
availability
Bug: 188502620
Test: adb logcat | grep Spatializer, check for "init succeeded"
Change-Id: Ib06b1f54fee20a5057768a7a31a047bd1fba930d
This is a cherrypick of aosp/1804116.
Bug: 197217250
Change-Id: I04bee764bf50734523ff2210d30ed052dcb036bd
Merged-In: I04bee764bf50734523ff2210d30ed052dcb036bd
Test: No code changes done.
Follow on from ag/15684817, where the WindowContext is cached in
MediaProjection. To allow multiple VirtualDisplays to be created
from the same MediaProjection, instead create a new WindowContext
for each one, and associate with that VirtualDisplay.
As before, the WindowContext must be stored in a field to prevent
it from being garbage collected.
Bug: 197579637
Bug: 198415847
Test: manual
Change-Id: If3f84b3778104bf12617d224876700f8ee3b2b45
When WindowContext is a local variable for starting layer mirroring,
the variable is eventually garbage collected. When this occurs
when MediaProjection is still running, then DisplayContent
fails to transform the captured content from
onConfigurationChanged.
The destroyed WindowContext triggers unregistering the
WindowContainerListener. Even though the WindowToken is
still being used by DisplayContent, DisplayContent is no
longer able to retrieve the WindowContainer associated
with the WindowToken. The WindowToken set when layer
mirroring begins is used to indicate the layer of
the hierarchy to mirror.
Bug: 197579637
Test: Manual
Change-Id: Ib8a971d1a85ebfe9db59d9267cc387f4f4d15991
- AudioManager: entry point for getting
a Spatializer object, if supported
- Spatializer: entry point for spatializer
capabilities, system APIs for configuration
and compatibility with devices
- AudioAttributes: additions for behavior of
a track for virtualization
Bug: 191404931
Test: atest AudioAttributesTest SpatializerTest
Change-Id: I06f8acdd979f8d4374042f8209082c79f49a1f75
This reverts commit 50673d80be.
Reason for revert: non-existing bug number prevents API council tracking
Bug: 191404931
Change-Id: Iaccc698a1034e9387b7918eda826438dfe3a9485
Add support for the following APIs in AudioSystem JNI:
- getSpatializer
- canBeSpatialized
Bug: 188502620
Test: make
Change-Id: I1942edc6c9fec3babfe870586f7a014d55b1ce70
When releasing a MediaPlayer outside of a playback
completion (back to back notifications), pause and
wait 100ms before releasing the player.
Bug: 193832902
Test: create back-to-back notifications, check for glitch
Change-Id: Ib8baba4bf2b41e75b526e8490b6c2f31c85c193c
- AudioManager: query of platform support for
the whole feature
- Spatializer: entry point for spatializer
capabilities, system APIs for configuration
and compatibility with devices
- AudioAttributes: additions for behavior of
a track for virtualization
Bug: 91404931
Test: atest AudioAttributesTest SpatializerTest
Change-Id: Ia81ae07a0e66497b0731209907ca62a524c0a515
MediaProjection is used by apps to capture the contents of
a display. Apps consume the content from a surface passed
in to MediaProjection#createVirtualDisplay. The images
written out to the surface can be used for saving
screenshots of the current display, screen recording,
or casting to a different display.
MediaProjection is currently tied to capturing a physical
display. This change instead captures the DisplayArea
the app is launched on. This is consistent with Display API
sandboxing, which returns the DisplayArea bounds rather
than the physical display bounds.
Note that apps use the Display APIs to size the
VirtualDisplay and output surface.
Verified: screenshots, screen recording, and casting
Bug: 180624777
Bug: 195280234
Test: atest WmTests:DisplayContentTests
Change-Id: I086fa1ae668dbdf0f25252c13614445af04d86f3
This change follows the pattern of how the IME UID is set.
The UID is stored in AudioService and re-sent there if the audio server
dies.
Fix: 194368677
Test: manual - hotword works when another app is using the mic and in
Auto projection mode; also after restarting the process or killing
audio server
Test: atest HotwordDetectionServiceBasicTest
Change-Id: I325cb33d17387e62302967b261b6fe61086d8893
This reverts commit 45dd2a3202.
Reason for revert: b/195280234 is blocking droidfood
Bug: b/195280234
Change-Id: I09593dffb797d1e4c60cff52e7901ed6c00f719c
MediaProjection is used by apps to capture the contents of
a display. Apps consume the content from a surface passed
in to MediaProjection#createVirtualDisplay. The images
written out to the surface can be used for saving
screenshots of the current display, screen recording,
or casting to a different display.
MediaProjection is currently tied to capturing a physical
display. This change instead captures the DisplayArea
the app is launched on. This is consistent with Display API
sandboxing, which returns the DisplayArea bounds rather
than the physical display bounds.
Note that apps use the Display APIs to size the
VirtualDisplay and output surface.
Verified: screenshots, screen recording, and casting
Bug: 180624777
Test: atest WmTests:DisplayContentTests
Change-Id: I909e9d32f573aec33869d9f49d6caffc8d7420aa
MediaRouter2Manager returned selected routes
as "transferable" routes.
This CL fixes it.
Bug: 194370296
Test: manually
Change-Id: I85e0e94bd38e07ee1a99369e9de5a4564aee6d58
To call the media service while bypassing transcoding there are 4 file
descriptors involved:
A: The original file descriptor the app owns and is responsible for
closing
B: Dupe of A, to pass into the MediaStore API as an input to receive a
non-transoding fd
C: The output from the MediaStore API
D: Final fd owned by the media service, after C gets duped over binder
as part of setDataSource
We were leaking (B) and (C). Now we close them appropriately.
See I0124ec8fbd0471237e99bab321f903544f8fe1f8 for another 2 fd leak
fix in MediaProvider
Test: atest TranscodeTest
Test: Manual with 'adb shell lsof | grep <filename>'
Bug: 194828489
Bug: 179804072
Change-Id: I978257bbc4a8f6813b6e6a5ce22124257204f432
Merged-In: I978257bbc4a8f6813b6e6a5ce22124257204f432
This is required for backwards compatibility. This ensures pre-S apps
that look for pcm float continue to see that encoding if the device
supports extended precision integers.
Test: atest AudioManagerTest
Bug: 193747274
Change-Id: Ia244bdcd51520dd082a292baab54f1795ccccaea
Access to the API needed from a tunnel mode CTS test.
TestAPIs dont work in CTS test if they intrenally call AudioSystem.
Changing getSurroundFormats and getReportedSurroundFormats to call
AudioService instead of AudioSystem.
Bug: 189823767
Test: atest android.media.cts.DecoderTest#testTunneledAudioPTSGapsAc3
Change-Id: If6287743f57b77d0eb2639e4a2e9409c7d778f06
Merged-In: If6287743f57b77d0eb2639e4a2e9409c7d778f06
Define new channel masks to support immersive audio apps.
Define new channel combinations commonly used for m-chan content.
Document existing and new masks.
Bug: 191404931
Test: atest AudioFormatTest
Change-Id: I59ff6770e9b4958659df8b93eaa649d299ea6922
A context will be required for resolving a Uri. Using the context in
AudioService may not always work and it may cause not oneway binder call
issue. In that case, using the context in RingtoneManager could help.
In AudioManager, caching a static context so that it can be used when
there is not context provided.
Test: atest RingtoneManagerTest
Bug: 187842281
Change-Id: Ia2f514cb8f821926cf3d353cf912a44aeb584ab6