5652 Commits

Author SHA1 Message Date
Oliver Woodman
5f5ec7b8d5 Avoid unnecessary object allocation in CryptoInfo.set
This is causing a large number of unnecessary small object allocations
during encrypted playbacks, which presumably all need to be GC'd.

I wasn't sure whether the zero pattern should be static; that might
be objectionable in the platform (unsure?), since it would live
forever from the point of the class being classloaded. It doesn't
make much/any difference in practice in any case.

Test: Safe refactoring CL.
Change-Id: I9ee5fe284b0f854d672d83b97fc51116b0416f91
2017-03-29 19:08:40 +01:00
Jerry Zhang
e30d5723e4 Merge "Add support for MTP perceived device type property." am: b6ed343e85 am: 7644b885c7
am: 136f37b88f

Change-Id: I446cd52e5fd8cda48e9af46ee3faee5578cae286
2017-03-20 21:54:28 +00:00
Jerry Zhang
7644b885c7 Merge "Add support for MTP perceived device type property."
am: b6ed343e85

Change-Id: I58417625aa6c669eb82af3a11a4e35c77952f539
2017-03-20 21:39:17 +00:00
Conrad Chen
96f6a1a7d6 Merge "Block modifying types of channels" 2017-03-17 19:39:44 +00:00
Conrad Chen
fcc884005a Block modifying types of channels
The type of channels should not be changed once it's set.
Blocks this column from being modified.

Test: cts-tradefed run cts -m CtsTvTestCases
Change-Id: I9f7c99b4693db5553e85a1cab5cf1130425630c7
2017-03-16 11:49:01 -07:00
Ray Essick
5204ad0a2a Merge "Integrate API Council feedback into Media Metrics APIs" 2017-03-16 01:02:25 +00:00
Conrad Chen
287a68e62a Merge "Deprecate settingsActivity field in TvInputService" 2017-03-16 00:16:15 +00:00
TreeHugger Robot
32eb4602c1 Merge "AudioRecord: more information in text of IllegalArgumentException" 2017-03-16 00:10:33 +00:00
Ray Essick
f2d0e40bf0 Integrate API Council feedback into Media Metrics APIs
Integrates the API Council's feedback into the Media Metrics
related APIs.
-- return types for the getMetrics() calls
-- definition of keys in the set of data that comes back

Bug: 35811992
Test: booted, CTS subset, checked dumpsys media.metrics output
Change-Id: Ib750f9631bd3453be3132760273ccfff0a891f88
2017-03-15 11:43:08 -07:00
Jean-Michel Trivi
6b7a4f7b95 AudioRecord: more information in text of IllegalArgumentException
Add more debug information inside the IAEs thrown during
  audio parameter check.

Test: try invalid params for recording, read exception text
Bug: 34119793

Change-Id: Ic4f36fd6ef99c18107e3204ef5e25cc1bc9e704d
2017-03-15 10:40:08 -07:00
Shubang Lu
3ff3dde601 Merge "TIF: add cable detection for TV inputs" 2017-03-15 17:29:11 +00:00
TreeHugger Robot
42abe23ae3 Merge "Block modifying channel IDs of preview programs" 2017-03-15 02:34:02 +00:00
Conrad Chen
3f547dcce2 Deprecate settingsActivity field in TvInputService
Test: build
Bug: 27325064
Change-Id: Ieb38cc06f49b3944387ba4bbb11b953e35f06d89
2017-03-14 18:08:47 -07:00
TreeHugger Robot
6dbf377ef0 Merge "Update javadoc about TIS.onTimeShiftGetCurrentPosition" 2017-03-13 19:21:09 +00:00
Conrad Chen
4a6d31a8f3 Update javadoc about TIS.onTimeShiftGetCurrentPosition
Test: build
Bug: 31099933
Change-Id: Idc85d01b560cf8380473a0c9eb054f920864f91f
2017-03-13 10:34:24 -07:00
Shubang
71d5c76f19 TIF: add cable detection for TV inputs
Test: plug-in and unplug cable to TV and/or run VTS, or add fake
pass-through inputs (OTT devices).

Bug: 28715954
Change-Id: I4229a1a16a61218714e2cd620d1284f7ef8e5d7a
2017-03-13 10:28:09 -07:00
TreeHugger Robot
d6f4be8ee3 Merge "ExifInterface: Correct thumbnail compression info" 2017-03-13 02:54:15 +00:00
Paul Mclean
b8feaa5eaa Merge "Switching Native MIDI API to an "opaque pointers" model." 2017-03-11 17:49:22 +00:00
Hyundo Moon
61234d54c5 Merge "Throw IllegalStateException in MediaBrowser.search()" 2017-03-11 12:03:36 +00:00
Conrad Chen
51396777aa Block modifying channel IDs of preview programs
Test: cts-tradefed run cts -m CtsTvTestCases
Bug: 34466631
Change-Id: I9f16bfa23f6920292752465b40860b162fe9465e
2017-03-10 18:36:05 -08:00
Paul McLean
71f672b98a Switching Native MIDI API to an "opaque pointers" model.
Test: manual

Change-Id: Ic181008427e6e81106d867cc3a70deef8c591841
2017-03-10 15:54:16 -07:00
Jean-Michel Trivi
4856ae4d0b Merge "AudioFocusRequest.Builder build exception and focus request deprecation" 2017-03-10 22:34:07 +00:00
Jean-Michel Trivi
36bdb6627a AudioFocusRequest.Builder build exception and focus request deprecation
AudioFocusRequest.Builder.build() throws IllegalStateException
  when invalid parameters were set.
Deprecate legacy focus request methods that used stream types.

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

Change-Id: Ie8960e686bc495fd06ac1b6f9eec3613ea19aaaa
2017-03-10 12:01:55 -08:00
Hyundo Moon
b0b212014b Throw IllegalStateException in MediaBrowser.search()
This CL makes MediaBrowser.search() throw IllegalStateException
when the browser is not connected to the service.

Bug: 35346000
Test: Flashed the image on angler and locally tested.
Change-Id: I8fda53e31555337107c4e42f388ff82a7929b084
2017-03-10 19:27:16 +09:00
Hyundo Moon
4564cbceb4 ExifInterface: Correct thumbnail compression info
Exifinterface sets the thumbnail's compression information as JPEG
whenever the image has no compression tag in it. As a result, even
an image with no thumbnail can have the thumbnail compression info.
This CL fixes the problem.

Test: Run CTS test on angler
Change-Id: I4b06956b1bac672e1bf235df6f458b31e8ee82bb
2017-03-10 19:15:05 +09:00
TreeHugger Robot
cfdfd997bd Merge "Modify SurfaceView to use SurfaceFlinger child surfaces." 2017-03-10 05:15:21 +00:00
Andy Hung
40a07a8cc1 VolumeShaper: Use ISE for Builder methods with no arguments
Test: VolumeShaperTest#testVolumeShaperConfigurationBuilder
Bug: 31015569
Change-Id: Id442ac55a129e32280075ed59db39a3e7ed1ffe5
2017-03-09 12:10:39 -08:00
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