Android Q wifi is connected but shows "saved" and can't go online

Android Q wifi is connected but shows "saved" and can't go online

After connecting to domestic wifi, the wifi connection interface shows that it has been saved, but the systemUI will prompt that the current network is unavailable, asking whether to keep the connection.

Finally, it was found that after connecting to wifi, the url verification will be performed natively, and this problem occurs because the wifi cannot access the external network.

1. File path
android/packages/modules/NetworkStack/res/values/config.xml

2. Modify records

diff --git a/res/values/config.xml b/res/values/config.xml
index 478ed6b..89479c1 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -14,12 +14,11 @@
     <string name="default_captive_portal_http_url" translatable="false">http://connectivitycheck.gstatic.com/generate_204</string>
 
     <!-- HTTPS URL for network validation, to use for confirming internet connectivity. -->
-    <string name="default_captive_portal_https_url" translatable="false">https://www.google.com/generate_204</string>
+    <string name="default_captive_portal_https_url" translatable="false">https://connectivitycheck.gstatic.com/generate_204</string>
 
     <!-- List of fallback URLs to use for detecting captive portals. -->
     <string-array name="default_captive_portal_fallback_urls" translatable="false">
-        <item>http://www.google.com/gen_204</item>
-        <item>http://play.googleapis.com/generate_204</item>
+        <item>http://www.googleapis.cn/generate_204</item>
     </string-array>

Guess you like

Origin blog.csdn.net/weixin_45080805/article/details/120748889