diff 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
line wrap: on
line diff
--- a/app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java	Fri May 31 14:37:18 2024 -0600
+++ b/app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java	Fri May 31 18:18:41 2024 -0600
@@ -483,7 +483,7 @@
                     reader = new BufferedReader(new FileReader(fn));
                 }
                 catch (Exception ee) {
-                    Log.d(TAG, "cannot read either file");
+                    Log.d(TAG, ee.getMessage() + "cannot read either file");
                     return launch;
                 }
             }
@@ -497,6 +497,10 @@
                 if (!line.contains("://")) continue;            // invalid uri
 
                 Uri uri = Uri.parse(line);
+                String uriline = line;
+                Log.d(TAG, "uriline: " + uriline);
+                Log.d(TAG, "uri 2 str: " + uri.toString());
+
                 ContentValues values = null;
 
                 while ((line = reader.readLine()) != null) {
@@ -594,11 +598,13 @@
                         host.setColor(HostDatabase.COLOR_GRAY);
                         host.setPubkeyId(HostDatabase.PUBKEYID_ANY);
                         hostdb.saveHost(host);
+                        Log.d(TAG, "created new host: " + host.getId());
                     }
 
                     host = TransportFactory.findHost(hostdb, uri);
 
                     if (host == null) continue;
+                    Log.d(TAG, "found host: " + host.getId());
 
                     if (values == null) continue;