am 3754d0cc: am d0528b74: Merge "deliver invalidate messages AFTER other messages" into gingerbread
Merge commit '3754d0ccc7ba07fd867d3d28e6493e84ce0a139d' * commit '3754d0ccc7ba07fd867d3d28e6493e84ce0a139d': deliver invalidate messages AFTER other messages
This commit is contained in:
commit
09e5687757
@ -72,14 +72,6 @@ sp<MessageBase> MessageQueue::waitMessage(nsecs_t timeout)
|
||||
nsecs_t now = systemTime();
|
||||
nsecs_t nextEventTime = -1;
|
||||
|
||||
// invalidate messages are always handled first
|
||||
if (mInvalidate) {
|
||||
mInvalidate = false;
|
||||
mInvalidateMessage->when = now;
|
||||
result = mInvalidateMessage;
|
||||
break;
|
||||
}
|
||||
|
||||
LIST::iterator cur(mMessages.begin());
|
||||
if (cur != mMessages.end()) {
|
||||
result = *cur;
|
||||
@ -95,6 +87,14 @@ sp<MessageBase> MessageQueue::waitMessage(nsecs_t timeout)
|
||||
result = 0;
|
||||
}
|
||||
|
||||
// see if we have an invalidate message
|
||||
if (mInvalidate) {
|
||||
mInvalidate = false;
|
||||
mInvalidateMessage->when = now;
|
||||
result = mInvalidateMessage;
|
||||
break;
|
||||
}
|
||||
|
||||
if (timeout >= 0) {
|
||||
if (timeoutTime < now) {
|
||||
// we timed-out, return a NULL message
|
||||
|
Loading…
Reference in New Issue
Block a user