Add two more bg dexopt job status code.

Also adds more comments to each status code.

Bug: 259799817
Test: Presubmit
Change-Id: If14e2bd62669164a8eccffcef6c3aae56310131b
Merged-In: If14e2bd62669164a8eccffcef6c3aae56310131b
(cherry picked from commit 29d15cb72cd3c2315c15896fc45c0a6f559189bb)
diff --git a/stats/atoms.proto b/stats/atoms.proto
index 22092bb..ddca387 100644
--- a/stats/atoms.proto
+++ b/stats/atoms.proto
@@ -21396,10 +21396,46 @@
         // `BackgroundDexOptService.Status.STATUS_DEX_OPT_FAILED`.)
         STATUS_JOB_FINISHED = 1;
 
+        // The job is aborted by the job scheduler. The reason is logged in
+        // `cancellation_reason`.
         STATUS_ABORT_BY_CANCELLATION = 2;
+
+        // The job is aborted by itself because there is no space left. Note
+        // that this does NOT include cases where the job is aborted by the job
+        // scheduler due to no space left, which are logged as
+        // `STATUS_ABORT_BY_CANCELLATION` with `cancellation_reason` being
+        // `STOP_REASON_CONSTRAINT_STORAGE_NOT_LOW`.
         STATUS_ABORT_NO_SPACE_LEFT = 3;
+
+        // The job is aborted by itself because of thermal issues. Note that
+        // this does NOT include cases where the job is aborted by the job
+        // scheduler due to thermal issues, which are logged as
+        // `STATUS_ABORT_BY_CANCELLATION` with `cancellation_reason` being
+        // `STOP_REASON_DEVICE_STATE`.
+        //
+        // Only applies to the legacy dexopt job.
         STATUS_ABORT_THERMAL = 4;
+
+        // The job is aborted by itself because of unsatisfied battery level.
+        // Note that this does NOT include cases where the job is aborted by the
+        // job scheduler due to unsatisfied battery level, which are logged as
+        // `STATUS_ABORT_BY_CANCELLATION` with `cancellation_reason` being
+        // `STOP_REASON_CONSTRAINT_BATTERY_NOT_LOW`.
+        //
+        // Only applies to the legacy dexopt job.
         STATUS_ABORT_BATTERY = 5;
+
+        // The job is aborted by the API
+        // `ArtManagerLocal.cancelBackgroundDexoptJob`.
+        //
+        // Only applies to the background dexopt job in ART Service.
+        STATUS_ABORT_BY_API = 6;
+
+        // The job encountered a fatal error, such as a runtime exception. Note
+        // that this does NOT include cases where the job finishes normally with
+        // some dexopt failures on some apps, which are expected and logged as
+        // `STATUS_JOB_FINISHED`.
+        STATUS_FATAL_ERROR = 7;
     }
 
     optional Status status = 1;