the reason for the above change is that waitForCondition() had become
large over time, mainly to handle error cases, using inlines to
evaluate the condition doesn't buys us much anymore while it increases
code size.
Change-Id: I2595d850832628954b900ab8bb1796c863447bc7
in the undoDequeue() case, 'tail' was recalculated from 'available' and 'head'
however there was a race between this and retireAndLock(), which could cause
'tail' to be recalculated wrongly.
the interesting thing though is that retireAndLock() shouldn't have any impact
on the value of 'tail', which is client-side only attribute.
we fix the race by saving the value of 'tail' before dequeue() and restore it
in the case of undoDequeue(), since we know it doesn't depend on retireAndLock().
Change-Id: I4bcc4d16b6bc4dd93717ee739c603040b18295a0
Merge commit '3b20c9e80533401d8c423977ef86460d789d4e1e' into kraken
* commit '3b20c9e80533401d8c423977ef86460d789d4e1e':
Fix a minor bug in transitions to left-edge-up landscape.
Merge commit '81ac367be66905a5b53b8e7e98160546802bd98b' into froyo-plus-aosp
* commit '81ac367be66905a5b53b8e7e98160546802bd98b':
Fix a minor bug in transitions to left-edge-up landscape.
Merge commit '087b25f7e2669497cf217d873437e8726c139abd' into kraken
* commit '087b25f7e2669497cf217d873437e8726c139abd':
Make timezone changes apply to status bar time in 24hr mode. Bug: 2632681
Merge commit '6e4895b63aa64a8df64dd69c49a414b7566932d3' into froyo-plus-aosp
* commit '6e4895b63aa64a8df64dd69c49a414b7566932d3':
Make timezone changes apply to status bar time in 24hr mode. Bug: 2632681
Merge commit '00b92b943ff397cb7f7c4827a0eea9df7aa22071' into kraken
* commit '00b92b943ff397cb7f7c4827a0eea9df7aa22071':
revert a change in the SyncManager that caused it to not cancel
Merge commit '9aaf24f2a46eacd1e342f8c0300c3093646e2814' into froyo-plus-aosp
* commit '9aaf24f2a46eacd1e342f8c0300c3093646e2814':
revert a change in the SyncManager that caused it to not cancel
Merge commit 'ca54674c656b5cf66cfeda42ef7a640971618f2a' into kraken
* commit 'ca54674c656b5cf66cfeda42ef7a640971618f2a':
docs: update information about developing on a device.
Merge commit 'eaa801e22abb3ea952ecd70ed7d0a876a1e2e3c9' into froyo-plus-aosp
* commit 'eaa801e22abb3ea952ecd70ed7d0a876a1e2e3c9':
docs: update information about developing on a device.
Merge commit '785c89835741ca735fbb766bc2e1aeb68a4d5169' into kraken
* commit '785c89835741ca735fbb766bc2e1aeb68a4d5169':
remove myname accidentally included in one of the files
Merge commit '996960dea8ae0c2c5668e1051c5a9c5a4fb4d888' into froyo-plus-aosp
* commit '996960dea8ae0c2c5668e1051c5a9c5a4fb4d888':
remove myname accidentally included in one of the files
Merge commit '447beb52be8f97154db2273b4130fd83bf34d840' into kraken
* commit '447beb52be8f97154db2273b4130fd83bf34d840':
Add good international characters to the path part of Url pattern.
Merge commit '05fd7e7d328261260a348c0b6ba840bc1f60cb14' into froyo-plus-aosp
* commit '05fd7e7d328261260a348c0b6ba840bc1f60cb14':
Add good international characters to the path part of Url pattern.
Merge commit 'bd5356468a5e6823fe4dce040ee75fbef66488dc' into kraken
* commit 'bd5356468a5e6823fe4dce040ee75fbef66488dc':
dumpstate: Add blocked process wait-channel info to bugreport
Merge commit '44f2c6baa68e02f7837cd1ca285d5c4f0f871b18' into kraken
* commit '44f2c6baa68e02f7837cd1ca285d5c4f0f871b18':
Whoops a little more on issue #2631417: Expose FLAG_EXTERNAL_STORAGE
Merge commit '8f36a744bc8933396f237fbda8f21c31ed41d504' into kraken
* commit '8f36a744bc8933396f237fbda8f21c31ed41d504':
Fix bug 2605504 Don't leak a metric ton of NotificationPlayer threads
Merge commit '57fff78a70c82ca09beb91c4f92d97b6f0b897e4' into froyo-plus-aosp
* commit '57fff78a70c82ca09beb91c4f92d97b6f0b897e4':
dumpstate: Add blocked process wait-channel info to bugreport
Merge commit '2e4b98dcd88f14fdb35e46236ec916493c570f28' into froyo-plus-aosp
* commit '2e4b98dcd88f14fdb35e46236ec916493c570f28':
Whoops a little more on issue #2631417: Expose FLAG_EXTERNAL_STORAGE
Merge commit 'cd24dae9ca6550b24333f889935e1de068759ce5' into froyo-plus-aosp
* commit 'cd24dae9ca6550b24333f889935e1de068759ce5':
Fix bug 2605504 Don't leak a metric ton of NotificationPlayer threads