do not bail out of wifi settings if there is no DhcpInfo
There is still much useful information to be had without DhcpInfo.
This commit is contained in:
		
							parent
							
								
									c5688dcdbf
								
							
						
					
					
						commit
						eed0070d4b
					
				| @ -87,12 +87,11 @@ public class WifiStateChangeService extends Service { | ||||
|                         wifiInfo = wifiManager.getConnectionInfo(); | ||||
|                         FDroidApp.ipAddressString = formatIpAddress(wifiInfo.getIpAddress()); | ||||
|                         DhcpInfo dhcpInfo = wifiManager.getDhcpInfo(); | ||||
|                         if (dhcpInfo == null) { | ||||
|                             return null; | ||||
|                         } | ||||
|                         String netmask = formatIpAddress(dhcpInfo.netmask); | ||||
|                         if (!TextUtils.isEmpty(FDroidApp.ipAddressString) && netmask != null) { | ||||
|                             FDroidApp.subnetInfo = new SubnetUtils(FDroidApp.ipAddressString, netmask).getInfo(); | ||||
|                         if (dhcpInfo != null) { | ||||
|                             String netmask = formatIpAddress(dhcpInfo.netmask); | ||||
|                             if (!TextUtils.isEmpty(FDroidApp.ipAddressString) && netmask != null) { | ||||
|                                 FDroidApp.subnetInfo = new SubnetUtils(FDroidApp.ipAddressString, netmask).getInfo(); | ||||
|                             } | ||||
|                         } | ||||
|                     } else if (wifiState == WifiManager.WIFI_STATE_DISABLED | ||||
|                             || wifiState == WifiManager.WIFI_STATE_DISABLING) { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Hans-Christoph Steiner
						Hans-Christoph Steiner