From 2e55c4e2c30405fd1f67c18779afa690d2797605 Mon Sep 17 00:00:00 2001 From: Balint Kovacs Date: Tue, 3 May 2011 18:11:07 +0200 Subject: [PATCH] Polished log view a bit more Signed-off-by: Balint Kovacs --- default.properties | 2 +- res/layout/read_logs.xml | 11 ++--------- src/hu/blint/ssldroid/SSLDroidReadLogs.java | 11 ++++++----- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/default.properties b/default.properties index e2e8061..46769a7 100644 --- a/default.properties +++ b/default.properties @@ -8,4 +8,4 @@ # project structure. # Project target. -target=android-8 +target=android-7 diff --git a/res/layout/read_logs.xml b/res/layout/read_logs.xml index 59e7f4b..af7894d 100644 --- a/res/layout/read_logs.xml +++ b/res/layout/read_logs.xml @@ -1,11 +1,4 @@ - - - - - + + - diff --git a/src/hu/blint/ssldroid/SSLDroidReadLogs.java b/src/hu/blint/ssldroid/SSLDroidReadLogs.java index 2aa870c..30c5c25 100644 --- a/src/hu/blint/ssldroid/SSLDroidReadLogs.java +++ b/src/hu/blint/ssldroid/SSLDroidReadLogs.java @@ -16,26 +16,27 @@ public class SSLDroidReadLogs extends Activity{ super.onCreate(savedInstanceState); setContentView(R.layout.read_logs); TextView logcontainer = (TextView) findViewById(R.id.logTextView); + logcontainer.setText(""); Process mLogcatProc = null; BufferedReader reader = null; try { mLogcatProc = Runtime.getRuntime().exec(new String[] - {"logcat", "-d", "SSLDroid:D SSLDroidGui:D *:S" }); + {"logcat", "-d", "-v", "time", "-b", "main", "SSLDroid:D SSLDroidGui:D *:S" }); reader = new BufferedReader(new InputStreamReader(mLogcatProc.getInputStream())); String line; - final StringBuilder log = new StringBuilder(); + //final StringBuilder log = new StringBuilder(); String separator = System.getProperty("line.separator"); while ((line = reader.readLine()) != null) { - log.append(line); - log.append(separator); + logcontainer.append(line); + logcontainer.append(separator); } - logcontainer.setText(log); + //logcontainer.setText(log); } catch (IOException e)