4124 Commits

Author SHA1 Message Date
Dongwon Kang
d2ed690187 MediaSessionManager: make the binder implementation static
Removing references to application resources on unregistering so that they
can be GCed as ealry as possible.

Bug: https://code.google.com/p/android/issues/detail?id=161398
Change-Id: Icc083f4a58bb5e738aa662247dc83d021a9dc5c3
2015-07-07 11:40:51 -07:00
Jean-Michel Trivi
760b1409bc Merge "Ringtone: add support for volume control and looping" into mnc-dev 2015-07-06 23:07:26 +00:00
Jean-Michel Trivi
462045e89a Ringtone: add support for volume control and looping
Bug 22182606

Change-Id: Ied910b9fe02a5da9c4822a107ee884677c8b4991
2015-07-06 10:06:02 -07:00
Ronghua Wu
e0b71b4ef7 Merge "media: clean up the usage of max-supported-instances." into mnc-dev 2015-07-01 04:00:23 +00:00
Ronghua Wu
71b5a5866d media: clean up the usage of max-supported-instances.
Bug: 22089269
Change-Id: I05ab49c8b5aaaa0adb6c1a5a1f7af33e6abc5b91
2015-06-29 17:07:12 -07:00
Jean-Michel Trivi
560877d498 Volume change intent carries stream alias
Define a new extra, AudioManager.EXTRA_VOLUME_STREAM_TYPE_ALIAS, to be
  sent along with the volume change intent, VOLUME_CHANGED_ACTION.
When sending VOLUME_CHANGED_ACTION, attach the stream type alias.

Bug 17955277

Change-Id: I04fd279e223504e3ee1581086d7e9205344a6808
2015-06-29 10:44:16 -07:00
Eric Laurent
5da8ed1623 Merge "AudioManager: optimize audio port listener registration" into mnc-dev 2015-06-26 17:43:03 +00:00
Eric Laurent
c573bc5d3d AudioManager: optimize audio port listener registration
In order to reduce the number of binder calls, only install an
audio port callback in a client process if either:
- an audio port related API has been called once
- an audio port listenr has been registered.

Bug: 22045560.
Change-Id: I0e5cf31bec0c986d6f7761891b860ba6fadd2f4c
2015-06-26 10:01:12 -07:00
Ronghua Wu
826bf9b63f Merge "media: parse max-concurrent-instances." into mnc-dev 2015-06-25 22:15:06 +00:00
Ronghua Wu
cf6a4ba5a4 media: parse max-concurrent-instances.
Bug: 22089269
Change-Id: I2b0af7c5c6a309c8396b595ea54b899451239b18
2015-06-25 14:13:40 -07:00
Jae Seo
1d462aa6f8 Merge "TIF: Always invalidate the session callback when resetting TvView" into mnc-dev 2015-06-23 21:28:00 +00:00
Jae Seo
3612821003 TIF: Add more description to the poster art and thumbnail columns
Bug: 21971851
Change-Id: Ibffc42060281d1a9fe1bd83b24f33c6ac19d0afa
2015-06-23 11:27:09 -07:00
Zhijun He
2bfdff4a46 CamcorderProfile: clarify the high speed profile semantics
Bug: 21442271
Change-Id: I61da855d8f260c5b7ff8a3efd6fab6d6dedd4e2b
2015-06-23 10:18:31 -07:00
Jae Seo
b1ae00ec62 TIF: Always invalidate the session callback when resetting TvView
Bug: 20060638
Change-Id: If743eaa025e9bb5bc580d50697f9f20ff9d0fe0a
2015-06-23 02:53:37 -07:00
Jae Seo
37099a082f Merge "TIF: Minor code improvement" into mnc-dev 2015-06-22 01:18:07 +00:00
Jae Seo
777718220c TIF: Use equals() instead of '==' for String comparisons
Change-Id: Iea6e3d5f5146e2e3a37c52db5a0a9706540ddb23
2015-06-21 17:39:02 -07:00
Jae Seo
6e4cbfd2e5 TIF: Minor code improvement
- Removed unnecessary 'final' keywords for private methods
- Removed unnecessary interface modifiers
- Added a missing ‘final’ keyword
- Simplified if statements
- Removed Javadoc links pointing to itself
- Removed redundant conditional expressions
- Removed unnecessary return statements
- Replaced explicit types with <>
- Removed an unnecessary unboxing
- Removed a redundant initializer
- Fixed typos

Change-Id: I1d137fda70192b33dd00e92ab01396519135ab39
2015-06-21 17:09:04 -07:00
Jae Seo
a5103b9b52 Merge "TIF: Add the columns for the app-linking to TvContract.Channels" into mnc-dev 2015-06-21 21:27:41 +00:00
Jae Seo
6185858bd9 Merge "TIF: Add COLUMN_SEARCHABLE to TvContract.Programs" into mnc-dev 2015-06-21 20:48:27 +00:00
Jae Seo
99a242c363 Merge "TIF: Always flush pending app-private commands when resetting TvView" into mnc-dev 2015-06-21 20:47:16 +00:00
Jae Seo
40c5c7dcdc TIF: Fix a typo
Change-Id: Iae3b359369a86224767493149b11d83ba2810ec5
2015-06-21 00:47:43 -07:00
Jae Seo
4cd54dda7b TIF: Remove unnecessary interface modifiers
Change-Id: I6b0744b32207bece45bc7ac6bee279b244f8cd3b
2015-06-21 00:45:04 -07:00
Jae Seo
5ea221b989 TIF: Replace StringBuffer with String
Change-Id: I52f7d7cc8af7d230d6a23993391f662542886f37
2015-06-21 00:17:23 -07:00
Jae Seo
1734507286 TIF: Always flush pending app-private commands when resetting TvView
Bug: 19809952
Change-Id: Ic676b81591def065d79ac45cb1d247b67178e50b
2015-06-20 23:02:29 -07:00
Jae Seo
546ef567b8 TIF: Add COLUMN_SEARCHABLE to TvContract.Programs
This allows applications to specify not only channels but also programs
searchable or not enabling finer grained access control.

Bug: 18910284
Change-Id: Id476c37ae8521301c50a4fb2007b41661e74fe89
2015-06-19 23:47:48 -07:00
Robert Shih
1b98ab3328 Merge "MediaPlayer: documentation for error/info codes." into mnc-dev 2015-06-19 23:49:55 +00:00
Robert Shih
706ebb3ad7 MediaPlayer: documentation for error/info codes.
Documented in this change:
MEDIA_ERROR_SYSTEM, and
MEDIA_INFO_NETWORK_BANDWIDTH

Bug: 18237764
Change-Id: I0e1efb5813ab0f65133d4119de7562912947c41d
2015-06-19 16:47:58 -07:00
Jae Seo
81c754a54a TIF: Add the columns for the app-linking to TvContract.Channels
The app-linking allows channel input sources to provide activity links
from their live channel programming to another activity. This enables
content providers to increase user engagement by offering the viewer
other content or actions.

Bug: 21884742
Change-Id: Iabeea57884c63ac31ee164c27c6e2fe1860f15f6
2015-06-19 15:04:28 -07:00
Jeff Tinker
969a06475c Merge "Improve robustness of MediaDrm after mediaserver crash" into mnc-dev 2015-06-19 16:05:13 +00:00
Mike Lockwood
3c525c15cb Merge "Fix MidiDevice.MidiConnection lifecycle" into mnc-dev 2015-06-18 21:13:28 +00:00
Mike Lockwood
2aef7e3559 Fix MidiDevice.MidiConnection lifecycle
Update device server's MidiDeviceStatus when a connection is made to one of its output ports.

After connecting an input port to an output port using MidiDevice.connectPorts(),
do not call IMidiDeviceServer.closePort() until MidiDevice.MidiConnection.close() is called.

While I was in there, added missing CloseGuard support to the MidiDevice.MidiConnection class.

This fixes a problem resulting in UsbMidiDevice closing the device's ALSA driver too soon.

Bug: 21850709

Change-Id: I0c120f76b42eec8a143161e46dba73fbec5e4f31
2015-06-18 12:31:40 -07:00
Dongwon Kang
c7c12e5639 Merge "Make MediaSessionService not blocked by AudioService." into mnc-dev 2015-06-17 23:51:23 +00:00
Dongwon Kang
a38e1f4ed9 Make MediaSessionService not blocked by AudioService.
Backgroud: As noted in b/20823981, MediaSessionService calls some
audio service methods while holding a lock and the audio service
methods also talk to other system services. And, deadlock happens when
the other system service fires another request to MediaSessionService
while holding its lock.

Example1) --- resolved by the change in MediaSessionRecord.java
T1: MediaSessionService.dispatchAdjustVolumeLocked()
     -> MediaSessionRecord.adjustVolume()
       -> +++AudioServiceInternal.adjustSuggestedStreamVolumeForUid()+++
         -> AudioService.adjustSuggestedStreamVolume()
           -> telecom.TelecomManager.isInCall() --- blocked by lock in TelecomManager.
T2: telecom.ConnectionServiceWrapper.handleCreateConnectionComplete()
     -> MediaSession.setActive()
       -> MediaSessionRecord$SessionStub.setActive()
         -> MediaSessionService.updateSession() --- blocked by lock in MediaSessionService.

Example2) --- resolved by the change in IAudioService.aidl
T1: MediaSessionService.dispatchAdjustVolumeLocked()
     -> IAudioService.adjustSuggestedStreamVolume()
       -> AudioService.adjustSuggestedStreamVolume()
         -> telecom.TelecomManager.isInCall() --- blocked by lock in TelecomManager.
T2: telecom.ConnectionServiceWrapper.handleCreateConnectionComplete()
     -> MediaSession.setActive()
       -> MediaSessionRecord$SessionStub.setActive()
         -> MediaSessionService.updateSession() --- blocked by lock in MediaSessionService.

Here, this change prevents the deadlock by making related audio IPC oneway
and calling the internal audio method without holding the lock.

Bug: 20823981
Change-Id: I4c4b2fc796f23d83be67f7edaacd7496c145d985
2015-06-17 15:37:50 -07:00
Andy Hung
90b3b93de4 Merge "AudioTrack.Builder should throw exception on failure." into mnc-dev 2015-06-17 19:21:53 +00:00
Andy Hung
a56eadb273 Merge "AudioRecord.Builder should throw exception on failure." into mnc-dev 2015-06-17 19:18:17 +00:00
Jeff Tinker
314b7f3af3 Improve robustness of MediaDrm after mediaserver crash
If DEAD_OBJECT is returned from binder calls due to
mediaserver crash, throw new MediaDrmResetException.
This allows the app to detect the condition and handle
it properly.

bug: 20614102
Change-Id: Id08b08fb612672fd94383f0470f5fa3f267b944f
2015-06-17 09:32:58 -07:00
Andy Hung
2d2d89363f AudioTrack.Builder should throw exception on failure.
Should throw UnsupportedOperationException instead of returning
an uninitialized track object.

Bug: 21890643
Change-Id: I34df73b316fcb490be05eb3beff06b795645fd4c
2015-06-17 08:43:43 -07:00
Andy Hung
e244922aba AudioRecord.Builder should throw exception on failure.
Should throw UnsupportedOperationException instead of returning
an uninitialized record object.

Bug: 21890643
Change-Id: I9c05a4cff9f5e1d5513c76acace09699a567008f
2015-06-17 08:40:53 -07:00
Paul McLean
8ff232c7be Merge "Implement channel index masks in AudioDeviceInfo." into mnc-dev 2015-06-16 21:41:23 +00:00
Paul McLean
f29e5f34b3 Implement channel index masks in AudioDeviceInfo.
Bug: 21146646
Change-Id: I210f6bb4a4ec0ac0820d1823cffe417141725327
2015-06-16 14:40:28 -07:00
Daichi Hirono
660727c79e Fix API doc of MtpDevice#getObjectHandles.
BUG=21782579

Change-Id: Iadec8923c74f62b7aed44e876fb469b41c7dc59b
2015-06-15 03:34:28 +00:00
Paul McLean
7d4412255b Merge "Fixing no first "device added" notification." into mnc-dev 2015-06-12 22:07:49 +00:00
Paul McLean
cbeb8a2a3e Fixing no first "device added" notification.
bug: 21674851

Change-Id: I3b2ed1cf00342471a5c70f2aecc832480d7e06fd
2015-06-12 15:00:16 -07:00
Mike Lockwood
d5ca05c3dd Merge "MidiDeviceServer: Fix race condition in setting device server's mDeviceInfo" into mnc-dev 2015-06-12 21:51:39 +00:00
Nick Chalko
1bccd280f5 Improve javadoc for onTune and notifyVideoAvailable.
Bug: 21276782
Change-Id: If445379e83dbde8daaa4be7819b9399bfe1d96a0
2015-06-12 10:52:38 -07:00
Mike Lockwood
acd4321872 MidiDeviceServer: Fix race condition in setting device server's mDeviceInfo
This made it unsafe to open ports on a device from the MidiManager onDeviceOpened callback

Bug: 21760692
Change-Id: I536acdf574a3ccecdb66a8fde87089538e8bb1ef
2015-06-11 13:28:36 -07:00
Lajos Molnar
1c436bd911 media: allow feature-can-swap-width-height to be optional.
We have enabled this only optionally in media_codecs.xml

Bug: 21568607
Change-Id: I11a12883afc051ba8c479255acc59388fb9a6722
2015-06-10 20:54:53 -07:00
Dongwon Kang
9d543ebfea Merge "TIF: Support localized input label for hardware input" into mnc-dev 2015-06-11 03:44:06 +00:00
Jeff Brown
f880553309 Merge "Fix MediaBrowser.getItem() API inconsistencies." into mnc-dev 2015-06-11 03:40:35 +00:00
Jeff Brown
b7eff8828f Fix MediaBrowser.getItem() API inconsistencies.
Bug: 21668207
Change-Id: Idc8d3a079f66cc7bc4fa1016f84cddb26fe7f0f8
2015-06-10 20:06:24 -07:00