Change the default background dexopt concurrency to 4.

This changes gives better utilization to have other dexopt tasks
running when one task is blocked on non-parallelizable operations such
as I/O and runtime initialization.

Bug: 307231036
Test: Presubmit
(cherry picked from https://android-review.googlesource.com/q/commit:350d7731a8e87bfca87611a7e420ccd6320be4ab)
Merged-In: Icd8aa89af0c11dd5f9cba5f0e0671376611385cc
Change-Id: Icd8aa89af0c11dd5f9cba5f0e0671376611385cc
diff --git a/libartservice/service/java/com/android/server/art/ReasonMapping.java b/libartservice/service/java/com/android/server/art/ReasonMapping.java
index 7c64abf..2a1c81b 100644
--- a/libartservice/service/java/com/android/server/art/ReasonMapping.java
+++ b/libartservice/service/java/com/android/server/art/ReasonMapping.java
@@ -188,13 +188,14 @@
 
     /**
      * Loads the concurrency from the system property, for batch dexopt ({@link
-     * ArtManagerLocal#dexoptPackages}), or 1 if the system property is not found or cannot be
-     * parsed.
+     * ArtManagerLocal#dexoptPackages}). The default is tuned to strike a good balance between
+     * device load and dexopt coverage, depending on the situation.
      *
      * @hide
      */
     public static int getConcurrencyForReason(@NonNull @BatchDexoptReason String reason) {
         return SystemProperties.getInt("persist.device_config.runtime." + reason + "_concurrency",
-                SystemProperties.getInt("pm.dexopt." + reason + ".concurrency", 1 /* def */));
+                SystemProperties.getInt("pm.dexopt." + reason + ".concurrency",
+                        reason.equals(REASON_BG_DEXOPT) ? 4 : 1 /* def */));
     }
 }