code: public boolean isWifiFake(String ipAddress, int port) {
  		SocketChannel socketChannel = null;
  		try {
  			socketChannel = SocketChannel.open();
  			socketChannel.connect(new InetSocketAddress(ipAddress, port));
  		} catch (IOException e) {
  			Log.d(TAG, "Current Wifi is stupid!!! by IOException");
  			return true;
  		} catch (UnresolvedAddressException e) {
  			Log.d(TAG, "Current Wifi is stupid!!! by InetSocketAddress");
  			return true;
  		} finally {
  			if (socketChannel != null)
  				try {
  					socketChannel.close();
  				} catch (IOException e) {
  					Log.d(TAG, "Error occured while closing SocketChannel");
  				}
  		}
  		return false;
  	}
docs: Checks if currently connected Access Point is either rogue or incapable
  of routing packet
  
  @param ipAddress
  Any valid IP addresses will work to check if the device is
  connected to properly working AP
  @param port
  Port number bound with ipAddress parameter
  @return true if currently connected AP is not working normally; false
  otherwise