1*344a7f5eSAndroid Build Coastguard Worker// Signature format: 2.0 2*344a7f5eSAndroid Build Coastguard Workerpackage com.android.server.art { 3*344a7f5eSAndroid Build Coastguard Worker 4*344a7f5eSAndroid Build Coastguard Worker public final class ArtManagerLocal { 5*344a7f5eSAndroid Build Coastguard Worker ctor @Deprecated public ArtManagerLocal(); 6*344a7f5eSAndroid Build Coastguard Worker ctor public ArtManagerLocal(@NonNull android.content.Context); 7*344a7f5eSAndroid Build Coastguard Worker method public void addDexoptDoneCallback(boolean, @NonNull java.util.concurrent.Executor, @NonNull com.android.server.art.ArtManagerLocal.DexoptDoneCallback); 8*344a7f5eSAndroid Build Coastguard Worker method public void cancelBackgroundDexoptJob(); 9*344a7f5eSAndroid Build Coastguard Worker method public void clearAdjustCompilerFilterCallback(); 10*344a7f5eSAndroid Build Coastguard Worker method @NonNull public void clearAppProfiles(@NonNull com.android.server.pm.PackageManagerLocal.FilteredSnapshot, @NonNull String); 11*344a7f5eSAndroid Build Coastguard Worker method public void clearBatchDexoptStartCallback(); 12*344a7f5eSAndroid Build Coastguard Worker method public void clearScheduleBackgroundDexoptJobCallback(); 13*344a7f5eSAndroid Build Coastguard Worker method @NonNull public com.android.server.art.model.DeleteResult deleteDexoptArtifacts(@NonNull com.android.server.pm.PackageManagerLocal.FilteredSnapshot, @NonNull String); 14*344a7f5eSAndroid Build Coastguard Worker method @NonNull public com.android.server.art.model.DexoptResult dexoptPackage(@NonNull com.android.server.pm.PackageManagerLocal.FilteredSnapshot, @NonNull String, @NonNull com.android.server.art.model.DexoptParams); 15*344a7f5eSAndroid Build Coastguard Worker method @NonNull public com.android.server.art.model.DexoptResult dexoptPackage(@NonNull com.android.server.pm.PackageManagerLocal.FilteredSnapshot, @NonNull String, @NonNull com.android.server.art.model.DexoptParams, @NonNull android.os.CancellationSignal); 16*344a7f5eSAndroid Build Coastguard Worker method public void dump(@NonNull java.io.PrintWriter, @NonNull com.android.server.pm.PackageManagerLocal.FilteredSnapshot); 17*344a7f5eSAndroid Build Coastguard Worker method public void dumpPackage(@NonNull java.io.PrintWriter, @NonNull com.android.server.pm.PackageManagerLocal.FilteredSnapshot, @NonNull String); 18*344a7f5eSAndroid Build Coastguard Worker method @NonNull public com.android.server.art.model.ArtManagedFileStats getArtManagedFileStats(@NonNull com.android.server.pm.PackageManagerLocal.FilteredSnapshot, @NonNull String); 19*344a7f5eSAndroid Build Coastguard Worker method @NonNull public com.android.server.art.model.DexoptStatus getDexoptStatus(@NonNull com.android.server.pm.PackageManagerLocal.FilteredSnapshot, @NonNull String); 20*344a7f5eSAndroid Build Coastguard Worker method @NonNull public com.android.server.art.model.DexoptStatus getDexoptStatus(@NonNull com.android.server.pm.PackageManagerLocal.FilteredSnapshot, @NonNull String, int); 21*344a7f5eSAndroid Build Coastguard Worker method public int handleShellCommand(@NonNull android.os.Binder, @NonNull android.os.ParcelFileDescriptor, @NonNull android.os.ParcelFileDescriptor, @NonNull android.os.ParcelFileDescriptor, @NonNull String[]); 22*344a7f5eSAndroid Build Coastguard Worker method public void onApexStaged(@NonNull String[]); 23*344a7f5eSAndroid Build Coastguard Worker method public void onBoot(@NonNull String, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<com.android.server.art.model.OperationProgress>); 24*344a7f5eSAndroid Build Coastguard Worker method public void printShellCommandHelp(@NonNull java.io.PrintWriter); 25*344a7f5eSAndroid Build Coastguard Worker method public void removeDexoptDoneCallback(@NonNull com.android.server.art.ArtManagerLocal.DexoptDoneCallback); 26*344a7f5eSAndroid Build Coastguard Worker method public int scheduleBackgroundDexoptJob(); 27*344a7f5eSAndroid Build Coastguard Worker method public void setAdjustCompilerFilterCallback(@NonNull java.util.concurrent.Executor, @NonNull com.android.server.art.ArtManagerLocal.AdjustCompilerFilterCallback); 28*344a7f5eSAndroid Build Coastguard Worker method public void setBatchDexoptStartCallback(@NonNull java.util.concurrent.Executor, @NonNull com.android.server.art.ArtManagerLocal.BatchDexoptStartCallback); 29*344a7f5eSAndroid Build Coastguard Worker method public void setScheduleBackgroundDexoptJobCallback(@NonNull java.util.concurrent.Executor, @NonNull com.android.server.art.ArtManagerLocal.ScheduleBackgroundDexoptJobCallback); 30*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.os.ParcelFileDescriptor snapshotAppProfile(@NonNull com.android.server.pm.PackageManagerLocal.FilteredSnapshot, @NonNull String, @Nullable String) throws com.android.server.art.ArtManagerLocal.SnapshotProfileException; 31*344a7f5eSAndroid Build Coastguard Worker method @NonNull public android.os.ParcelFileDescriptor snapshotBootImageProfile(@NonNull com.android.server.pm.PackageManagerLocal.FilteredSnapshot) throws com.android.server.art.ArtManagerLocal.SnapshotProfileException; 32*344a7f5eSAndroid Build Coastguard Worker method public void startBackgroundDexoptJob(); 33*344a7f5eSAndroid Build Coastguard Worker method public void unscheduleBackgroundDexoptJob(); 34*344a7f5eSAndroid Build Coastguard Worker } 35*344a7f5eSAndroid Build Coastguard Worker 36*344a7f5eSAndroid Build Coastguard Worker public static interface ArtManagerLocal.AdjustCompilerFilterCallback { 37*344a7f5eSAndroid Build Coastguard Worker method @NonNull public String onAdjustCompilerFilter(@NonNull String, @NonNull String, @NonNull String); 38*344a7f5eSAndroid Build Coastguard Worker } 39*344a7f5eSAndroid Build Coastguard Worker 40*344a7f5eSAndroid Build Coastguard Worker public static interface ArtManagerLocal.BatchDexoptStartCallback { 41*344a7f5eSAndroid Build Coastguard Worker method public void onBatchDexoptStart(@NonNull com.android.server.pm.PackageManagerLocal.FilteredSnapshot, @NonNull String, @NonNull java.util.List<java.lang.String>, @NonNull com.android.server.art.model.BatchDexoptParams.Builder, @NonNull android.os.CancellationSignal); 42*344a7f5eSAndroid Build Coastguard Worker } 43*344a7f5eSAndroid Build Coastguard Worker 44*344a7f5eSAndroid Build Coastguard Worker public static interface ArtManagerLocal.DexoptDoneCallback { 45*344a7f5eSAndroid Build Coastguard Worker method public void onDexoptDone(@NonNull com.android.server.art.model.DexoptResult); 46*344a7f5eSAndroid Build Coastguard Worker } 47*344a7f5eSAndroid Build Coastguard Worker 48*344a7f5eSAndroid Build Coastguard Worker public static interface ArtManagerLocal.ScheduleBackgroundDexoptJobCallback { 49*344a7f5eSAndroid Build Coastguard Worker method public void onOverrideJobInfo(@NonNull android.app.job.JobInfo.Builder); 50*344a7f5eSAndroid Build Coastguard Worker } 51*344a7f5eSAndroid Build Coastguard Worker 52*344a7f5eSAndroid Build Coastguard Worker public static class ArtManagerLocal.SnapshotProfileException extends java.lang.Exception { 53*344a7f5eSAndroid Build Coastguard Worker } 54*344a7f5eSAndroid Build Coastguard Worker 55*344a7f5eSAndroid Build Coastguard Worker public class ArtModuleServiceInitializer { 56*344a7f5eSAndroid Build Coastguard Worker method public static void setArtModuleServiceManager(@NonNull android.os.ArtModuleServiceManager); 57*344a7f5eSAndroid Build Coastguard Worker } 58*344a7f5eSAndroid Build Coastguard Worker 59*344a7f5eSAndroid Build Coastguard Worker public class DexUseManagerLocal { 60*344a7f5eSAndroid Build Coastguard Worker method @NonNull public static com.android.server.art.DexUseManagerLocal createInstance(@NonNull android.content.Context); 61*344a7f5eSAndroid Build Coastguard Worker method @NonNull public java.util.List<com.android.server.art.model.DexContainerFileUseInfo> getSecondaryDexContainerFileUseInfo(@NonNull String); 62*344a7f5eSAndroid Build Coastguard Worker method public void notifyDexContainersLoaded(@NonNull com.android.server.pm.PackageManagerLocal.FilteredSnapshot, @NonNull String, @NonNull java.util.Map<java.lang.String,java.lang.String>); 63*344a7f5eSAndroid Build Coastguard Worker method public void systemReady(); 64*344a7f5eSAndroid Build Coastguard Worker } 65*344a7f5eSAndroid Build Coastguard Worker 66*344a7f5eSAndroid Build Coastguard Worker public class ReasonMapping { 67*344a7f5eSAndroid Build Coastguard Worker field public static final String REASON_BG_DEXOPT = "bg-dexopt"; 68*344a7f5eSAndroid Build Coastguard Worker field public static final String REASON_BOOT_AFTER_MAINLINE_UPDATE = "boot-after-mainline-update"; 69*344a7f5eSAndroid Build Coastguard Worker field public static final String REASON_BOOT_AFTER_OTA = "boot-after-ota"; 70*344a7f5eSAndroid Build Coastguard Worker field public static final String REASON_CMDLINE = "cmdline"; 71*344a7f5eSAndroid Build Coastguard Worker field public static final String REASON_FIRST_BOOT = "first-boot"; 72*344a7f5eSAndroid Build Coastguard Worker field public static final String REASON_INACTIVE = "inactive"; 73*344a7f5eSAndroid Build Coastguard Worker field public static final String REASON_INSTALL = "install"; 74*344a7f5eSAndroid Build Coastguard Worker field public static final String REASON_INSTALL_BULK = "install-bulk"; 75*344a7f5eSAndroid Build Coastguard Worker field public static final String REASON_INSTALL_BULK_DOWNGRADED = "install-bulk-downgraded"; 76*344a7f5eSAndroid Build Coastguard Worker field public static final String REASON_INSTALL_BULK_SECONDARY = "install-bulk-secondary"; 77*344a7f5eSAndroid Build Coastguard Worker field public static final String REASON_INSTALL_BULK_SECONDARY_DOWNGRADED = "install-bulk-secondary-downgraded"; 78*344a7f5eSAndroid Build Coastguard Worker field public static final String REASON_INSTALL_FAST = "install-fast"; 79*344a7f5eSAndroid Build Coastguard Worker } 80*344a7f5eSAndroid Build Coastguard Worker 81*344a7f5eSAndroid Build Coastguard Worker} 82*344a7f5eSAndroid Build Coastguard Worker 83*344a7f5eSAndroid Build Coastguard Workerpackage com.android.server.art.model { 84*344a7f5eSAndroid Build Coastguard Worker 85*344a7f5eSAndroid Build Coastguard Worker public class ArtFlags { 86*344a7f5eSAndroid Build Coastguard Worker method public static int defaultGetStatusFlags(); 87*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_FORCE = 16; // 0x10 88*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_FOR_PRIMARY_DEX = 1; // 0x1 89*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_FOR_SECONDARY_DEX = 2; // 0x2 90*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_FOR_SINGLE_SPLIT = 32; // 0x20 91*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_IGNORE_PROFILE = 128; // 0x80 92*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_SHOULD_DOWNGRADE = 8; // 0x8 93*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_SHOULD_INCLUDE_DEPENDENCIES = 4; // 0x4 94*344a7f5eSAndroid Build Coastguard Worker field public static final int FLAG_SKIP_IF_STORAGE_LOW = 64; // 0x40 95*344a7f5eSAndroid Build Coastguard Worker field public static final int PRIORITY_BACKGROUND = 40; // 0x28 96*344a7f5eSAndroid Build Coastguard Worker field public static final int PRIORITY_BOOT = 100; // 0x64 97*344a7f5eSAndroid Build Coastguard Worker field public static final int PRIORITY_INTERACTIVE = 60; // 0x3c 98*344a7f5eSAndroid Build Coastguard Worker field public static final int PRIORITY_INTERACTIVE_FAST = 80; // 0x50 99*344a7f5eSAndroid Build Coastguard Worker field public static final int SCHEDULE_DISABLED_BY_SYSPROP = 2; // 0x2 100*344a7f5eSAndroid Build Coastguard Worker field public static final int SCHEDULE_JOB_SCHEDULER_FAILURE = 1; // 0x1 101*344a7f5eSAndroid Build Coastguard Worker field public static final int SCHEDULE_SUCCESS = 0; // 0x0 102*344a7f5eSAndroid Build Coastguard Worker } 103*344a7f5eSAndroid Build Coastguard Worker 104*344a7f5eSAndroid Build Coastguard Worker public class ArtManagedFileStats { 105*344a7f5eSAndroid Build Coastguard Worker method public long getTotalSizeBytesByType(int); 106*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_CUR_PROFILE = 2; // 0x2 107*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_DEXOPT_ARTIFACT = 0; // 0x0 108*344a7f5eSAndroid Build Coastguard Worker field public static final int TYPE_REF_PROFILE = 1; // 0x1 109*344a7f5eSAndroid Build Coastguard Worker } 110*344a7f5eSAndroid Build Coastguard Worker 111*344a7f5eSAndroid Build Coastguard Worker public abstract class BatchDexoptParams { 112*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract com.android.server.art.model.DexoptParams getDexoptParams(); 113*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract java.util.List<java.lang.String> getPackages(); 114*344a7f5eSAndroid Build Coastguard Worker } 115*344a7f5eSAndroid Build Coastguard Worker 116*344a7f5eSAndroid Build Coastguard Worker public static final class BatchDexoptParams.Builder { 117*344a7f5eSAndroid Build Coastguard Worker method @NonNull public com.android.server.art.model.BatchDexoptParams build(); 118*344a7f5eSAndroid Build Coastguard Worker method @NonNull public com.android.server.art.model.BatchDexoptParams.Builder setDexoptParams(@NonNull com.android.server.art.model.DexoptParams); 119*344a7f5eSAndroid Build Coastguard Worker method @NonNull public com.android.server.art.model.BatchDexoptParams.Builder setPackages(@NonNull java.util.List<java.lang.String>); 120*344a7f5eSAndroid Build Coastguard Worker } 121*344a7f5eSAndroid Build Coastguard Worker 122*344a7f5eSAndroid Build Coastguard Worker public abstract class DeleteResult { 123*344a7f5eSAndroid Build Coastguard Worker method public abstract long getFreedBytes(); 124*344a7f5eSAndroid Build Coastguard Worker } 125*344a7f5eSAndroid Build Coastguard Worker 126*344a7f5eSAndroid Build Coastguard Worker public abstract class DexContainerFileUseInfo { 127*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract String getDexContainerFile(); 128*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract java.util.Set<java.lang.String> getLoadingPackages(); 129*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract android.os.UserHandle getUserHandle(); 130*344a7f5eSAndroid Build Coastguard Worker } 131*344a7f5eSAndroid Build Coastguard Worker 132*344a7f5eSAndroid Build Coastguard Worker public class DexoptParams { 133*344a7f5eSAndroid Build Coastguard Worker method @NonNull public String getCompilerFilter(); 134*344a7f5eSAndroid Build Coastguard Worker method public int getFlags(); 135*344a7f5eSAndroid Build Coastguard Worker method public int getPriorityClass(); 136*344a7f5eSAndroid Build Coastguard Worker method @NonNull public String getReason(); 137*344a7f5eSAndroid Build Coastguard Worker method @Nullable public String getSplitName(); 138*344a7f5eSAndroid Build Coastguard Worker field public static final String COMPILER_FILTER_NOOP = "skip"; 139*344a7f5eSAndroid Build Coastguard Worker } 140*344a7f5eSAndroid Build Coastguard Worker 141*344a7f5eSAndroid Build Coastguard Worker public static final class DexoptParams.Builder { 142*344a7f5eSAndroid Build Coastguard Worker ctor public DexoptParams.Builder(@NonNull String); 143*344a7f5eSAndroid Build Coastguard Worker ctor public DexoptParams.Builder(@NonNull String, int); 144*344a7f5eSAndroid Build Coastguard Worker method @NonNull public com.android.server.art.model.DexoptParams build(); 145*344a7f5eSAndroid Build Coastguard Worker method @NonNull public com.android.server.art.model.DexoptParams.Builder setCompilerFilter(@NonNull String); 146*344a7f5eSAndroid Build Coastguard Worker method @NonNull public com.android.server.art.model.DexoptParams.Builder setFlags(int); 147*344a7f5eSAndroid Build Coastguard Worker method @NonNull public com.android.server.art.model.DexoptParams.Builder setFlags(int, int); 148*344a7f5eSAndroid Build Coastguard Worker method @NonNull public com.android.server.art.model.DexoptParams.Builder setPriorityClass(int); 149*344a7f5eSAndroid Build Coastguard Worker method @NonNull public com.android.server.art.model.DexoptParams.Builder setSplitName(@Nullable String); 150*344a7f5eSAndroid Build Coastguard Worker } 151*344a7f5eSAndroid Build Coastguard Worker 152*344a7f5eSAndroid Build Coastguard Worker public abstract class DexoptResult { 153*344a7f5eSAndroid Build Coastguard Worker method public int getFinalStatus(); 154*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract java.util.List<com.android.server.art.model.DexoptResult.PackageDexoptResult> getPackageDexoptResults(); 155*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract String getReason(); 156*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract String getRequestedCompilerFilter(); 157*344a7f5eSAndroid Build Coastguard Worker field public static final int DEXOPT_CANCELLED = 40; // 0x28 158*344a7f5eSAndroid Build Coastguard Worker field public static final int DEXOPT_FAILED = 30; // 0x1e 159*344a7f5eSAndroid Build Coastguard Worker field public static final int DEXOPT_PERFORMED = 20; // 0x14 160*344a7f5eSAndroid Build Coastguard Worker field public static final int DEXOPT_SKIPPED = 10; // 0xa 161*344a7f5eSAndroid Build Coastguard Worker field public static final int EXTENDED_BAD_EXTERNAL_PROFILE = 4; // 0x4 162*344a7f5eSAndroid Build Coastguard Worker field public static final int EXTENDED_SKIPPED_NO_DEX_CODE = 2; // 0x2 163*344a7f5eSAndroid Build Coastguard Worker field public static final int EXTENDED_SKIPPED_STORAGE_LOW = 1; // 0x1 164*344a7f5eSAndroid Build Coastguard Worker } 165*344a7f5eSAndroid Build Coastguard Worker 166*344a7f5eSAndroid Build Coastguard Worker public abstract static class DexoptResult.DexContainerFileDexoptResult { 167*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract String getAbi(); 168*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract String getActualCompilerFilter(); 169*344a7f5eSAndroid Build Coastguard Worker method public abstract long getDex2oatCpuTimeMillis(); 170*344a7f5eSAndroid Build Coastguard Worker method public abstract long getDex2oatWallTimeMillis(); 171*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract String getDexContainerFile(); 172*344a7f5eSAndroid Build Coastguard Worker method public abstract int getExtendedStatusFlags(); 173*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract java.util.List<java.lang.String> getExternalProfileErrors(); 174*344a7f5eSAndroid Build Coastguard Worker method public abstract long getSizeBeforeBytes(); 175*344a7f5eSAndroid Build Coastguard Worker method public abstract long getSizeBytes(); 176*344a7f5eSAndroid Build Coastguard Worker method public abstract int getStatus(); 177*344a7f5eSAndroid Build Coastguard Worker method public abstract boolean isPrimaryAbi(); 178*344a7f5eSAndroid Build Coastguard Worker } 179*344a7f5eSAndroid Build Coastguard Worker 180*344a7f5eSAndroid Build Coastguard Worker public abstract static class DexoptResult.PackageDexoptResult { 181*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract java.util.List<com.android.server.art.model.DexoptResult.DexContainerFileDexoptResult> getDexContainerFileDexoptResults(); 182*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract String getPackageName(); 183*344a7f5eSAndroid Build Coastguard Worker method public int getStatus(); 184*344a7f5eSAndroid Build Coastguard Worker method public boolean hasUpdatedArtifacts(); 185*344a7f5eSAndroid Build Coastguard Worker } 186*344a7f5eSAndroid Build Coastguard Worker 187*344a7f5eSAndroid Build Coastguard Worker public abstract class DexoptStatus { 188*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract java.util.List<com.android.server.art.model.DexoptStatus.DexContainerFileDexoptStatus> getDexContainerFileDexoptStatuses(); 189*344a7f5eSAndroid Build Coastguard Worker } 190*344a7f5eSAndroid Build Coastguard Worker 191*344a7f5eSAndroid Build Coastguard Worker public abstract static class DexoptStatus.DexContainerFileDexoptStatus { 192*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract String getAbi(); 193*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract String getCompilationReason(); 194*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract String getCompilerFilter(); 195*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract String getDexContainerFile(); 196*344a7f5eSAndroid Build Coastguard Worker method @NonNull public abstract String getLocationDebugString(); 197*344a7f5eSAndroid Build Coastguard Worker method public abstract boolean isPrimaryAbi(); 198*344a7f5eSAndroid Build Coastguard Worker method public abstract boolean isPrimaryDex(); 199*344a7f5eSAndroid Build Coastguard Worker } 200*344a7f5eSAndroid Build Coastguard Worker 201*344a7f5eSAndroid Build Coastguard Worker public abstract class OperationProgress { 202*344a7f5eSAndroid Build Coastguard Worker method public int getPercentage(); 203*344a7f5eSAndroid Build Coastguard Worker } 204*344a7f5eSAndroid Build Coastguard Worker 205*344a7f5eSAndroid Build Coastguard Worker} 206*344a7f5eSAndroid Build Coastguard Worker 207