[Android] [PATCH 1/3] Logcat: send logcats via a callback

Jean-Baptiste Kempf jb at videolan.org
Mon Feb 9 19:33:54 CET 2015


On 09 Feb, Thomas Guillem wrote :
> +        try {
> +            synchronized (this) {
> +                if (!mRun)
> +                    return;
> +                mProcess = Runtime.getRuntime().exec(args);
> +            }
> +            InputStreamReader input = new InputStreamReader(
> +                    mProcess.getInputStream());
> +            BufferedReader br = new BufferedReader(input);
> +            String line;
> +
> +            while ((line = br.readLine()) != null)
> +                mCallback.onLog(line);
> +
> +            br.close();
> +            input.close();
> +        } catch (IOException e) {
> +            e.printStackTrace();
> +        }

Are you sure you only get IOException out of all those?


-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device


More information about the Android mailing list