5762 Commits

Author SHA1 Message Date
Ray Essick
72a489c035 Merge "Javadoc for the recently added getMetrics()" 2017-03-02 23:04:03 +00:00
Ray Essick
f0f6685eeb Javadoc for the recently added getMetrics()
Add javadoc comments for the getMetrics() functions that
we've added to android.media.Media{Codec,Extractor,Player}.
This describes the currently implemented functionality.

Bug: 35096098
Test: Compilation
2017-03-01 17:23:48 -08:00
Rob Carr
0e06ccf488 Merge "Modify SurfaceView to use SurfaceFlinger child surfaces." 2017-03-01 17:49:27 +00:00
TreeHugger Robot
fe25c7ea57 Merge "TIF: add WatchNextPrograms in TvContracts" 2017-02-28 23:14:57 +00:00
Hassan Shojania
cb9fe89197 Merge "Earlier processing of DrmInfo notification" 2017-02-28 21:22:00 +00:00
Dongwon Kang
77dde67d64 Merge "TIF: make Channels.COLUMN_BROWSABLE visible" 2017-02-28 20:36:44 +00:00
Dongwon Kang
5fecfb37e3 TIF: add WatchNextPrograms in TvContracts
Test: cts-tradefed run cts -m CtsTvTestCases
Bug: 35723325, Bug: 35724854
Change-Id: I3e476c514c73aa90fa20065e10202c2e363d5612
2017-02-28 11:04:10 -08:00
Hassan Shojania
8606c335c3 Earlier processing of DrmInfo notification
Bug:  35681236
Test: Manual through the test app
Change-Id: I652e3c9742d7c55ab639c9df3ed1e6a0e035e6a4
2017-02-28 09:54:23 -08:00
Robert Carr
693f3432ae Modify SurfaceView to use SurfaceFlinger child surfaces.
Here we have SurfaceView bypass the WindowManager and speak
directly to SurfaceFlinger using child surfaces. We also
implement some logic in the WM to handle child surfaces
in various Surface replacement scenarios.

Bug: 28858420
Bug: 31518219
Bug: 34888808
Bug: 35588318
Bug: 35396882
Test: Existing tests still pass (except for the ones that don't and will be deleted).
Change-Id: Icb7259365b51ebe8c7f6c7cd4f9ba29f9fce08a4
2017-02-28 09:39:07 -08:00
Jaewan Kim
158cd7b1f2 Merge "Add callback for AVRCP 1.6 support" 2017-02-28 06:19:49 +00:00
Chong Zhang
c3013b5bda Merge "MediaCas: move *.aidl files from frameworks/base to frameworks/av" 2017-02-28 05:02:23 +00:00
Jaewan Kim
bd16f457a1 Add callback for AVRCP 1.6 support
Bug: 33828042
Test: Build
Change-Id: Iaf5cecfa38065cfeed096929952559d7cb2e248b
2017-02-28 04:29:38 +00:00
Jaewan Kim
98003d36dd Send long-press of KEYCODE_HEADSETHOOK to the media key listener
For the key events with the code KEYCODE_HEADSETHOOK, the
MediaSessionService always starts the voice input for long-presses
regardless of the media key listener, and only short-presses can be sent
to the media key listener.

This CL sends all media key events to the media key listener first
if the listener is set. If the key event isn't consumed, short-presses
will be sent to the media session and long-presses will start the voice
input.

Bug: 35348856
Test: Manual test (Install the OnMediaKeyListener test app and confirm
that the app can consume the media key long-press)
Change-Id: I82f8e5f355efe16867e6f4345c46470c690e1f80
2017-02-28 02:51:47 +00:00
Jean-Michel Trivi
34a6663d08 Merge "Audio focus API with AudioAttributes and more options" 2017-02-28 01:57:15 +00:00
Chong Zhang
c1e701d03f MediaCas: move *.aidl files from frameworks/base to frameworks/av
PDK builds can't reference frameworks/base from frameworks/av.

bug: 22804304
Change-Id: Ibcda0b6a56e36233ad37c2d5d2b03d5c58674010
2017-02-27 16:09:23 -08:00
Jean-Michel Trivi
3db31acf93 Audio focus API with AudioAttributes and more options
Wrap all options of an audio focus request into a new
 class, AudioFocus request, and the corresponding
 methods in AudioManager to request and abandon focus
 with an AudioFocusRequest instance.
New options include handler for focus change listener,
 delayed focus, and option for specifying pause behavior
 on duckable transient loss of focus.

Test: cts-tradefed run cts -m CtsMediaTestCases -t android.media.cts.AudioFocusTest
Bug: 30258418

Change-Id: I99151270d0d9c59595db3f5c91480c7af2d1fd71
2017-02-27 15:55:57 -08:00
TreeHugger Robot
321ea18167 Merge "media: Add more detail for the use of metadata track." 2017-02-27 20:40:17 +00:00
Dongwon Kang
3bfdf8ddf7 TIF: make Channels.COLUMN_BROWSABLE visible
Test: cts-tradefed run cts -m CtsTvTestCases
Bug: 35249360
Change-Id: I16570f2432a4bf7b2b7c18edd3d2a461927453da
2017-02-27 11:34:28 -08:00
Hangyu Kuang
2563ddcca4 media: Add more detail for the use of metadata track.
Test: None as just documentation.
Bug: 28536560
Change-Id: Ie9a765b02fb304b16146c314eeb89758b9cd4a4d
2017-02-27 10:28:16 -08:00
Hangyu Kuang
cd923a219f media: Add new key for latency support
Test: NONE
Bug: 34221970
Change-Id: Id2d64f9be6bffaff1897079b5132388046882334
2017-02-27 18:10:17 +00:00
Andy Hung
fef734cec1 VolumeShaper: Use VolumeAutomation interface and unhide
Test: Ducking and CTS
Bug: 31015569
Change-Id: I21b77905e86bf336c05aad5378f33ff36a92b3b5
2017-02-24 19:12:50 -08:00
Andy Hung
7da0e98219 VolumeShaper: Remove PlayerProxy constructor
Use of the VolumeShaper through PlayerProxy requires system ids,
which is different enough from PlayerBase that we don't allow
direct construction.

Test: Ducking
Bug: 31015569
Change-Id: Ia98ec5396047ae39e78237bb7e485d07f2eb1efd
2017-02-24 19:12:35 -08:00
Conrad Chen
be339625a8 Merge "Add TvProvider methods to get and add columns" 2017-02-25 00:18:04 +00:00
Conrad Chen
b842f4449a Add TvProvider methods to get and add columns
Test: gts-tradefed run gts -m GtsTvTestCases
Bug: 34684896
Change-Id: If284879a96199d26063312e2af7401c9a9066cea
2017-02-23 14:51:39 -08:00
Chong Zhang
15d10517cf Merge "MediaCas: add framework APIs" 2017-02-23 22:36:22 +00:00
TreeHugger Robot
212b51422d Merge "PlayerBase: reference to IAppOpsService may be null" 2017-02-23 20:54:06 +00:00
Jean-Michel Trivi
0fbcb86389 PlayerBase: reference to IAppOpsService may be null
The reference to IAppOpsService may be null for a player
  that failed to be initialized correctly, account for this.

Test: see bug
Bug 35415129

Change-Id: I9da40b87736a7890fcb63640eeabd17d0da3d5d3
2017-02-23 10:21:17 -08:00
TreeHugger Robot
4bc511cb66 Merge "VideoView: option for audio focus, support for AudioAttributes" 2017-02-23 04:37:54 +00:00
TreeHugger Robot
798cccb659 Merge "Don't copy ringtones when profile sync goes off" 2017-02-23 04:21:39 +00:00
Robin Lee
7af9a74431 Don't copy ringtones when profile sync goes off
Experimentally, it makes more sense to more people to have the parent
setting as an overlay not a concrete thing.

Test: make cts -j30 && cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test 'com.android.cts.devicepolicy.ManagedProfileTest#testRingtoneSyncAutoDisableRingtone' </dev/null 2>&1
Bug: 34730524
Change-Id: I5f804713def9e54921b90e4f5cea742ba8aaa685
2017-02-23 02:47:24 +00:00
Chong Zhang
d5927ae883 MediaCas: add framework APIs
Java API changes to support MediaCas framework.

Also add partial-frame related enums to MediaCodec,
MediaCodecInfo, and MediaExtractor as a way to indicate
a input frame contains partial data.

Test: basic test app and test plugin to execise the code path;
impelenting playback of CAS-secured MPEG2TS streams, including
a Widevine-based CAS plugin, locally modified ExoPlayer and
Android TV Tuner input.

bug: 22804304
Change-Id: Ia4ba1d4046f7588e42bfb21e726390457d2fc8e3
2017-02-22 17:27:01 -08:00
Jean-Michel Trivi
0f49f82e97 VideoView: option for audio focus, support for AudioAttributes
Add API for VideoView to select whether it uses audio focus during
  playback, and how.
Add support for AudioAttributes

Test: cts-tradefed run cts -m CtsWidgetTestCases -t android.widget.cts.VideoViewTest
Bug 30955183
Bug 30258418

Change-Id: I581d32c79c78b8197ded2319e0d5bfdc35b93c5e
2017-02-22 12:04:24 -08:00
Conrad Chen
56b2dcd54f Merge "TIF: fix NPE caused by invalid component name" 2017-02-21 19:00:02 +00:00
Conrad Chen
735a8d8fe9 TIF: fix NPE caused by invalid component name
Fixes NPE caused by invalid component name in TvInputInfo.Builder

Test: bug fix
Bug: 29457556
Change-Id: I92a77777373669c893299eaad7367a68aa458156
2017-02-17 17:41:40 -08:00
TreeHugger Robot
8922f5dbcd Merge "Audio focus enforcement: use VolumeShaper for ducking" 2017-02-18 00:47:33 +00:00
Dongwon Kang
d66301f7e3 Merge "TIF: specify the type for COLUMN_INTERACTION_COUNT" 2017-02-17 23:07:40 +00:00
Ray Essick
8020105fb2 Merge "Metrics for android.media.MediaRecorder" 2017-02-17 22:39:40 +00:00
Dongwon Kang
f1f59ce91a TIF: specify the type for COLUMN_INTERACTION_COUNT
Test: documentation change.
Bug: 35217547
Change-Id: Ia693ebc1ad9029910cd91882a783edd15235073d
2017-02-17 10:44:39 -08:00
Conrad Chen
7a9e2fb857 Merge "TIF: Fix current position not reported issue" 2017-02-17 18:36:42 +00:00
Jean-Michel Trivi
dce82ab7bf Audio focus enforcement: use VolumeShaper for ducking
When ducking players, check whether their content type
  is speech, or the player is a SoundPool. If yes, do
  not enforce ducking and leave it to the app. Otherwise
  use a VolumeShaper to duck, and keep it in a list
  so it can be reused to unduck (by using the REVERSE
  operation).

Test: play a notification while an AudioTrack is playing
Bug 30258418

Change-Id: I7e0204ad38d4ef48e88ffc45533caccfc6e279b5
2017-02-17 10:08:53 -08:00
Conrad Chen
73d86e34bb TIF: Fix current position not reported issue
Fixes the issue that when current position or start position is 0,
TIF won't report TimeShiftCurrentPositionChanged() or
TimeShiftStartPositionChanged().

Test: bug fix
Bug: 32211561
Change-Id: I932d772850063f05fb8fc67a4b6bea7400b6443b
2017-02-16 17:01:18 -08:00
Dongwon Kang
4683b83c40 TIF: add PreviewPrograms
Currently, Programs class is being used for storing both linear
tv program and preview program. This change adds PreviewPrograms
class for clear separation.

Test: build and cts-tradefed run cts -m CtsTvTestCases
Bug: 34853064
Change-Id: I9789e0296941783c6096d1ff9a0d81e11370ab65
2017-02-16 23:23:04 +00:00
TreeHugger Robot
e6e61f2fd9 Merge "media: Update MediaMuxer Java doc to reflect new features." 2017-02-16 21:44:14 +00:00
TreeHugger Robot
f582d6c96e Merge "TIF: Add internal provider ID field to channels" 2017-02-16 21:03:26 +00:00
Hangyu Kuang
7e2f547da8 media: Update MediaMuxer Java doc to reflect new features.
Generated a table to summarizes the feature support in different API version
and containers. Features include: Muxing B-frame, 3GP container, multiple
video/audio tracks, metadata tracks.

Test: None as just documentation.
Bug: 28536560
Change-Id: I7ab883a46f4b3420542eae504a33d4ebe1176a65
2017-02-16 11:28:53 -08:00
Hassan Shojania
06b25fb236 Modular DRM for MediaPlayer
Bug:  34559906
Test: Manual through the test app
Change-Id: I1b1ca61e74f250d63ff5ff462905facb81fe44e0
2017-02-15 18:44:54 -08:00
Hassan Shojania
18d58d81b4 Merge "New setDataSource API for accepting cookies" 2017-02-15 23:03:02 +00:00
Conrad Chen
485c9f7ede TIF: Add internal provider ID field to channels
Test: build
Bug: 35101383
Change-Id: Ic725da964a287a2aa434998dd4e5879ea1f8e6bd
2017-02-15 13:23:18 -08:00
Conrad Chen
2e94d3e9fc Merge "TIF: Add browsable field to programs" 2017-02-15 19:15:22 +00:00
Hassan Shojania
a6c969c036 New setDataSource API for accepting cookies
Bug:    34736056
Test:   Manual through the test app
Change-Id: Ibd48d5e292dda490d9e4e4528589b2b7ba97a4b4
2017-02-15 10:02:01 -08:00