Repository navigation
Prevent Espresso from reporting it is idle too early by re-checking the main queue after idling resources report idle. - #2536
Open
copybara-service[bot] wants to merge 1 commit into
Open
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
agammann
reviewed
Nov 11, 2026
agammann
left a comment
There was a problem hiding this comment.
The two guards address different queue paths: setIdle(true) removes a callback queued during registration, while the looper check avoids enqueueing another one when isIdleNow() is polled after the resource is idle. The new test checks an empty queue after registration, polling, and a direct redundant callback; the existing repeated-transition test still covers real busy-to-idle changes.
…he main queue after idling resources report idle. Ensure `UiControllerImpl.loopMainThreadUntilIdle()` runs tasks posted to the main thread just before idling resources report idle while enforcing the master `IdlingPolicy` timeout across re-checks, and avoid enqueuing redundant idle notifications in `IdlingResourceRegistry` when polling already-idle resources. PiperOrigin-RevId: 1018660560
copybara-service
Bot
force-pushed
the
piper_1018660560
branch
from
November 17, 2026 17:46
f9e1342 to
ed6ac2f
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prevent Espresso from reporting it is idle too early by re-checking the main queue after idling resources report idle.
Ensure
UiControllerImpl.loopMainThreadUntilIdle()runs tasks posted to the main thread just before idling resources report idle while enforcing the masterIdlingPolicytimeout across re-checks, and avoid enqueuing redundant idle notifications inIdlingResourceRegistrywhen polling already-idle resources.