Add new flag for an app to define it doesn't duck, but rather
pauses when losing focus with AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK.
This flag is to be used when requesting focus.
Add support for AudioPolicy to specify whether it will implement
ducking itself, rather than it being handled by an app.
When ducking is handled by a policy, do not notify focus owners
when they lose audio focus with LOSS_TRANSIENT_CAN_DUCK, unless
they would have paused, as expressed with the
AUDIOFOCUS_FLAG_PAUSES_ON_DUCKABLE_LOSS flag.
Add a focus listener for a policy to be notified of focus changes
so it can properly implement its own ducking.
Bug 16010554
Change-Id: I11d7cdb85c52fd086128a44f4d938aaa44db5c25
Adjust format strings to not produce Clang warnings in both 32-bit and
64-bit builds
Change-Id: I76c29d8d5d0fb4b5e9d9518077652370ffe9e871
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
This sends mute keys to the MediaSessionService and handles them
by toggling the appropriate stream. Muting remote playback is still
not supported.
bug:17501993
Change-Id: I18c5b037cde2175acbb64b118dd708514acfd8c9
- allow Media.Image.setCropRect(null) to unset cropRect
- use full image if cropRect is null in MediaCodec$Image
Bug: 18124320
Change-Id: I7abb6175402a1fe913e16c0a682fabee79c55741
The MusicDemo was depending on the fact that setting the session token
is done synchronously and that getSessionToken can be called immediately
after. This makes setting the token synchronous again but leaves the
post to update any MediaBrowsers that are waiting on a connection.
This does introduce a small race condition if an app tries to set it
twice from different threads, but this is a very unlikely situation
and MediaBrowserService is not guaranteed to be thread safe.
bug:18603085
Change-Id: Id934c9f3b6520225cd92d1d8a6e2b3d606b8c6c8
Currently, TvInputManagerService notifies the initial state of each
input via TvInputManagetCallback#onInputStateChanged after TvInputManager
is created. However, this is racy because the client may call methods
like getTvInputState() before the initialization.
This patch makes sure that the client gets the control when the initialization
finishes completely.
Bug: 18419452
Change-Id: I5d8141c20984013e68f2809120710c670557c9ad
Volume control in master mode should be transformed to
CEC commands if system audio is activated to delegate
the control to the connected AV receiver.
Refactored to use the interface to CEC service for
both master and stream type volume control.
Bug: 18560079
Change-Id: I2aefdc94a1bc3091c14fab849f899a0dc37c47bc
- Simplify API for defining an exclusion-based rule: don't define
an exclusion rule, add instead a way to exclude a rule.
- API for defining rules for dynamic sources (rule match on capture
preset).
- Verify mix type when creating AudioRecord or AudioTrack for a mix.
- Use hashcode of mix for generating the device address.
- AudioService dump prints info about registered policies.
- Annotate as SystemApi the audio policy-related APIs.
- Express mixing match and exclude rule constants as flags for
future-proofness
Bug 16006090
Bug 16009464
Change-Id: I0dabe71204501acaffea7ef0ddbbab9700e1bd87
When useMasterVolume is set, we don't want to apply the volume
attenuation twice, once at the stream mixer and once at the master
volume control. It should only be applied once at the master volume
control.
Change-Id: Id5b1cf97571733515b5680c638f11cde8824cfc0
Fixed: b/18460548
- Make the system internal ringer mode change signal available to
other system components via a standard intent, instead of a
volume-controller-only binder call.
- Update sysui to use new intent for icon policy.
- Add proper muting state to the volumizer, to look more like
the associated volume panel slider.
- Add basic ringer mode state tracking for the notification-ring
slider setting.
Bug: 17899613
Change-Id: Ie2df52edb070055ef59c74039162a0e785d2fdbb
Background: The underlying passthrough TV input expects tune() command
to show video on the screen and call notifyVideoAvailable().
Bug: 18551619
Change-Id: I257db321c09d621e6bd3c0e69bfe0abfca5742a9
This CL fixes all android.media.* javadoc that includes an "ERROR(...)"
message when rendered to HTML.
Bug: 18537403
Change-Id: Ic60f7cfe4cf4961da163d955387d65a5d2011905
(cherry picked from commit d550f9028ee7f52018fbed3cfd2d0b18d6a7c4f0)