public static Process getLogcatProcess(String buffer) throws IOException { List<String> args = getLogcatArgs(buffer); Process process = RuntimeHelper.exec(args); return process; }
args.add("-d"); // -d just dumps the whole thing dumpLogcatProcess = RuntimeHelper.exec(args); reader = new BufferedReader(new InputStreamReader(dumpLogcatProcess .getInputStream()), 8192); } finally { if (dumpLogcatProcess != null) { RuntimeHelper.destroy(dumpLogcatProcess); log.d("destroyed 1 dump logcat process");
@Override public void killQuietly() { if (logcatProcess != null) { RuntimeHelper.destroy(logcatProcess); log.d("killed 1 logcat process"); } // post-jellybean, we just kill the process, so there's no need // to close the bufferedReader. Anyway, it just hangs. if (VersionHelper.getVersionSdkIntCompat() < VersionHelper.VERSION_JELLYBEAN && bufferedReader != null) { try { bufferedReader.close(); } catch (IOException e) { log.e(e, "unexpected exception"); } } }