Mercurial > 510Connectbot
changeset 135:e251b3b679c3
read deployment.connections on startup for new host entries
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Thu, 19 Jun 2014 15:58:55 -0700 |
parents | 81cafbe7cd9b |
children | 398503d13f35 |
files | src/com/five_ten_sg/connectbot/HostListActivity.java |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/HostListActivity.java Thu Jun 19 15:52:16 2014 -0700 +++ b/src/com/five_ten_sg/connectbot/HostListActivity.java Thu Jun 19 15:58:55 2014 -0700 @@ -17,7 +17,6 @@ package com.five_ten_sg.connectbot; -import java.util.List; import com.five_ten_sg.connectbot.bean.HostBean; import com.five_ten_sg.connectbot.service.TerminalBridge; @@ -25,11 +24,16 @@ import com.five_ten_sg.connectbot.transport.TransportFactory; import com.five_ten_sg.connectbot.util.HostDatabase; import com.five_ten_sg.connectbot.util.PreferenceConstants; + +import java.io.BufferedReader; import java.io.File; +import java.util.List; + import android.app.Activity; import android.app.AlertDialog; import android.app.ListActivity; import android.content.ComponentName; +import android.content.ContentValues; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; @@ -38,6 +42,7 @@ import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.content.res.ColorStateList; +import android.database.sqlite.SQLiteDatabase; import android.net.Uri; import android.os.Build; import android.os.Bundle; @@ -404,7 +409,7 @@ ContentValues values = null; while ((line = reader.readLine()).length() > 0) { String [] parts = line.split("="); - if (parts.length() != 2) continue; + if (parts.length != 2) continue; if (values == null) values = new ContentValues(); values.put(parts[0], parts[1]); } @@ -423,7 +428,7 @@ db.close(); } reader.close(); - File.delete(fn); + (new File(fn)).delete(); } catch (Exception e) { Log.d(TAG, "Deployment scan failed.", e);