From 45a905bbafcbcbf89933e9b9226977995bae1afa Mon Sep 17 00:00:00 2001 From: Felipe Leme Date: Thu, 21 Apr 2016 17:30:47 -0700 Subject: [PATCH] Show a toast when details cannot be added to zip file. BUG: 28291423 Change-Id: I7febf66ef23f38b41fb1909324ee2260444518f6 --- packages/Shell/res/values/strings.xml | 2 ++ .../Shell/src/com/android/shell/BugreportProgressService.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/Shell/res/values/strings.xml b/packages/Shell/res/values/strings.xml index 95e36fd479d3d..3d6643d8b0a0e 100644 --- a/packages/Shell/res/values/strings.xml +++ b/packages/Shell/res/values/strings.xml @@ -44,6 +44,8 @@ Bug report file could not be read + + Couldn\'t add bug report details to zip file unnamed diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java index 7023a1a7d566d..474e3e64ad3d2 100644 --- a/packages/Shell/src/com/android/shell/BugreportProgressService.java +++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java @@ -1134,6 +1134,8 @@ public class BugreportProgressService extends Service { addEntry(zos, "description.txt", info.description); } catch (IOException e) { Log.e(TAG, "exception zipping file " + tmpZip, e); + Toast.makeText(mContext, R.string.bugreport_add_details_to_zip_failed, + Toast.LENGTH_LONG).show(); return; } finally { // Make sure it only tries to add details once, even it fails the first time.