summaryrefslogtreecommitdiff
path: root/packages/Shell/src
diff options
context:
space:
mode:
author Abhijeet Kaur <abkaur@google.com> 2019-03-21 15:42:43 +0000
committer Abhijeet Kaur <abkaur@google.com> 2019-03-23 15:39:03 +0000
commitf990cf0392a02d79a010eea408705a3d3e0b5c2b (patch)
treeb6777679e341621e2a43ab8fc42260a59fd2e52e /packages/Shell/src
parent894c578a023b49e1b7852dea8629520b6d66d27e (diff)
Add Looper.prepare() to doInBackground()
Fix runtime error that was being thrown as Looper.prepare() was not called in the async function doInBackground. Bug: 124612105 Test: Was not able to reproduce the bug (that is make code execution flow through the catch block). * Reproduced by throwing IOException in the try block so that code flows to the catch block. * Build and flash. * Take interactive bugreport and change title and name of the bugreport from the progress bar. Merged-In: I6a5ea594d95462e1c66bd28eb81dd5f4daa6f35e Change-Id: I6a5ea594d95462e1c66bd28eb81dd5f4daa6f35e (cherry picked from commit b7a6549654374800d3954b4e765c86b5a888258b)
Diffstat (limited to 'packages/Shell/src')
-rw-r--r--packages/Shell/src/com/android/shell/BugreportProgressService.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java
index a9ff21fef99c..1060c7b7ce79 100644
--- a/packages/Shell/src/com/android/shell/BugreportProgressService.java
+++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java
@@ -1095,6 +1095,7 @@ public class BugreportProgressService extends Service {
new AsyncTask<Void, Void, Void>() {
@Override
protected Void doInBackground(Void... params) {
+ Looper.prepare();
zipBugreport(info);
sendBugreportNotification(info, takingScreenshot);
return null;