Compos test compilation is only for dogfooders and is critical

For dogfooders (to be specific, userdebug/eng builds), compos test
compilation is triggered daily (when the device is idle of course) even
without ART mainline updates. If it fails to start the VM, composd is
killed - instead of reporting it back to system_server where it is
silently ignored. The composd crash report will then automatically be
written to the dropbox so that dogfooders have a chance to upload it.

Bug: 250929504
Test: `adb shell cmd jobscheduler run -f android 5132250`
and `adb shell "kill -11 $(pidof composd)"`

Change-Id: Ia9bb1597f8f9ead7b88dcce2e92adf61bdcafc7e
diff --git a/compos/composd/src/service.rs b/compos/composd/src/service.rs
index 49cfd3a..27c31e3 100644
--- a/compos/composd/src/service.rs
+++ b/compos/composd/src/service.rs
@@ -67,7 +67,10 @@
             ApexSource::PreferStaged => true,
             _ => unreachable!("Invalid ApexSource {:?}", apex_source),
         };
-        to_binder_result(self.do_start_test_compile(prefer_staged, callback))
+        // b/250929504 failure here intentionally crashes composd to trigger a bugreport
+        Ok(self
+            .do_start_test_compile(prefer_staged, callback)
+            .expect("Failed to start the test compile"))
     }
 }
 
diff --git a/compos/service/java/com/android/server/compos/IsolatedCompilationJobService.java b/compos/service/java/com/android/server/compos/IsolatedCompilationJobService.java
index f55b42c..be56430 100644
--- a/compos/service/java/com/android/server/compos/IsolatedCompilationJobService.java
+++ b/compos/service/java/com/android/server/compos/IsolatedCompilationJobService.java
@@ -23,6 +23,7 @@
 import android.app.job.JobScheduler;
 import android.app.job.JobService;
 import android.content.ComponentName;
+import android.os.Build;
 import android.os.IBinder;
 import android.os.RemoteException;
 import android.os.ServiceManager;
@@ -50,7 +51,9 @@
     private final AtomicReference<CompilationJob> mCurrentJob = new AtomicReference<>();
 
     static void scheduleDailyJob(JobScheduler scheduler) {
-        // TODO(b/205296305) Remove this
+        // This daily job is only for dogfooders (userdebug/eng)
+        if (Build.IS_USER) return;
+
         ComponentName serviceName =
                 new ComponentName("android", IsolatedCompilationJobService.class.getName());