Loading core/java/android/os/CombinedMessageQueue/MessageQueue.java +6 −15 Original line number Diff line number Diff line Loading @@ -2563,10 +2563,6 @@ public final class MessageQueue { return mMessage.when; } boolean isRemovedFromStack() { return mRemovedFromStackValue; } boolean removeFromStack() { return sRemovedFromStack.compareAndSet(this, false, true); } Loading Loading @@ -2919,16 +2915,10 @@ public final class MessageQueue { StateNode bottom = getStateNode(top); /* * If the top node is a state node, there are no reachable messages. * If it's anything other than Active, we can quit as we know that next() is not * consuming items. * If the top node is Active then we know that next() is currently consuming items. * In that case we should wait next() has drained the stack. * If the top node is a state node, there are no reachable messages. We should still * wait for next to complete draining the stack. */ if (top == bottom) { if (bottom != sStackStateActive) { return false; } waitForDrainCompleted(); return false; } Loading Loading @@ -2957,7 +2947,7 @@ public final class MessageQueue { } } } else { return true; break; } } Loading @@ -2967,16 +2957,17 @@ public final class MessageQueue { if (DEBUG) { Log.d(TAG_C, "stackHasMessages next() is walking the stack, we must re-sample"); } waitForDrainCompleted(); break; } if (!n.isMessageNode()) { /* We reached the end of the stack */ return found; break; } p = (MessageNode) n; } waitForDrainCompleted(); return found; } Loading Loading
core/java/android/os/CombinedMessageQueue/MessageQueue.java +6 −15 Original line number Diff line number Diff line Loading @@ -2563,10 +2563,6 @@ public final class MessageQueue { return mMessage.when; } boolean isRemovedFromStack() { return mRemovedFromStackValue; } boolean removeFromStack() { return sRemovedFromStack.compareAndSet(this, false, true); } Loading Loading @@ -2919,16 +2915,10 @@ public final class MessageQueue { StateNode bottom = getStateNode(top); /* * If the top node is a state node, there are no reachable messages. * If it's anything other than Active, we can quit as we know that next() is not * consuming items. * If the top node is Active then we know that next() is currently consuming items. * In that case we should wait next() has drained the stack. * If the top node is a state node, there are no reachable messages. We should still * wait for next to complete draining the stack. */ if (top == bottom) { if (bottom != sStackStateActive) { return false; } waitForDrainCompleted(); return false; } Loading Loading @@ -2957,7 +2947,7 @@ public final class MessageQueue { } } } else { return true; break; } } Loading @@ -2967,16 +2957,17 @@ public final class MessageQueue { if (DEBUG) { Log.d(TAG_C, "stackHasMessages next() is walking the stack, we must re-sample"); } waitForDrainCompleted(); break; } if (!n.isMessageNode()) { /* We reached the end of the stack */ return found; break; } p = (MessageNode) n; } waitForDrainCompleted(); return found; } Loading