Adding new permission for changing accessibility volume
to allow system UI to change it. Also providing audio
manager with a whitelist of bound accessibility service
uids so it can allow servics to change the volume.
Bug: 36569297
Test: Adding CTS test in linked CL.
Change-Id: I4f327e3a251fc3780c5957f41217c2ef5bb8b16e
Here's the new media handling logic.
1. If the foreground app consumes the media key event
(Activity.onKeyDown/Up() or Activity.setMediaController()),
we stop here.
2. Find the media app whose AudioPlaybackConfiguration becomes
PLAYER_STATE_STARTED lastly across the boot. The media app is the app
with the media session.
- If its session is still alive, send the media key event
to the media session.
- If its session has been released but the session set the media
button receiver, send the media key event through the media button
receiver.
- If it has multiple media sessions, pick the media session whose
PlaybackState matches with the AudioPlaybackConfiguration's player
state.
3. Stop here. Don't try revive any other app.
This approach has two limitations.
1. If an app has multiple AudioPlaybackConfigurations and/or
media sessions, the MediaSessionService may pick the wrong media
session to send media key events.
2. If an app with a media session plays sound effects differently from
the SoundPool class, the MediaSessionService would consider the app
as the lastly played media app.
Bug: 33032080
Test: Manual tests as follows
1. Checked that the lastly played app receives the media key events
although the app's media session doesn't report its playback state.
2. Checked that the lastly played app receives the media key events
although the app's media session is released.
3. Checked that the lastly played app doesn't receive the media key
events if its playback is remote.
Change-Id: I1fd6f9eee0750da4dea9fcc7401fdb1c3f249a72
Translate ServiceSpecificException from aidl to CAS-specific
exceptions. Also, throw CAS specific exception for descramble().
bug: 22804304
Change-Id: I6d68c335c87fbb95fd8cc227e432eed4e5951550
By adding a CONNECT_STATE_DISCONNECTING, we could prevent
the ConnectionCallback to be called after disconnect().
Bug: 36106103
Test: manual using Support4Demos
Change-Id: Ia6f9864dce90b1e58437c07bbcaf6300e162ab92
This limits excessive logs from MediaRouter and MediaSessionRecord
- MediaRouter: Leave log only if there's change in the audio route.
- MediaSessionRecord: Leave log for the controller callback instead of
dumping verbose stack traces.
Bug: 36497125
Test: Manual test
Change-Id: Ie0fe9f33388d1aa9f25c26b3b3f7c71fec409ba8
Addressed API council notes: document some missing default values
of AudioFocusRequest builder, remove getters on lister and
handler.
Fix missing support of custom Handler for focus listener.
Integrate focus lock feature from AudioManager SystemAPI into
new AudioFocusRequest class and builder. Deprecate system
methods for focus requests that don't use AudioFocusRequest
Switch to a ConcurrentHashMap in AudioManager instead of a
lock and HashMap to maintain the list of focus listeners
for each AudioManager instance.
Clean up: all local IAudioService references can be made final.
Add missing @Override for the Stub implementations.
Test: cts-tradefed run cts -m CtsMediaTestCases -t android.media.cts.AudioFocusTest
Bug: 30258418
Change-Id: I9e903379a607c723a2620821200547de679231d1
When stopping AppOps watching in the player release, catch
any exception to be safer.
Test: see bug repro steps
Bug: 36240191
Change-Id: I8e11cfc12c305878699dc57131e35e2a98eb7b16
The volume handling of the default route of the devices which use
fixed volume should be set PLAYBACK_VOLUME_FIXED instead of
PLAYBACK_VOLUME_VARIABLE.
Bug: 36492333
Test: passed CTS of MediaRouterTest
Change-Id: I4bc42063b71ae9087b36f1529b7689b96d9e53e7
The type of channels should not be changed once it's set.
Blocks this column from being modified.
Test: cts-tradefed run cts -m CtsTvTestCases
Change-Id: I9f7c99b4693db5553e85a1cab5cf1130425630c7
Integrates the API Council's feedback into the Media Metrics
related APIs.
-- return types for the getMetrics() calls
-- definition of keys in the set of data that comes back
Bug: 35811992
Test: booted, CTS subset, checked dumpsys media.metrics output
Change-Id: Ib750f9631bd3453be3132760273ccfff0a891f88
Add more debug information inside the IAEs thrown during
audio parameter check.
Test: try invalid params for recording, read exception text
Bug: 34119793
Change-Id: Ic4f36fd6ef99c18107e3204ef5e25cc1bc9e704d
Test: plug-in and unplug cable to TV and/or run VTS, or add fake
pass-through inputs (OTT devices).
Bug: 28715954
Change-Id: I4229a1a16a61218714e2cd620d1284f7ef8e5d7a
This CL makes MediaBrowser.search() throw IllegalStateException
when the browser is not connected to the service.
Bug: 35346000
Test: Flashed the image on angler and locally tested.
Change-Id: I8fda53e31555337107c4e42f388ff82a7929b084
Exifinterface sets the thumbnail's compression information as JPEG
whenever the image has no compression tag in it. As a result, even
an image with no thumbnail can have the thumbnail compression info.
This CL fixes the problem.
Test: Run CTS test on angler
Change-Id: I4b06956b1bac672e1bf235df6f458b31e8ee82bb