Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Android UI delay does not work with Long.MAX_VALUE #161

Closed
elizarov opened this issue Nov 10, 2017 · 2 comments
Closed

Android UI delay does not work with Long.MAX_VALUE #161

elizarov opened this issue Nov 10, 2017 · 2 comments
Labels

Comments

@elizarov
Copy link
Contributor

elizarov commented Nov 10, 2017

Doing delay(Long.MAX_VALUE) on Android ends up invoking Handler.postDelayed which invokes the following code:

    public final boolean sendMessageDelayed(Message msg, long delayMillis) {
        if (delayMillis < 0) delayMillis = 0;
        return sendMessageAtTime(msg, SystemClock.uptimeMillis() + delayMillis);
    }

Note, how addition operation here overflows on Long.MAX_VALUE delay.

@elizarov elizarov added the bug label Nov 10, 2017
@JakeWharton
Copy link
Contributor

JakeWharton commented Nov 10, 2017 via email

@elizarov
Copy link
Contributor Author

Filed. I don't know why. It is just an edge case that better be working as expected (it shall effectively wait forever).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants