Update download processing job to report failure when any of the async
download processing task finished exceptionally

Bug: 323574204
Test: atest OnDevicePersonalizationDownloadProcessingJobServiceTests -c,
manual

Change-Id: Ieaf8cb1dfef1dfba50da6d0be705d0a49fcc2245
diff --git a/src/com/android/ondevicepersonalization/services/download/OnDevicePersonalizationDownloadProcessingJobService.java b/src/com/android/ondevicepersonalization/services/download/OnDevicePersonalizationDownloadProcessingJobService.java
index 0298e3d..9425871 100644
--- a/src/com/android/ondevicepersonalization/services/download/OnDevicePersonalizationDownloadProcessingJobService.java
+++ b/src/com/android/ondevicepersonalization/services/download/OnDevicePersonalizationDownloadProcessingJobService.java
@@ -109,11 +109,20 @@
         }
         var unused = Futures.whenAllComplete(mFutures).call(() -> {
             boolean wantsReschedule = false;
+            boolean allSuccess = true;
+            for (ListenableFuture<Void> future : mFutures) {
+                try {
+                    future.get();
+                } catch (Exception e) {
+                    allSuccess = false;
+                    break;
+                }
+            }
             OdpJobServiceLogger.getInstance(
                     OnDevicePersonalizationDownloadProcessingJobService.this)
                     .recordJobFinished(
                             DOWNLOAD_PROCESSING_TASK_JOB_ID,
-                            /* isSuccessful= */ false,
+                            /* isSuccessful= */ allSuccess,
                             wantsReschedule);
             jobFinished(params, wantsReschedule);
             return null;