Showing
3 changed files
with
3 additions
and
6 deletions
... | @@ -358,7 +358,7 @@ public class MainActivity extends AppCompatActivity { | ... | @@ -358,7 +358,7 @@ public class MainActivity extends AppCompatActivity { |
358 | String domain = linkProperties.getDomains(); | 358 | String domain = linkProperties.getDomains(); |
359 | String interfacrName = linkProperties.getInterfaceName(); | 359 | String interfacrName = linkProperties.getInterfaceName(); |
360 | //String DnsServerName = linkProperties.getPrivateDnsServerName(); | 360 | //String DnsServerName = linkProperties.getPrivateDnsServerName(); |
361 | - dbNHelper.insertColumn0(network.toString(), domain, interfacrName, null); | 361 | + dbNHelper.insertColumn0(network.toString(), domain, interfacrName); |
362 | List<InetAddress> inetAddresses = linkProperties.getDnsServers(); | 362 | List<InetAddress> inetAddresses = linkProperties.getDnsServers(); |
363 | for(InetAddress address : inetAddresses){ | 363 | for(InetAddress address : inetAddresses){ |
364 | dbNHelper.insertColumn1(network.toString(), address.getHostAddress()); | 364 | dbNHelper.insertColumn1(network.toString(), address.getHostAddress()); | ... | ... |
... | @@ -7,7 +7,6 @@ public final class MobileNetworkDataBase { | ... | @@ -7,7 +7,6 @@ public final class MobileNetworkDataBase { |
7 | public static final String NET_ID = "net_id"; | 7 | public static final String NET_ID = "net_id"; |
8 | public static final String DOMAIN = "domain"; | 8 | public static final String DOMAIN = "domain"; |
9 | public static final String INTERFACE_NAME = "interface_name"; | 9 | public static final String INTERFACE_NAME = "interface_name"; |
10 | - public static final String DNS_SERVER_NAME = "dns_server_name"; | ||
11 | public static final String HOST_ADDRESS = "host_address"; | 10 | public static final String HOST_ADDRESS = "host_address"; |
12 | public static final String PREFIX_LENGTH = "prefix_length"; | 11 | public static final String PREFIX_LENGTH = "prefix_length"; |
13 | public static final String DESTINATION = "destination"; | 12 | public static final String DESTINATION = "destination"; |
... | @@ -21,8 +20,7 @@ public final class MobileNetworkDataBase { | ... | @@ -21,8 +20,7 @@ public final class MobileNetworkDataBase { |
21 | +_TABLENAME0 + " ( " | 20 | +_TABLENAME0 + " ( " |
22 | +NET_ID + " text not null, " | 21 | +NET_ID + " text not null, " |
23 | +DOMAIN + " text, " | 22 | +DOMAIN + " text, " |
24 | - +INTERFACE_NAME+ " text, " | 23 | + +INTERFACE_NAME+ " text); "; |
25 | - +DNS_SERVER_NAME+ " text);"; | ||
26 | public static final String _CREATE1 = "create table if not exists " | 24 | public static final String _CREATE1 = "create table if not exists " |
27 | +_TABLENAME1 + " ( " | 25 | +_TABLENAME1 + " ( " |
28 | +NET_ID + " text not null, " | 26 | +NET_ID + " text not null, " | ... | ... |
... | @@ -51,12 +51,11 @@ public class networkDBHelper { | ... | @@ -51,12 +51,11 @@ public class networkDBHelper { |
51 | mDB.close(); | 51 | mDB.close(); |
52 | } | 52 | } |
53 | 53 | ||
54 | - public long insertColumn0(String id, String domain, String interface_name, String dns_server_name){ | 54 | + public long insertColumn0(String id, String domain, String interface_name){ |
55 | ContentValues values = new ContentValues(); | 55 | ContentValues values = new ContentValues(); |
56 | values.put(MobileNetworkDataBase.CreateDB.NET_ID, id); | 56 | values.put(MobileNetworkDataBase.CreateDB.NET_ID, id); |
57 | values.put(MobileNetworkDataBase.CreateDB.DOMAIN, domain); | 57 | values.put(MobileNetworkDataBase.CreateDB.DOMAIN, domain); |
58 | values.put(MobileNetworkDataBase.CreateDB.INTERFACE_NAME, interface_name); | 58 | values.put(MobileNetworkDataBase.CreateDB.INTERFACE_NAME, interface_name); |
59 | - values.put(MobileNetworkDataBase.CreateDB.DNS_SERVER_NAME, dns_server_name); | ||
60 | return mDB.insert(MobileNetworkDataBase.CreateDB._TABLENAME0, null, values); | 59 | return mDB.insert(MobileNetworkDataBase.CreateDB._TABLENAME0, null, values); |
61 | } | 60 | } |
62 | 61 | ... | ... |
-
Please register or login to post a comment