As is known to all, Google was blocked in China since 2014. And many AOSP based Android distributions such as LineageOS use an domain in order to test if current device is connected to the internet. Here shows a method to fix it.

Android 7+

adb shell "settings put global captive_portal_http_url"
adb shell "settings put global captive_portal_https_url"

Android 6.x

adb shell "settings put global captive_portal_server"

Or just disable network checking

adb shell settings put global captive_portal_detection_enabled 1

What’s more

Show all available options:

adb shell settings --user current list global

Translated from 如何消除原生 Android 原生网络连接显示 x 或者惊叹号