8036 Commits

Author SHA1 Message Date
Lajos Molnar
b1a236b85f add utility methods to util.Range, Rational and Size
Bug: 12065651
Bug: 11990470
Change-Id: I0d0929ea0289ac5de5c17cca90f25abc4e9dfd7a
2014-07-12 14:12:27 -07:00
Robert Shih
f79c22eb2c Merge "MediaRecorder: use fd from RandomAccessFile" 2014-07-11 23:25:18 +00:00
Robert Shih
0d5d3b7cc8 MediaRecorder: use fd from RandomAccessFile
Use RandomAccessFile instead of FileOutputStream so the underlying fd
is opened O_RDWR; O_RDWR is needed for mmap calls in the native webm
writer.

Change-Id: I444cbf40add96bc05905369ae2fa2b5446b0f9cc
2014-07-10 17:06:33 -07:00
Robert Shih
bef45561b0 Merge "MediaPlayer: added getSelectedTrack" 2014-07-10 20:49:26 +00:00
Chong Zhang
94686d13ca MediaCodec: change onError cb to send CodecException
Bug: 11990118
Change-Id: I8b6112f126c2f473f64e2aad6ffcfbc3f1d6e64a
2014-07-11 19:42:55 -07:00
Lajos Molnar
d4023114e8 MediaCodec: add new buffer and format APIs
Bug: 14562236
Bug: 14297827
Bug: 13008204
Bug: 10706245
Bug: 10672559
Bug: 9175531

Change-Id: Ia94d34f625e532619a9ed344eb27e0d26647982f
2014-07-12 01:43:56 +00:00
Robert Shih
464da703ca MediaPlayer: added getSelectedTrack
Change-Id: Ic39b9b3d5e72e13452320a0272deb489a0285913
2014-07-10 20:32:37 -07:00
Lajos Molnar
60fde9d254 media: add crop rectangle to Image
Bug: 10706245
Change-Id: I9c9150bdef418fd96228addaa7c35f16e5e1ccff
2014-07-12 01:04:03 +00:00
Lajos Molnar
82fa0e7f78 MediaCodec: update documentation on buffer metadata.
- Deprecated BUFFER_FLAG_SYNC_FRAME (as it actually marks key
  frames).
- Clarified that BUFFER_FLAG_KEY_FRAME is used for encoded output
  buffers.
- Clarified that presentationTimeUs is not an actual render
  timestamp (as opposed to releaseOutputBuffer's render timestamp).

Bug: 12006531
Change-Id: Ia27b9f606a9d7eef9c0c2900cd864a4421c7cf31
2014-07-11 15:43:36 -07:00
Chong Zhang
8d5e556b2b MediaCodec async callbacks
Bug: 11990118

Change-Id: I210d4302e1fd7e1a48d2228fd3f4f20c16b18a75
2014-07-11 11:53:03 -07:00
Jean-Michel Trivi
998ff75484 fix build: hide AudioAttributes.usageToString() method
Change-Id: I1041d9bf530df45878dd61e30e32f5a2f4f9d1a1
2014-07-11 10:01:00 -07:00
Jean-Michel Trivi
a8b6bd88cf Define audio policy, mixes, and mixing rules
An AudioMixingRule is a collection of AudioAttributes and match/exclude
   rules.
An AudioMix is defined by its AudioMixingRule, AudioFormat and
   routing flag.
An AudioPolicyConfig is a collection of AudioMix and is
   parcellable.
An AudioPolicy has an AudioPolicyConfig, and
   can be registered/unregistered through AudioManager.

bug 16009464

Change-Id: I01bf95d014967f48ba823648ea897779da099e5d
2014-07-11 09:10:46 -07:00
Dongwon Kang
1f213914c4 Support multiple tracks in TV Input framework.
Added API: getTracks/selectTrack/unselectTrack/onTrackInfoChanged
(onVideo/Audio/ClosedCaptionStreamChanged callbacks are removed in favor of onTrackInfoChanged)
Use cases: audio and closed caption track selection
Background: go/tif-multi-track

Bug:14073704, Bug:14121898, Bug: 16049453
Change-Id: I199ed16f690d4e757da0bb30c8bc8222a6fa1d7a
2014-07-11 18:46:25 +09:00
Jungshik Jang
6f34f5ab8a Revamp HDMI-CEC system audio mode integration with audio service.
In previous change we use setForceUse(FORCE_MEDIA, XXX) method
in order to set specific audio output type, such as LINE, HDMI_ARC,
and SPDIF. But it turns out that it conflicts with bluetooth
a2dp which uses the same setForceUse(FORCE_MEDIA, yyy).

This change is based on several conditions.

1. When other non-speaker devices are on, prevent system audio
   from turing on.
2. In order to keep track of other devices' connectivity and to
   turn off system audio if other device like bluetooth or
   headphone preempts current output, register OnAudioPortChangeListner
   to audio manager.
3. All possible system audio outputs can be merged with other
   outputs without priority.

Change-Id: Id4e47d99db64b9f77a17c2c28c47787ab8980bf7
2014-07-11 08:07:12 +09:00
Erik Pasternak
b2e93efcac Revert "Make PlaybackState immutable with a builder"
Will resubmit tomorrow for Build Breakage Friday as this change needs new SDK prebuilts for unbundled app branches.

This reverts commit aa746b27610680a2c0fbdf7d81a6455c4597f05e.

Change-Id: I28ba7e1b09234a5eb1b725aed043b9de98e1bc16
2014-07-10 22:51:34 +00:00
RoboErik
5a4e011143 Make PlaybackState immutable with a builder
bug:15862252
Change-Id: I8944b7753cd6a36a74b0091f71a386f77040c4ab
2014-07-10 22:39:03 +00:00
John Spurlock
cd22c3ec53 Merge "Volume: allow dialog to play sound over keyguard." 2014-07-10 00:46:47 +00:00
John Spurlock
6bd096c8d6 Volume: allow dialog to play sound over keyguard.
Now that we are allowing the volume dialog above the keyguard,
the old suppression rule does not apply.

Bug:16186697
Change-Id: I071f1a2856850218e267d1fbaf547db44b644382
2014-07-10 09:39:04 -04:00
RoboErik
3c45c29109 Pipe volume keys to adjustVolume instead of sendMediaKeyEvent
We were calling sendMediaKeyEvent with a KEYCODE_VOLUME key, which was being
ignored because it's not a media key. This redirects the volume keys to use
the adjustVolume methods instead. It also sends the appropriate flags to
make the lock screen consistent with the home screen and the volume keys
only affect active playback when the screen is off.

bug:15900519
Change-Id: I9f3853a2385869353a58debae6e6ca9933ba06ce
2014-07-10 16:15:45 +00:00
Andy Hung
285fa63c61 Add MediaCodec.CodecException
Also clarify MediaCodec exception handling in documentation.

Bug: 12034929
Change-Id: Ie82a15cc6ee4b772191edaf128823487cad00d0a
2014-07-10 03:32:42 +00:00
Andy Hung
806114bc6f Add float support to ByteBuffer AudioTrack write
Change-Id: I887b944ea40966b9849bd08c093994049671c9b4
2014-07-09 17:48:24 +00:00
Terry Heo
0543b17e84 Merge "AudioSystem: add definition for loopback input device" 2014-07-02 20:35:42 +00:00
Terry Heo
112c19ee8b AudioSystem: add definition for loopback input device
Bug: 15437484
Change-Id: I91d88d476693e9b9a72799f3c52a659a5843e446
2014-07-07 11:34:25 +09:00
Dongwon Kang
b93ccca613 Add onChannelRetuned callback in TV Input Framework.
Use cases:
  - Channel change from STB which is bound to a TV input.

Bug: 14126559
Change-Id: Icddab61be6cb11162c03960fdb41fee8504bcd61
2014-07-08 14:46:20 +09:00
John Spurlock
ae641c9ccd Implement new volume UI design.
- Add segmented zen-mode picker to the rocker UI.
- Add a new "no interruptions" value to the zen setting.
- Implement expandable condition subpanel on the rocker UI.
- Remove the old circle&slash icons.
- Suppress alarm sounds if in "no interruptions" mode.
- Add warning re: alarms to the condition UI.
- Allow rocker UI to display over the keyguard.
- Remove Notifications QS tile.
- Realign volume rocker to the top of the screen.
- Add support for new "days" sleepMode.
- New icon policy rules for "volume" slot.
- New important icon (star).

Associated Settings change:
  I6ed56791784968adfbd684f490dbbebed285a2dd

Bug:15831713
Change-Id: I35afe38646f04d2ba0dbac11c2c6356120a33694
2014-07-07 18:48:25 -04:00
Mike Reed
42a1d08df7 SkBitmap::Config is deprecated, use SkColorType
Change-Id: Ida181d2aac760072cf2d01409edac37699dea216
2014-07-07 18:11:24 -04:00
Zhijun He
d1988a98ed Add RAW10 image format
- Add RAW10 format in ImageFormat
- Add ImageReader support for this format

Bug: 15989722
Change-Id: Ic38ae596d5a472e990389d1fa221a82bea97b715
2014-07-07 08:01:06 -07:00
Jean-Michel Trivi
50f45d0185 Merge "AudioDevice class to expose concept of device in SDK" 2014-07-02 18:22:50 +00:00
Jean-Michel Trivi
3ef1812272 AudioDevice class to expose concept of device in SDK
Change-Id: I94c87e98061581a767d775f64dd6bd9a1f9956e1
2014-07-02 21:12:18 +00:00
Jean-Michel Trivi
6c09004ec0 Send media button events with FLAG_RECEIVER_FOREGROUND set
bug 11357318

Change-Id: Iccd000bebb31a2f6cb057e97d3ab276861d0b651
2014-07-02 21:10:43 +00:00
Jae Seo
6e90e4ea4f TvContract: Add a field for network affiliation to the Channels table
This is used to identify a channel that is commonly called by its
network affiliation instead of the display name.

Bug: 15993156
Change-Id: Ib5a15e0e44e815c98b762573b5a24289a86f9583
2014-07-02 13:01:35 -07:00
Jungshik Jang
41d974631c Add volume callback for Hdmi-Cec system audio mode.
Hdmi-Cec's system audio mode delegates audio control to
audio receiver from tv. It requires to delegate
volume change including mute to audio receiver
instead of consuming by tv.
In order to do this this change introduces three apis.
One is added to IAudioService, the others are added
to IHdmiControlService as hidden apis.

 1. IAudioService#setHdmiSystemAudioSupported;
    This is to notify system audio mode change to audio
    service so that it determines to notify volume or mute
    change to HdmiControlService.

 2. IHdmiControlService#setSystemAudioVolume;
    This is to notify volume change to HdmiControlService.
    It's called only where system audio mode is on.

 3. IHdmiControlService#setSystemAudioMute;
    This is to notify volume change to HdmiControlService .
    It's called only where system audio mode is on.

Change-Id: I3d8534b37ddf1a812e32012059a8778772044bf0
2014-07-03 10:09:32 +09:00
Jungshik Jang
70d34bb485 Define force usage and category for System Audio Control.
This is to be sync with change of system/core/include/system/audio_policy.h

Change-Id: Ibd371197775fb70a96df6e3eef82ec8ae10b0508
2014-07-03 00:42:20 +00:00
Eric Laurent
7edabadf78 Merge "AudioManager: add isVolumeFixed() API" 2014-07-01 23:33:37 +00:00
Eric Laurent
ba207e76b2 AudioManager: add isVolumeFixed() API
Indicates if the device implements fixed volume policy.
In this case, volume control APIs are not operational.

Bug: 11430859.

Change-Id: Ia82bdfe5b38d6b2ce132f00a493e6a04cb794ea0
2014-07-01 19:03:04 -07:00
Marco Nelissen
a4d4c200e4 am 1ed64c65: am 899c15ef: am db816cef: Merge "Make sure we clean up"
* commit '1ed64c65a7b4d33799ca42cb4422d8382929cac2':
  Make sure we clean up
2014-07-01 18:28:56 +00:00
Marco Nelissen
1ed64c65a7 am 899c15ef: am db816cef: Merge "Make sure we clean up"
* commit '899c15ef2053f0cebfeda90b5211e80310e6f278':
  Make sure we clean up
2014-07-01 18:21:41 +00:00
Marco Nelissen
db816cef0d Merge "Make sure we clean up" 2014-07-01 14:59:07 +00:00
Santos Cordon
e19a4fe32f Merge "Move call-related SystemAPIs to TelecommManager. (1/3)" 2014-07-01 14:48:56 +00:00
Jean-Michel Trivi
8df982dfa5 Java MediaPlayer: add support for setting audio attributes
Change-Id: Ia638107a5e67c20c46c2f5f1800db9da57d6f698
2014-07-01 16:45:29 +00:00
Santos Cordon
9eb45934c5 Move call-related SystemAPIs to TelecommManager. (1/3)
Bug: 15672803
Change-Id: I46e448fe93a9c5b4ae013e8b2fd6f0ce89b94e69
2014-06-30 16:30:10 -07:00
Jeff Brown
8fef877310 Merge "Make MediaSessionToken an inner class of MediaSession." 2014-06-30 22:24:07 +00:00
Jeff Brown
dba34ba35c Make MediaSessionToken an inner class of MediaSession.
Also add some missing AIDLs to the framework makefile to ensure
they are included in the SDK.

Change-Id: If85a3091c7591e0b3bbe6cc4bb74aba2284b4f42
2014-06-30 16:05:25 -07:00
Dongwon Kang
b973baca3b Merge "Add a column to TV channel metadata to enable a newly requested use case" 2014-06-26 23:14:30 +00:00
Chulwoo Lee
9e4a5ac751 Add a method to build channels uri for genre
BUG: 14069779
Change-Id: Ic4aa0f6a1ef154d680a5540140958cf4e735257c
2014-06-30 06:11:33 +00:00
Paul McLean
fb917e019f Enabling USB Device and Android Device Vol inc/dec functionality for USB Audio Output
Bug: 13747844

Change-Id: Ia969dad4150adeafb375e3f9985f9d8ba7222638
2014-06-27 08:44:55 -07:00
Youngsang Cho
07b7c5fa4c Turn on/off an overlay view by visibility change in TvView
Bug: 15873405
Change-Id: I0e6db7fb61af6d79cbfc00cefddd8ba2a0a7ee7e
2014-06-27 16:21:07 +09:00
Dongwon Kang
2b53aae90c Add a column to TV channel metadata to enable a newly requested use case
conditional_access :
    Used to let user know this channel is scrambled by a conditional access
    system and need to contact the service provider to watch it.

Bug: 14073703
Change-Id: I62d744b92e31fbbb95ba10b2595686114f6fbb6f
2014-06-24 14:57:50 +09:00
Youngsang Cho
6d8a7d7009 Merge "Properly handle navigation keys in TIS" 2014-06-24 01:52:26 +00:00
Youngsang Cho
44fbbca354 Properly handle navigation keys in TIS
If the navigation keys are dispatched to an overlay view and
the overlay view has focusable views, the navigation keys should
be always handled.

Bug: 15174809
Change-Id: Ia7490880243342e08e4502644e1864e4c583ee1d
2014-06-25 17:33:55 +09:00