The reason we need a separate latch is that
AsyncTask will post onPostExecute/onCancelled
_after_ executing mFuture.get(). The previous
implementation would only wait for mFuture.get()
to complete and not the entire task.
Change-Id: I96964591980965148eb09af38b5838bfa5d28277
There was already a mechanism for sending out events for LayoutTransition
when animations started or ended, but the implementation only sent out events
for the appearing/disappearing animations. This fix provides callbacks to
listeners for the CHANGE_APPEARING and CHANGE_DISAPPEARING transitions, too.
Change-Id: Icfb8cc1c20d2df3e4a817255e96c9d0e94c1d8c4
...to throttle contentobserver-based requeries
Why yes, I guess it could.
This also reworks AsyncTaskLoader to not generate multiple
concurrent tasks if it is getting change notifications before
the last background task is complete.
And removes some of the old APIs that had been deprecated but
need to be gone for final release.
And fixes a few little problems with applying the wrong theme
in system code.
Change-Id: Ic7a665b666d0fb9d348e5f23595532191065884f
Added light/dark versions of holo dialog icons. Apps using
AlertDialogs that wish to use the system dialog icon should use
setIconAttribute(android.R.attr.alertDialogIcon) instead of
setIcon(android.R.drawable.ic_alert_dialog).
Change-Id: I40793a3164478be5ffa045ededfcab8210753a4b
This change adds a public Java API to use a SurfaceTexture as the
destination of camera preview frames.
Change-Id: If537fed2df12c5c181e2af5f817985c1bda853fb
Add protection against views disappearing before previously posted
Runnables attempt to show a menu anchored to them.
Change-Id: Ia2a322e76665e61feb5bdb92377d5066cb6d5b04
The problem can occur if a sample is started at the same time as the last AudioTrack callback
for a playing sample is called. At this time, allocateChannel() can be called concurrently with moveToFront()
which can cause an entry in mChannels being used by moveToFront() to be erased temporarily by allocateChannel().
The fix consists in making sure that the SoundPool mutex is held whenever play(), stop() or done() are called.
In addition, other potential weaknesses have been removed by making sure that the channel mutex is held while
starting, stopping and processing the AudioTrack call back.
To that purpose, a mechanism similar to the channel restart method is implemented to avoid stopping channels
from the AudioTrack call back but do it from the restart thread instead.
The sound effects SounPool management in AudioService has also been improved to make sure that the samples have
been loaded when a playback request is received and also to immediately release the SoundPool when the effects are
unloaded without waiting for the GC to occur.
The SoundPool.java class was modified to allow the use of a looper attached to the thread in which the sample
loaded listener is running and not to the thread in which the SoundPool is created.
The maximum number of samples that can be loaded in a SoundPool lifetime as been increased from 255 to 65535.
Change-Id: I368a3bdfda4239f807f857c3e97b70f6b31b0af3