Merge cherrypicks of ['googleplex-android-review.googlesource.com/30879320'] into 25Q1-release.

Change-Id: Ifc977ae7373b85c2664bbc6879d6b7473b7b953d
diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java
index 0694b61..62f48ea 100644
--- a/packages/Shell/src/com/android/shell/BugreportProgressService.java
+++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java
@@ -2404,8 +2404,8 @@
             bugreportLocationInfo = new BugreportLocationInfo(readFile(in));
 
             int screenshotSize = in.readInt();
+            screenshotLocationInfo = new ScreenshotLocationInfo(null);
             for (int i = 1; i <= screenshotSize; i++) {
-                screenshotLocationInfo = new ScreenshotLocationInfo(null);
                 screenshotLocationInfo.mScreenshotFiles.add(readFile(in));
             }