Mercurial > 510Connectbot
comparison app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java @ 521:5d55f83b4e87
add more debug code
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Fri, 31 May 2024 18:18:41 -0600 |
parents | e6fa2c27140f |
children | 645d22a0e8cb |
comparison
equal
deleted
inserted
replaced
520:e6fa2c27140f | 521:5d55f83b4e87 |
---|---|
481 fn = download_dir + con; | 481 fn = download_dir + con; |
482 Log.d(TAG, "trying to read " + fn); | 482 Log.d(TAG, "trying to read " + fn); |
483 reader = new BufferedReader(new FileReader(fn)); | 483 reader = new BufferedReader(new FileReader(fn)); |
484 } | 484 } |
485 catch (Exception ee) { | 485 catch (Exception ee) { |
486 Log.d(TAG, "cannot read either file"); | 486 Log.d(TAG, ee.getMessage() + "cannot read either file"); |
487 return launch; | 487 return launch; |
488 } | 488 } |
489 } | 489 } |
490 String line = null; | 490 String line = null; |
491 | 491 |
495 if (line.substring(0, 1).equals("#")) continue; // comment | 495 if (line.substring(0, 1).equals("#")) continue; // comment |
496 | 496 |
497 if (!line.contains("://")) continue; // invalid uri | 497 if (!line.contains("://")) continue; // invalid uri |
498 | 498 |
499 Uri uri = Uri.parse(line); | 499 Uri uri = Uri.parse(line); |
500 String uriline = line; | |
501 Log.d(TAG, "uriline: " + uriline); | |
502 Log.d(TAG, "uri 2 str: " + uri.toString()); | |
503 | |
500 ContentValues values = null; | 504 ContentValues values = null; |
501 | 505 |
502 while ((line = reader.readLine()) != null) { | 506 while ((line = reader.readLine()) != null) { |
503 if (line.length() == 0) break; // empty | 507 if (line.length() == 0) break; // empty |
504 | 508 |
592 if (host == null) { | 596 if (host == null) { |
593 host = TransportFactory.getTransport(uri.getScheme()).createHost(uri); | 597 host = TransportFactory.getTransport(uri.getScheme()).createHost(uri); |
594 host.setColor(HostDatabase.COLOR_GRAY); | 598 host.setColor(HostDatabase.COLOR_GRAY); |
595 host.setPubkeyId(HostDatabase.PUBKEYID_ANY); | 599 host.setPubkeyId(HostDatabase.PUBKEYID_ANY); |
596 hostdb.saveHost(host); | 600 hostdb.saveHost(host); |
601 Log.d(TAG, "created new host: " + host.getId()); | |
597 } | 602 } |
598 | 603 |
599 host = TransportFactory.findHost(hostdb, uri); | 604 host = TransportFactory.findHost(hostdb, uri); |
600 | 605 |
601 if (host == null) continue; | 606 if (host == null) continue; |
607 Log.d(TAG, "found host: " + host.getId()); | |
602 | 608 |
603 if (values == null) continue; | 609 if (values == null) continue; |
604 | 610 |
605 String key = "autolaunch"; | 611 String key = "autolaunch"; |
606 if (values.containsKey(key)) { | 612 if (values.containsKey(key)) { |