11871 Commits

Author SHA1 Message Date
Sungsoo
01d3c73576 MediaBrowser: Add a disconnecting state
By adding a CONNECT_STATE_DISCONNECTING, we could prevent
the ConnectionCallback to be called after disconnect().

Bug: 36106103
Test: manual using Support4Demos
Change-Id: Ia6f9864dce90b1e58437c07bbcaf6300e162ab92
2017-03-23 13:50:38 +09:00
TreeHugger Robot
0f04917d21 Merge "Revisit logging in MediaRouter and MediaSessionRecord" 2017-03-23 02:34:31 +00:00
TreeHugger Robot
55c85cadf6 Merge "Add missing type for USB headset devices" 2017-03-23 02:22:54 +00:00
Jaewan Kim
742e379863 Revisit logging in MediaRouter and MediaSessionRecord
This limits excessive logs from MediaRouter and MediaSessionRecord
- MediaRouter: Leave log only if there's change in the audio route.
- MediaSessionRecord: Leave log for the controller callback instead of
    dumping verbose stack traces.

Bug: 36497125
Test: Manual test
Change-Id: Ie0fe9f33388d1aa9f25c26b3b3f7c71fec409ba8
2017-03-23 09:39:35 +09:00
Jean-Michel Trivi
50750ff162 Audio focus: SDK/System API updates
Addressed API council notes: document some missing default values
  of AudioFocusRequest builder, remove getters on lister and
  handler.
Fix missing support of custom Handler for focus listener.
Integrate focus lock feature from AudioManager SystemAPI into
  new AudioFocusRequest class and builder. Deprecate system
  methods for focus requests that don't use AudioFocusRequest
Switch to a ConcurrentHashMap in AudioManager instead of a
  lock and HashMap to maintain the list of focus listeners
  for each AudioManager instance.
Clean up: all local IAudioService references can be made final.
  Add missing @Override for the Stub implementations.

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

Change-Id: I9e903379a607c723a2620821200547de679231d1
2017-03-22 15:12:05 -07:00
Jean-Michel Trivi
a00f86009e PlayerBase: more general exception catching in release
When stopping AppOps watching in the player release, catch
  any exception to be safer.

Test: see bug repro steps
Bug: 36240191
Change-Id: I8e11cfc12c305878699dc57131e35e2a98eb7b16
2017-03-22 08:39:42 -07:00
Sungsoo
bd6118ffb4 Set volume handling of the default route properly
The volume handling of the default route of the devices which use
fixed volume should be set PLAYBACK_VOLUME_FIXED instead of
PLAYBACK_VOLUME_VARIABLE.

Bug: 36492333
Test: passed CTS of MediaRouterTest
Change-Id: I4bc42063b71ae9087b36f1529b7689b96d9e53e7
2017-03-22 13:53:35 +09: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
Treehugger Robot
b6ed343e85 Merge "Add support for MTP perceived device type property." 2017-03-20 21:23:10 +00:00
Eric Laurent
2eb39497bc Add missing type for USB headset devices
Change-Id: Ib3195442bfefd00edf46592e743617fe37b81a33
Test: audio playback and capture regression tests
2017-03-17 17:25:15 -07: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
TreeHugger Robot
849008cc56 Merge "Make IGraphicBufferProducer a hybrid interface." 2017-03-15 20:55:45 +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
Pawin Vongmasa
34cca21eac Make IGraphicBufferProducer a hybrid interface.
android::IGraphicBufferProducer will now become a hybrid
interface on
top of the HIDL interface
android::hardware::graphics::bufferqueue::V1_0::IGraphicBufferProducer.

Test: With CtsMediaTestCases.apk installed,
adb shell am instrument -e size small -w
'android.media.cts/android.support.test.runner.AndroidJUnitRunner'

Bug: 33854657
Change-Id: Ia8914ea49d2acf3d43682982a164d7e10f7b8542
2017-03-14 18:45:26 -07: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
Paul Duffin
17e5a2d851 Merge "Refactor code incompatible with Mockito 2.7.13"
am: 2a3a4f81f9

Change-Id: I259dc2116f1ba7d409729d739404dca501f4a5e8
2017-03-10 20:43:07 +00:00
TreeHugger Robot
f26f346a27 Merge "JNI ImageReader: propagate exceptions when creating surface planes" 2017-03-10 20:10:00 +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
Robert Shih
252f3b20bb JNI ImageReader: propagate exceptions when creating surface planes
Bug: 36082388
Test: Manual
Change-Id: I4a0ad08c9b3c53aa7ca702e1c6e2d486b788f3ff
2017-03-10 18:18:00 +00:00
Paul Duffin
26e81d2a47 Refactor code incompatible with Mockito 2.7.13
Bug: 32912773
Test: make checkbuild
Merged-In: I96e3da967fad731fc8f39bde9db95f50ab7353fb
Change-Id: I445b32432eea8a1ccb2060a73460a882a9ebe76f
2017-03-10 14:19:18 +00:00
Paul Duffin
192bb0bc54 Refactor code incompatible with Mockito 2.7.13
(cherry picked from 76e319f015c2b43498ce3ce610a253d63e76cbf3)

Some additional internal only refactorings were done as well.

Bug: 32912773
Test: make checkbuild
Change-Id: I96e3da967fad731fc8f39bde9db95f50ab7353fb
2017-03-10 14:18:53 +00: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
227bdecf02 Merge "fallout of cleaning-up libutils includes" 2017-03-04 00:52:50 +00:00
TreeHugger Robot
f1e54c9a1c Merge "Modify SurfaceView to use SurfaceFlinger child surfaces." 2017-03-03 22:45:24 +00:00