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 b7a6549654)
This commit is contained in:
Abhijeet Kaur
2019-03-21 15:42:43 +00:00
parent 894c578a02
commit f990cf0392

View File

@@ -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;