Mercurial > 510Connectbot
comparison app/src/main/java/com/five_ten_sg/connectbot/transport/Telnet.java @ 525:b61919d8a701
code cleanup; document connections file
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sat, 01 Jun 2024 10:12:40 -0600 |
parents | d29cce60f393 |
children |
comparison
equal
deleted
inserted
replaced
524:609b142218bc | 525:b61919d8a701 |
---|---|
323 public HostBean createHost(Uri uri) { | 323 public HostBean createHost(Uri uri) { |
324 HostBean host = new HostBean(); | 324 HostBean host = new HostBean(); |
325 host.setProtocol(PROTOCOL); | 325 host.setProtocol(PROTOCOL); |
326 host.setHostname(uri.getHost()); | 326 host.setHostname(uri.getHost()); |
327 int port = uri.getPort(); | 327 int port = uri.getPort(); |
328 | 328 if (port < 0) port = DEFAULT_PORT; |
329 if (port < 0) | |
330 port = DEFAULT_PORT; | |
331 | |
332 host.setPort(port); | 329 host.setPort(port); |
333 String nickname = uri.getFragment(); | 330 String nickname = uri.getFragment(); |
334 | |
335 if (nickname == null || nickname.length() == 0) { | 331 if (nickname == null || nickname.length() == 0) { |
336 host.setNickname(getDefaultNickname(host.getUsername(), | 332 nickname = getDefaultNickname(host.getUsername(), host.getHostname(), host.getPort()); |
337 host.getHostname(), host.getPort())); | 333 } |
338 } | 334 host.setNickname(nickname); |
339 else { | |
340 host.setNickname(uri.getFragment()); | |
341 } | |
342 | |
343 return host; | 335 return host; |
344 } | 336 } |
345 | 337 |
346 | 338 |
347 public String getFormatHint(Context context) { | 339 public String getFormatHint(Context context) { |