This CL cleans up connectionRecords when binder dead and the connection
is lost.
Bug: 65132577
Test: check the number of ConnectionRecord, kill the media app, check
the number again.
Change-Id: I8b31745bcee220b9e70c3f43d7fc9d8dc3f6b83a
The default phone speaker, bluetooth audio devices, and wired audio
devices are handled as system audio routes. When an app starts to
make sound to a system audio route, the system audio route will be
selected with the following order.
1. The slected route by the app after the latest connection of
an audio device.
2. The lastly connected audio device.
3. The default phone speaker if not connected.
Bug: 64811580
Test: Passed MediaRouterTest, manual
Change-Id: I77badb14596bc661c44237957504164f5476e595
Log changes to AppOpsManager.OP_PLAY_AUDIO in live player
Test: "adb shell dumpsys audio" after entering silence mode
Bug: 62258749
Bug: 64286665
Change-Id: Ia1c202c5b8b25e14f7c2e85060a256dc69433909
Add permission annotations on audio focus @SystemApi methods.
Ignore REQUIRE_PERMISSION error (125) for:
- deprecated abandonAudioFocus() method: the check is on the
request call
- isHdmiSystemAudioSupported() method, it's not clear if it's
being used.
Test: remove "-hide 125" in Android.mk and make, verify no errors\
on AudioManager.java
Bug: 62343127
Change-Id: I62526db0c6dabcc34224c589506d611519de6abc
Bug: 64686424
Test: Connect to carkit and see that NowPlayingChanged only gets sent when
the queue changes, run cts test
Change-Id: I58c9dd0bf976485a2efefd042cd667ee433e07e1
New class AudioEventLogger to store a configurable number of the
last audio events. It hosts a circular buffer of lightweight
event objects, an abstract class whose implementations are
event-specific, and does the heavier string manipulations
at the time of the dump, not during normal operation.
Add logging for:
- phone state (a.k.a. audio mode) changes
- wired device connections
- playback activity monitor
- force use
Test: adb shell dumpsys audio
Bug: 64470715
Change-Id: I8dbd936e2ffec39134f1a8837191c74f5cb9fc56
MtpService has been changed to a singleton service
running in user 0, so the original context will
be that of user 0. Accesses to MediaProvider and
MediaScanner should use the new passed in user context
in order to access user data, while the broadcast
receiver for battery data will use the original context.
Bug: 64822515
Test: Use Mtp and switch users.
Change-Id: Ic181258337944db7dc6f6097c967cb104df938d3
Verified that nobody should be using these APIs, and they've been
deprecated long enough that we can remove them.
Bug: 62341924, 62263907, 62264550
Test: make -j32 update-api && make
Change-Id: I9a2333ca13e4984b71374aa7ffed081e5106c67e
IllegalArgumentException can happen, if unbindService() is called
after the service is stopped.
Bug: 63439915
Test: Passed MediaBrowserTest
Change-Id: I70ecb9e907af66b9b65960dd4029e55e81639c03
If the caller of MediaPlayer.setDataSource has installed its own
CookieHandler when cookies are provided, MediaPlayer.setDataSource
requires that the CookieHandler has to be of CookieManager type.
Bug: 63638018
Test: manual
Change-Id: I1539d1fa83440ddfb00cc958cd46b9917fe3a296
Consider this VirtualDisplay (VD) scenario:
HostActivity creates a VD which holds SettingsActivity. When EditText
on SettingsActivity is tapped, it gains focus.
On eventual taps, it loses focus i.e. the Window in VD loses focus and
the host activity in primary display gets the focus instead. This
happens because WM's TaskTapPointerEventListener.onPointerEvent()
is called on the default display only.
Root cause:
1. Tap detector isn't registered for non-default display.
2. Tap detector has no info on which displayId touch was received.
3. InputFlinger doesn't deliver InputMonitor events for
non-default displays (fixed in a separate CL)
Fixing above results in onPointerEvent(MotionEvent) to deliver the
Touch events successfully to VD. We restrict these changes to physical
multi-displays and VR VirtualDisplays (which uses virtual touch device).
[VrManagerService calls WMInternal.setVr2dDisplayId(int)]
In future, displayId should be part of InputEvent. Bug: 64258305
Bug: 62033391
Test: bit FrameworksServicesTests:com.android.server.wm.DisplayContentTests
Change-Id: I3626f4de5aa9bcf905da9abd39f3ab1baefc4c48
ExifInterface reads the first 5000 bytes of an image file to
determine what type of image it is, and throws an EOFException
if the file is smaller 5000 bytes. This CL removes the throwing
action.
Bug: 64133582
Test: Run ExifInterfaceTest.java with <5kb file
Change-Id: I2b2026f06d70a4fe2986d2e8c410679ba9bf3f7f
Limitation: When two apps make sound simultaneously while one uses a BT
route and the other uses the default route, switching activities between
the two different apps will not change the BT A2DP status until one of
the apps changes its playback status to inactive.
Bug: 32958908, Bug: 35567695, Bug: 33186346
Test: Passed MediaRouter/MediaSession test, and manually varified that
the b/33186346 is fixed.
Change-Id: I1da97dcb74fa2095425b311ad62cdd00f8118cea
(cherry picked from commit b3658569e9)