This is important for MediaSource, where there is no initial request to set up
the stall counter by sending an initial progress event.
For sources using ChannelMediaResource, this means that stalled can now fire
before an HTTP response is received.
Also reset stalled timer on transitions to NETWORK_LOADING,
and don't run the progress timer while stalled.
--HG--
extra : rebase_source : cf2cf8a4de37ca4859761941946393e9747c0706
This provides that mNetworkState is available for determining whether progress
notification from the resource/MediaCache after stalled should resume progress
events. The timer will be stopped while stalled in a subsequent patch, and
should not be restarted unless NETWORK_LOADING.
--HG--
extra : rebase_source : e335555de404f6a899762be3c05b8f5444c357e3
avoiding skipping progress events when data is received only soon after the
previous progress event.
--HG--
extra : rebase_source : 5108ae7d91bac613ed67f85c0963c6ca020bee07
This is necessary to have strong guarantees that promises will be resolved.
While we're flushing the task queue, normal dispatch starts to fail,
meaning that we can't dispatch promise resolution. We have 3 options to handle
this:
(A) Never respond to the promise.
(B) Invoke the Resolve/Reject callback synchronously if dispatch fails.
(C) Prevent dispatch from failing.
(C) seems like the option least likely to violate invariants if we can get away
with it. Promise resolution is unlikely to be a heavyweight task in the way that
a decode task might be, so this should hopefully be ok.
Note that this still doesn't help for bonafide task queue shutdown. It's up to
consumers to tear down their MediaPromiseHolders before the task queues are shut
down.
This is necessary to have strong guarantees that promises will be resolved.
While we're flushing the task queue, normal dispatch starts to fail,
meaning that we can't dispatch promise resolution. We have 3 options to handle
this:
(A) Never respond to the promise.
(B) Invoke the Resolve/Reject callback synchronously if dispatch fails.
(C) Prevent dispatch from failing.
(C) seems like the option least likely to violate invariants if we can get away
with it. Promise resolution is unlikely to be a heavyweight task in the way that
a decode task might be, so this should hopefully be ok.
Note that this still doesn't help for bonafide task queue shutdown. It's up to
consumers to tear down their MediaPromiseHolders before the task queues are shut
down.
Resolve the build failure caused by API changes
There are some changes in Audio APIs in Android version
21. Modifying the code to use the new APIs.
Change-Id: I24fdeb20f8f957d05fb6c0c317de0a6f0769c347
Resolve seccomp violation caused by syscall 256
Modify the filter to allow syscall 256 (set_tid_address).
Change-Id: I49461770c4c5e70bf68462d34321381b0b7ead0a