diff --git a/res/raw/logger_config b/res/raw/logger_config index 13b9d615425468cb61e8d598ebcf3565ce16509a..291b13b2ce2827368b406558d9f48e3d3b38b3f8 100644 --- a/res/raw/logger_config +++ b/res/raw/logger_config @@ -12,7 +12,7 @@ logger.record.net.i2p.router.Shitlist=WARN logger.record.net.i2p.router.networkdb=WARN logger.record.net.i2p.router.peermanager=WARN logger.record.net.i2p.router.peermanager.ProfileOrganizer=WARN -logger.record.net.i2p.router.transport=WARN +logger.record.net.i2p.router.transport=ERROR logger.record.net.i2p.router.transport.FIFOBandwidthRefiller=ERROR logger.record.net.i2p.router.tunnel=WARN logger.record.net.i2p.stat.Rate=ERROR diff --git a/src/net/i2p/android/router/activity/AddressbookActivity.java b/src/net/i2p/android/router/activity/AddressbookActivity.java index b24041d29315430e381c31e035ea9e3fab9f9638..cd8074a1466687139198696ce7ca682c9f0b6cd7 100644 --- a/src/net/i2p/android/router/activity/AddressbookActivity.java +++ b/src/net/i2p/android/router/activity/AddressbookActivity.java @@ -39,14 +39,21 @@ public class AddressbookActivity extends ListActivity { // get the names NamingService ns = ctx.namingService(); + // After router shutdown we get nothing... why? Set<String> names = ns.getNames(); // set the header TextView tv = (TextView) getLayoutInflater().inflate(R.layout.addressbook_header, null); - tv.setText(names.size() + " hosts in address book. Start typing to filter."); + int sz = names.size(); + if (sz > 1) + tv.setText(sz + " hosts in address book. Start typing to filter."); + else if (sz > 0) + tv.setText("1 host in address book."); + else + tv.setText("No hosts in address book, or your router is not up."); ListView lv = getListView(); lv.addHeaderView(tv, "", false); - lv.setTextFilterEnabled(true); + lv.setTextFilterEnabled(sz > 1); // set the list List<String> nameList = new ArrayList(names);