Merge "Only try to add details to zip once." into nyc-dev am: 0304688
am: 01c93c4
* commit '01c93c476ab5ed299e99eaeed3ce962a9cd6f1fe':
Only try to add details to zip once.
Change-Id: I6df023671a41d3bc7762d74c1b3b875332b56483
This commit is contained in:
@@ -1084,16 +1084,17 @@ public class BugreportProgressService extends Service {
|
|||||||
addEntry(zos, "title.txt", info.title);
|
addEntry(zos, "title.txt", info.title);
|
||||||
addEntry(zos, "description.txt", info.description);
|
addEntry(zos, "description.txt", info.description);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
info.addingDetailsToZip = false;
|
|
||||||
Log.e(TAG, "exception zipping file " + tmpZip, e);
|
Log.e(TAG, "exception zipping file " + tmpZip, e);
|
||||||
return;
|
return;
|
||||||
|
} finally {
|
||||||
|
// Make sure it only tries to add details once, even it fails the first time.
|
||||||
|
info.addedDetailsToZip = true;
|
||||||
|
info.addingDetailsToZip = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!tmpZip.renameTo(info.bugreportFile)) {
|
if (!tmpZip.renameTo(info.bugreportFile)) {
|
||||||
Log.e(TAG, "Could not rename " + tmpZip + " to " + info.bugreportFile);
|
Log.e(TAG, "Could not rename " + tmpZip + " to " + info.bugreportFile);
|
||||||
}
|
}
|
||||||
info.addedDetailsToZip = true;
|
|
||||||
info.addingDetailsToZip = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void addEntry(ZipOutputStream zos, String entry, String text)
|
private static void addEntry(ZipOutputStream zos, String entry, String text)
|
||||||
|
|||||||
Reference in New Issue
Block a user