5725 Commits

Author SHA1 Message Date
Robert Carr
d5c7dd6da8 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.

For those following along in the revert Saga, this
also includes the follow up CLs to the original CL.
- Surface inset calculation
- Animation fixes.

The error causing the revert was an incorrect JNI signature
around deferTransactionUntilSurface. I've noted it inline.

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: Ie56b6f7ab16f32d7fc459b8eba26594337ad55de
2017-03-08 17:36:10 -08:00
Andy Hung
8810e9c0bc Merge "VolumeShaper: Update Builder methods and Object overrides" 2017-03-09 00:31:23 +00:00
Andy Hung
d4f1e86190 VolumeShaper: Update Builder methods and Object overrides
Builder methods now throw IllegalArgumentExceptions on invalid
conditions.

Object hashCode, toString, equals updated for element-wise structural
equivalence.

Test: CTS VolumeShaperTest
Bug: 31015569
Change-Id: I02860a51da58d8207145a9b8a5d2cb13806774b4
2017-03-08 10:52:26 -08:00
ZhiWei Chen
b95d7b5af4 AC3/EAC3 MaxInputChannelCount support
bug: 33972143
Change-Id: I63b6d5f8dcb66734ce0bd640febd91fb40bda333
2017-03-08 17:48:19 +00:00
Wonsik Kim
5aec7b9031 Revert "Modify SurfaceView to use SurfaceFlinger child surfaces."
This reverts commit cd4aeef88052571365d4e193a2c41e2e6d145491.

Bug: 36027342
Bug: 36015884
Change-Id: Ifd5b69caf64d65a8cd6570b7fe1fb6abe90e30b8
2017-03-08 01:52:19 +00:00
Hyundo Moon
e0c121a4b7 Merge "Modify JavaDoc of MediaBrowserService.getBrowserRootHints" 2017-03-05 14:18:12 +00:00
TreeHugger Robot
f1e54c9a1c Merge "Modify SurfaceView to use SurfaceFlinger child surfaces." 2017-03-03 22:45:24 +00:00
Robert Carr
cd4aeef880 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.

For those following along in the revert Saga, this
also includes the follow up CLs to the original CL.
- Surface inset calculation
- Animation fixes.

The error causing revert was a deferTransactionUntil(-1)...-1
cast to uint, defer transaction until MAX_UINT.

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: Ib37236950a1dd3c4f9f4b58fd41ef9003c0557ef
2017-03-03 13:06:59 -08:00
Paul Mclean
bfde1bea54 Merge "nativemidi: Prototype demonstrating native access to IMidiDeviceServer" 2017-03-03 20:51:48 +00:00
Mikhail Naganov
c276c59eb5 nativemidi: Prototype demonstrating native access to IMidiDeviceServer
Framework changes and a demo app
Comment and finalized Native MIDI API
Replaced fixed PortRegistry tables with std::map.
more error handling.
Removed not-very-useful MidiDeviceManager class.
Made Java API functions @hide.

Bug: 30252756

Test: Manual
Change-Id: Iae98e589f38ef6d625ff0842401193fe98c5d881
2017-03-03 12:00:33 -07:00
Hyundo Moon
0e6215391d Modify JavaDoc of MediaBrowserService.getBrowserRootHints
The method MediaBrowserService.getBrowserRootHints can be called
inside of onSearch(), but the JavaDoc does not mention it.
This CL adds this information in the JavaDoc.

Test: Called getBrowserRootHints inside of onSearch method.
Change-Id: If82a371c8d06aab396e29141827c8991cff2cd3e
2017-03-03 13:24:53 +09:00
Rob Carr
2ff633cbc3 Merge "Revert "Modify SurfaceView to use SurfaceFlinger child surfaces."" 2017-03-03 01:19:08 +00:00
Jeff Tinker
3896db1475 Revert "Modify SurfaceView to use SurfaceFlinger child surfaces."
This reverts commit 693f3432ae77d1fcfaaf9d168de861192aacb4c4.

P0: When playing encrypted content the Fugu displays a blank screen.

Test: with topic "surfaceview-without-wm" reverted, encrypted playback
works on ToT oc-release. See repro steps in 35917840#12.

bug:35917840

Change-Id: I37fa1e427daff3a1c18ed1c92d035421d891f67c
2017-03-03 00:48:00 +00:00
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