summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2018-12-07 09:41:20 -0800
committerAmith Yamasani <yamasani@google.com>2018-12-07 10:12:13 -0800
commit6283cb89aea04956592356fb3e672f467f07cdfe (patch)
treeed43a7ba56adbf041ad07649cc2ec5a6dce876af /core/java
parentcd2e4b51dce0541820fe8b945d8a4bd1b7861633 (diff)
Don't throw an exception if write failed
When passing input/output streams between shell command and caller via UiAutomation, the stream could be closed by the instrumentation test. Don't throw an exception if the write failed (due to race). Just log the error. Change-Id: I601589c6dc36fe51f5cc57276084a11f0be3d57d Fixes: 119848628 Test: atest CtsAppTestCases:ActivityManagerProcessStateTest
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/UiAutomationConnection.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/app/UiAutomationConnection.java b/core/java/android/app/UiAutomationConnection.java
index dc2f9838785c..31521a369a4c 100644
--- a/core/java/android/app/UiAutomationConnection.java
+++ b/core/java/android/app/UiAutomationConnection.java
@@ -331,7 +331,7 @@ public final class UiAutomationConnection extends IUiAutomationConnection.Stub {
writeTo.flush();
}
} catch (IOException ioe) {
- throw new RuntimeException("Error while reading/writing ", ioe);
+ Log.w(TAG, "Error while reading/writing to streams");
} finally {
IoUtils.closeQuietly(readFrom);
IoUtils.closeQuietly(writeTo);