Out of curiosity, what method is Google using to validate a working internet connection? Are they hitting a universal endpoint? https://developer.android.com/reference/android/net/NetworkCapabilities#NET_CAPABILITY_VALIDATED
Any link to some AOSP would be very helpful as well.