wifi 连接了 以太网也静态了 没法访问外网,
4g连接了 以太网静态了 也没法访问外网,
谁能给一个方案啊 愁死了 马上交活了
setEthIPAddress 还有就是这个设置没反应,是有什么先后顺序吗 Android5.1
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 327fb8a..e5bcb04 100644
— a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -166,9 +166,17 @@ public class ConnectivityService extends IConnectivityManager.Stub
private static final String TAG = “ConnectivityService”;
private static final boolean DBG = true;
private static final boolean VDBG = false;
private static final boolean LOGD_RULES = false;
-
private static final boolean LOGD_BLOCKED_NETWORKINFO = true;
-
// if true:
-
// wifi and ethernet can coexist, if wifi and ethernet connect together, prefered to use ethernet
-
// if false:
-
// wifi and ethernet can’t coexist, if wifi and ethernet connect together, will tear down wifi
-
// TODO: still have bug in this case to fix (like can’t reconnect wifi when ethernet disconnect)
-
private static final boolean ENABLE_NETWORK_COEXIST = true;
// TODO: create better separation between radio types and network types
@@ -4247,7 +4255,12 @@ public class ConnectivityService extends IConnectivityManager.Stub
loge("Dead network still had at least " + nr);
break;
}
-
nai.asyncChannel.disconnect();
-
if (ENABLE_NETWORK_COEXIST) { -
log("Skip teardownUnneededNetwork: " + nai.name
());
-
} else { -
nai.asyncChannel.disconnect(); -
}}
private void handleLingerComplete(NetworkAgentInfo oldNetwork) {
jpchen 发表于 2020-3-3 16:37
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com …
请问一下 这是要修改源码吗
聂先森。 发表于 2020-3-3 16:40
请问一下 这是要修改源码吗
对
这个是在platforms里面修改android.jar 就行了 是吗?
聂先森。 发表于 2020-3-3 16:45
这个是在platforms里面修改android.jar 就行了 是吗?
修改后,编译android ,然后烧录system.img
jpchen 发表于 2020-3-3 16:55
修改后,编译android ,然后烧录system.img
大佬 大佬 了解了
没想过是没加路由的原因吗
jpchen 发表于 2020-3-3 16:37
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com …
ROC-RK3328-CC 支持 setEthIPAddress的接口不