1 /* 2 * Copyright 2021 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package android.system.composd; 17 18 import android.system.composd.ICompilationTask; 19 import android.system.composd.ICompilationTaskCallback; 20 21 interface IIsolatedCompilationService { 22 enum ApexSource { 23 /** Only use the activated APEXes */ 24 NoStaged, 25 /** Prefer any staged APEXes, otherwise use the activated ones */ 26 PreferStaged, 27 } 28 29 /** 30 * Compile BCP extensions and system server, using any staged APEXes that are present in 31 * preference to active APEXes, writing the results to the pending artifacts directory to be 32 * verified by odsing on next boot. 33 * 34 * Compilation continues in the background, and success/failure is reported via the supplied 35 * callback, unless the returned ICompilationTask is cancelled. The caller should maintain 36 * a reference to the ICompilationTask until compilation completes or is cancelled. 37 */ startStagedApexCompile(ICompilationTaskCallback callback)38 ICompilationTask startStagedApexCompile(ICompilationTaskCallback callback); 39 40 /** 41 * Run odrefresh in a test instance of CompOS until completed or failed. 42 * 43 * This compiles BCP extensions and system server, even if the system artifacts are up to date, 44 * and writes the results to a test directory to avoid disrupting any real artifacts in 45 * existence. 46 * 47 * Compilation continues in the background, and success/failure is reported via the supplied 48 * callback, unless the returned ICompilationTask is cancelled. The caller should maintain 49 * a reference to the ICompilationTask until compilation completes or is cancelled. 50 */ startTestCompile(ApexSource apexSource, ICompilationTaskCallback callback)51 ICompilationTask startTestCompile(ApexSource apexSource, ICompilationTaskCallback callback); 52 } 53