Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix for reconnecting when Android app comes to the foreground (1.44.x backport) #8904

Merged
merged 1 commit into from Feb 9, 2022

Commits on Feb 9, 2022

  1. android: fix for app coming to foreground

    When an app goes to the background, onBlockedStatusChanged is called with true and then called with false when it comes back to the foreground. The function onAvailable isn't called in this case and the connection wasn't being reset. Closes grpc#8850
    
    I noticed the comment that this is used for API versions 24+ but onBlockedStatusChanged was added in 29. I'm not sure if some kind of guard needs to be added or not.
    https://developer.android.com/reference/android/net/ConnectivityManager.NetworkCallback#onBlockedStatusChanged(android.net.Network,%20boolean)
    litclimbing authored and ejona86 committed Feb 9, 2022
    Configuration menu
    Copy the full SHA
    9537bba View commit details
    Browse the repository at this point in the history