Skip to content

Commit

Permalink
Fix isInternetConnected return false when user connect wifi and vpn (…
Browse files Browse the repository at this point in the history
…below Android 10) (#137)

Co-authored-by: travis.liao <travis.liao@ringcentral.com>
  • Loading branch information
lguipeng and TravisLiao authored Aug 31, 2021
1 parent 0704cab commit 3daf2f4
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ static boolean isInternetConnected(Context context) {
|| nwc.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)
|| nwc.hasTransport(NetworkCapabilities.TRANSPORT_ETHERNET)
|| nwc.hasTransport(NetworkCapabilities.TRANSPORT_BLUETOOTH)
|| nwc.hasTransport(NetworkCapabilities.TRANSPORT_VPN)
);
} else {
NetworkInfo active = cm.getActiveNetworkInfo();
Expand Down

0 comments on commit 3daf2f4

Please sign in to comment.