aboutsummaryrefslogtreecommitdiffstats
path: root/dumpeventlog
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2010-07-20 17:25:36 -0700
committerXavier Ducrohet <xav@android.com>2010-07-26 10:55:08 -0700
commit9db3286c710abeb2c9478c2f95657d945a55d176 (patch)
treed3e5b901646d1c2ee6bd3990bb8da99c05eb78d3 /dumpeventlog
parentf56173887a9f6430425c93203a8c260a73b1480a (diff)
downloadsdk-9db3286c710abeb2c9478c2f95657d945a55d176.zip
sdk-9db3286c710abeb2c9478c2f95657d945a55d176.tar.gz
sdk-9db3286c710abeb2c9478c2f95657d945a55d176.tar.bz2
Update the ddmlib api for push/pull/install
The API now throws SyncException instead of returning SyncResult. The IDevice API to install/uninstall now returns a single InstallException that encapsulate all the other ddmlib exception. Also, the recently added exceptions now don't extend IOException anymore. Change-Id: Ib334c4157a6add1882233dfaaa032aea1910eede
Diffstat (limited to 'dumpeventlog')
-rw-r--r--dumpeventlog/src/com/android/dumpeventlog/DumpEventLog.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/dumpeventlog/src/com/android/dumpeventlog/DumpEventLog.java b/dumpeventlog/src/com/android/dumpeventlog/DumpEventLog.java
index 695573c..0669e33 100644
--- a/dumpeventlog/src/com/android/dumpeventlog/DumpEventLog.java
+++ b/dumpeventlog/src/com/android/dumpeventlog/DumpEventLog.java
@@ -16,9 +16,11 @@
package com.android.dumpeventlog;
+import com.android.ddmlib.AdbCommandRejectedException;
import com.android.ddmlib.AndroidDebugBridge;
import com.android.ddmlib.IDevice;
import com.android.ddmlib.Log;
+import com.android.ddmlib.TimeoutException;
import com.android.ddmlib.Log.ILogOutput;
import com.android.ddmlib.Log.LogLevel;
import com.android.ddmlib.log.LogReceiver;
@@ -120,7 +122,7 @@ public class DumpEventLog {
grabLogFrom(device, args[1]);
} catch (FileNotFoundException e) {
e.printStackTrace();
- } catch (IOException e) {
+ } catch (Exception e) {
e.printStackTrace();
}
return;
@@ -133,7 +135,8 @@ public class DumpEventLog {
}
}
- private static void grabLogFrom(IDevice device, String filePath) throws IOException {
+ private static void grabLogFrom(IDevice device, String filePath) throws IOException,
+ TimeoutException, AdbCommandRejectedException {
LogWriter writer = new LogWriter(filePath);
LogReceiver receiver = new LogReceiver(writer);
writer.setReceiver(receiver);