Skip to content
Commit 68a3e7a0 authored by Gyumin Sim's avatar Gyumin Sim
Browse files

Limit size of initial Parcel for async binder call

It limits the size of the initial Parcel of ParceledListSlice for async
binder call in MediaSessionRecord and MediaBrowserService. The binder
buffer might be full if multiple large Parcels are sent through async
transaction. ParceledListSlice sends the first part of the list via the
initial Parcel and the rest of the list via another synchronous
transaction in the other direction.

The added CTS tests are supposed to be flaky before this change, but
are stable after this change. It was hard to reproduce failures for the
test added in MediaSessionTest because MediaSession#setQueue is
synchronous binder call to system_server so series of setQueue runs
too slowly to overflow the buffer on the process who is listening
onQueueChanged, while the test added in MediaBrowserServiceTest was
very flaky.

Bug: 37493677
Test: atest CtsMediaTestCases:android.media.cts.MediaSessionTest \
  CtsMediaTestCases:android.media.cts.MediaBrowserServiceTest
Change-Id: I24268637792015dac604550a333d4829d1f0e0a0
parent 31bb4ab9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment