Android2.2添加Ethernet 框架支持(二)

接上文 Android2.2添加Ethernet 框架支持(一)

应用程序packages/apps/Settings目录下的改动:

  1. 复制packages/apps/Settings/src/com/android/settings/ethernet目录到源码packages/apps/Settings/src/com/android/settings/目录下;

  2. 复制文件packages/apps/Settings/src/com/android/settings/EthernetSettings.java到源码packages/apps/Settings/src/com/android/settings/目录下;

  3. 复制资源文件packages/apps/Settings/res/drawable-hdpi/ic_settings_ethernet.png

到源码packages/apps/Settings/res/drawable-hdpi/目录下;

  1. 复制资源文件packages/apps/Settings/res/drawable-mdpi/ic_settings_ethernet.png

到源码packages/apps/Settings/res/drawable-mdpi/目录下;

  1. 复制资源文件packages/apps/Settings/res/layout/eth_configure.xml

到源码packages/apps/Settings/res/layout/目录下;

  1. 复制资源文件packages/apps/Settings/res/xml/ethernet_settings.xml到源码packages/apps/Settings/res/xml/目录下;

  2. 修改文件packages/apps/Settings/res/values/strings.xml

--- /home/thomas/android2.2/packages/apps/Settings/res/values/strings.xml	2011-07-04 15:38:22.937468920 +0800
+++ packages/apps/Settings/res/values/strings.xml	2011-09-07 15:05:16.701267002 +0800
@@ -1459,6 +1459,14 @@
     
     Use server to assist GPS (uncheck to improve GPS performance)
+    
+    Advanced settings
+    Advanced settings
+    Remove power off dialog
+    Do not show power off choices
+    Disable power off / reboot confirmation
+    Do not request confirmation
+
      
     
     About phone
@@ -1563,6 +1571,8 @@
     Must draw pattern to unlock screen
     
     Use visible pattern
+    Disable showing screen lock
+    Do not show screen lock
     
     Use tactile feedback
     
@@ -2528,4 +2538,29 @@
     Incoming calls
     Notifications
     Feedback
+
+    Disable SoftKeyBoard
+    SoftKeyBoard disabled
+    SoftKeyBoard enabled
+    Keyboard layout setting
+    Choose a keyboard layout
+
+    
+    Configure Ethernet device
+    Ethernet setting
+    Ethernet Devices:
+    Connection Type
+    Dhcp
+    Static IP
+    DNS address
+    Default Router
+    IP address
+    Ethernet
+    Turn on Ethernet
+    Ethernet configuration
+    Ethernet configuration
+    Configure Ethernet devices
+    Netmask
+    Turn off Ethernet
+    Turn on Ethernet
 

8.    修改文件:packages/apps/Settings/res/xml/settings.xml

--- /home/thomas/android2.2/packages/apps/Settings/res/xml/settings.xml	2011-07-04 15:38:22.937468920 +0800
+++ packages/apps/Settings/res/xml/settings.xml	2011-09-07 15:11:14.953267001 +0800
@@ -30,6 +30,15 @@
         
         
+            
+        
+
+        
@@ -118,21 +127,6 @@
                 android:targetClass="com.android.settings.deviceinfo.Memory" />
         
-        
-
-        
-            
-        
-
         
         
         
+	
+
+        
+            
+        
+
         
        

9.    修改文件:packages/apps/Settings/AndroidManifest.xml

--- /home/thomas/android2.2/packages/apps/Settings/AndroidManifest.xml	2011-07-04 15:38:22.873468920 +0800
+++ packages/apps/Settings/AndroidManifest.xml	2011-09-07 14:58:18.801267002 +0800
@@ -65,6 +65,40 @@
                 
             
         
+        
+        
+            
+                
+                
+                
+                
+            
+        
+
+        
+            
+                
+                
+                
+                
+                
+            
+        
+        
+            
+                
+                
+                
+                
+                
+            
+        
          
 @@ -237,6 +271,15 @@
             
         
+        
+            
+                
+                
+                
+                
+            
+        
+
         
         
+        
+            
+                
+                
+                
+                
+            
+        
+
         
             

10.   修改build/core/pathmap.mk

--- /home/thomas/android2.2/build/core/pathmap.mk	2011-07-04 15:35:55.689468920 +0800
+++ build/core/pathmap.mk	2011-09-07 10:58:17.765267001 +0800
@@ -89,6 +89,7 @@
 	    wifi \
 	     \
 	    keystore \
+	    ethernet \
 	 )

注意

如果对资源文件做了修改(添加/删除/修改),必须删掉临时编译文件,否则总是使用旧的临时文件编译;

针对APP,资源文件需删除的临时文件路径如下:

out/target/common/R/com/android

out/target/common/obj/APPS

out/target/product/tigger/obj/APPS

整个删除编译比较耗时,还是找到中间文件删除比较有效;





你可能感兴趣的:(Android,网络)