comparison app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java @ 519:609c9990c9fb

add more debug code
author Carl Byington <carl@five-ten-sg.com>
date Fri, 31 May 2024 14:35:00 -0600
parents 13a922d1fc5c
children e6fa2c27140f
comparison
equal deleted inserted replaced
518:9acc51a5a98f 519:609c9990c9fb
471 String download_dir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath(); 471 String download_dir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath();
472 BufferedReader reader = null; 472 BufferedReader reader = null;
473 String fn; 473 String fn;
474 try { 474 try {
475 fn = external_dir + accuspeech + con; 475 fn = external_dir + accuspeech + con;
476 Log.d(TAG, "trying to read " + fn);
476 reader = new BufferedReader(new FileReader(fn)); 477 reader = new BufferedReader(new FileReader(fn));
477 } 478 }
478 catch (Exception e) { 479 catch (Exception e) {
479 fn = download_dir + con; 480 try {
480 reader = new BufferedReader(new FileReader(fn)); 481 fn = download_dir + con;
482 Log.d(TAG, "trying to read " + fn);
483 reader = new BufferedReader(new FileReader(fn));
484 }
485 catch (Exception e) {
486 Log.d(TAG, "cannot read either file");
487 return;
488 }
481 } 489 }
482 String line = null; 490 String line = null;
483 491
484 while ((line = reader.readLine()) != null) { 492 while ((line = reader.readLine()) != null) {
485 if (line.length() == 0) continue; // empty 493 if (line.length() == 0) continue; // empty
610 reader.close(); 618 reader.close();
611 if (del) (new File(fn)).delete(); 619 if (del) (new File(fn)).delete();
612 hostdb.setDefaultColorsForScheme(hostdb.DEFAULT_COLOR_SCHEME, fg, bg); 620 hostdb.setDefaultColorsForScheme(hostdb.DEFAULT_COLOR_SCHEME, fg, bg);
613 } 621 }
614 catch (Exception e) { 622 catch (Exception e) {
615 Log.d(TAG, "Deployment scan failed."); 623 Log.d(TAG, e.getMessage() + " Deployment scan failed.");
616 } 624 }
617 return launch; 625 return launch;
618 } 626 }
619 627
620 protected void updateList() { 628 protected void updateList() {