diff options
author | 2024-12-13 07:16:59 -0800 | |
---|---|---|
committer | 2025-01-02 09:12:27 -0800 | |
commit | 7a7b5ef17393d7863d9dc9baa0ebb7c2c20b4eac (patch) | |
tree | 34b5758a94407f0415248e39afaafc1d0c4a896a /packages/Shell/src | |
parent | 6dbff25f704aa592fbbe9c6e7983417a4da46c67 (diff) |
Always initialize ScreenshotLocationInfo.
If the screenshot size was less than 1, ScreenshotLocationInfo was not initialized and this led to a NullPointerException.
Bug: b/383927821
Flag: EXEMPT bugfix
Change-Id: Ie950d33ccc7c66d94d8a646de2e3e57aa75b1d3a
Diffstat (limited to 'packages/Shell/src')
-rw-r--r-- | packages/Shell/src/com/android/shell/BugreportProgressService.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java index c6555041164d..61f49db07abc 100644 --- a/packages/Shell/src/com/android/shell/BugreportProgressService.java +++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java @@ -2419,8 +2419,8 @@ public class BugreportProgressService extends Service { 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)); } |