安卓 11 将设备使用网线连接打印机或者电脑后,机器修改静态IP地址, 一直显示正在获取,无法连接.
目前的做法是 :修改静态IP后,重新启动以太网,达到连接成功.
下面是直接贴的patch代码
diff --git a/frameworks/opt/net/ethernet/java/com/android/server/ethernet/EthernetServiceImpl.java b/frameworks/opt/net/ethernet/java/com/android/server/ethernet/EthernetServiceImpl.java
old mode 100644
new mode 100755
index 95d6c29..ce4689b
--- a/frameworks/opt/net/ethernet/java/com/android/server/ethernet/EthernetServiceImpl.java
+++ b/frameworks/opt/net/ethernet/java/com/android/server/ethernet/EthernetServiceImpl.java
@@ -123,6 +123,13 @@ public class EthernetServiceImpl extends IEthernetManager.Stub {
// TODO: this does not check proxy settings, gateways, etc.
// Fix this by making IpConfiguration a complete representation of static configuration.
mTracker.updateIpConfiguration(iface, new IpConfiguration(config));
+ //modify by luoyalong for can not connected static Ethernet