summaryrefslogtreecommitdiff
path: root/packages/Shell/src
diff options
context:
space:
mode:
authorAbhijeet Kaur <abkaur@google.com>2019-10-10 16:29:54 +0100
committerAbhijeet Kaur <abkaur@google.com>2019-10-10 16:29:54 +0100
commit5735c6a2477d099f6b73a7b4151038b585b9468f (patch)
treec6d5fc19ddbed92dc13789e0decd528cde6089c6 /packages/Shell/src
parent4238f749cc734fa34d1cdc9ab0544c8d15e4479c (diff)
Read screenshot file from screenshotFiles array
Regression from merge issue that was created when merging ag/9489200 and ag/9502526. Previously, before saving the screenshot file in the array, it had to be created each time it was required. Bug: 123617758 Test: manual Change-Id: I2dc2924aa20609d2445af00025580b2752935903
Diffstat (limited to 'packages/Shell/src')
-rw-r--r--packages/Shell/src/com/android/shell/BugreportProgressService.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java
index a0972498ab2a..665bde341515 100644
--- a/packages/Shell/src/com/android/shell/BugreportProgressService.java
+++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java
@@ -476,10 +476,10 @@ public class BugreportProgressService extends Service {
}
private static void addScreenshotToIntent(Intent intent, BugreportInfo info) {
- final String screenshotFileName = info.name + ".png";
- final File screenshotFile = new File(BUGREPORT_DIR, screenshotFileName);
- final String screenshotFilePath = screenshotFile.getAbsolutePath();
- if (screenshotFile.length() > 0) {
+ final File screenshotFile = info.screenshotFiles.isEmpty()
+ ? null : info.screenshotFiles.get(0);
+ if (screenshotFile != null && screenshotFile.length() > 0) {
+ final String screenshotFilePath = screenshotFile.getAbsolutePath();
intent.putExtra(EXTRA_SCREENSHOT, screenshotFilePath);
}
return;