Home
last modified time | relevance | path

Searched refs:Utils (Results 1 – 25 of 25) sorted by relevance

/art/libartservice/service/javatests/com/android/server/art/
DUtilsTest.java32 import com.android.server.art.Utils;
65 assertThat(Utils.isEmpty(List.of())).isTrue(); in testCollectionIsEmptyTrue()
70 assertThat(Utils.isEmpty(List.of(1))).isFalse(); in testCollectionIsEmptyFalse()
75 assertThat(Utils.isEmpty(new SparseArray<Integer>())).isTrue(); in testSparseArrayIsEmptyTrue()
82 assertThat(Utils.isEmpty(array)).isFalse(); in testSparseArrayIsEmptyFalse()
87 assertThat(Utils.isEmpty(new int[0])).isTrue(); in testArrayIsEmptyTrue()
92 assertThat(Utils.isEmpty(new int[] {1})).isFalse(); in testArrayIsEmptyFalse()
101 assertThat(Utils.getAllAbis(pkgState)) in testGetAllAbis()
102 .containsExactly(Utils.Abi.create("armeabi-v7a", "arm", true /* isPrimaryAbi */), in testGetAllAbis()
103 Utils.Abi.create("arm64-v8a", "arm64", false /* isPrimaryAbi */)); in testGetAllAbis()
[all …]
DBackgroundDexoptJobTest.java130 Result result = Utils.getFuture(mBackgroundDexoptJob.start()); in testStart()
151 Utils.getFuture(future1); in testStartAlreadyRunning()
162 Utils.getFuture(future1); in testStartAnother()
164 Utils.getFuture(future2); in testStartAnother()
173 Result result = Utils.getFuture(mBackgroundDexoptJob.start()); in testStartFatalError()
188 Utils.getFuture(mBackgroundDexoptJob.start()); in testStartIgnoreDisabled()
205 Utils.getFuture(future); in testCancel()
DDexUseManagerTest.java137 createPackageState(Utils.PLATFORM_PACKAGE_NAME, "arm64-v8a", true /* hasPackage */); in setUp()
138 addPackage(Utils.PLATFORM_PACKAGE_NAME, platformPkgState); in setUp()
276 mSnapshot, Utils.PLATFORM_PACKAGE_NAME, Map.of(BASE_APK, "CLC")); in verifyPrimaryDexMultipleEntries()
480 mSnapshot, Utils.PLATFORM_PACKAGE_NAME, Map.of(mCeDir + "/foo.apk", "CLC")); in verifySecondaryDexMultipleEntries()
DPreRebootDexoptJobTest.java267 Utils.getFuture(future); in testSyncStart()
413 Utils.sleep(200); in testRace1()
DDexoptHelperTest.java387 Utils.getFuture(future); in testDexoptCancelledDuringDex2oatInvocationsMultiThreaded()
435 Utils.getFuture(future); in testDexoptCancelledDuringDex2oatInvocationsOnCurrentThread()
/art/libartservice/service/java/com/android/server/art/
DArtManagerLocal.java29 import static com.android.server.art.Utils.Abi;
30 import static com.android.server.art.Utils.InitProfileResult;
212 PackageState pkgState = Utils.getPackageStateOrThrow(snapshot, packageName); in deleteDexoptArtifacts()
213 AndroidPackage pkg = Utils.getPackageOrThrow(pkgState); in deleteDexoptArtifacts()
231 Utils.logArtdException(e); in deleteDexoptArtifacts()
267 PackageState pkgState = Utils.getPackageStateOrThrow(snapshot, packageName); in getDexoptStatus()
268 AndroidPackage pkg = Utils.getPackageOrThrow(pkgState); in getDexoptStatus()
298 Utils.logArtdException(e); in getDexoptStatus()
324 PackageState pkgState = Utils.getPackageStateOrThrow(snapshot, packageName); in clearAppProfiles()
325 AndroidPackage pkg = Utils.getPackageOrThrow(pkgState); in clearAppProfiles()
[all …]
DDexUseManagerLocal.java169 Utils.check(!mInjector.isPreReboot()); in systemReady()
339 .map(record -> Utils.assertNonEmpty(record.mClassLoaderContext)) in getSecondaryDexInfoImpl()
361 .map(record -> Utils.assertNonEmpty(record.mAbiName)) in getSecondaryDexInfoImpl()
395 if (loadingPackageName.equals(Utils.PLATFORM_PACKAGE_NAME)) { in notifyDexContainersLoaded()
407 String dexPath = Utils.assertNonEmpty(entry.getKey()); in notifyDexContainersLoaded()
408 String classLoaderContext = Utils.assertNonEmpty(entry.getValue()); in notifyDexContainersLoaded()
423 Utils.getPackageStateOrThrow(snapshot, loadingPackageName); in notifyDexContainersLoaded()
425 Utils.Abi abi = Utils.getPrimaryAbi(loadingPkgState); in notifyDexContainersLoaded()
441 PackageState loadingPkgState = Utils.getPackageStateOrThrow(snapshot, loadingPackageName); in findOwningPackage()
531 Utils.check(!mInjector.isPreReboot()); in save()
[all …]
DDexoptHelper.java144 AndroidPackage pkg = Utils.getPackageOrThrow(pkgState); in dexoptPackages()
179 futures.stream().map(Utils::getFuture).collect(Collectors.toList()); in dexoptPackages()
231 try (var tracing = new Utils.Tracing("dexopt")) { in dexoptPackage()
252 Utils.logArtdException(e); in dexoptPackage()
263 return Utils.canDexoptPackage(pkgState, mInjector.getAppHibernationManager()); in canDexoptPackage()
285 PackageState pkgState = Utils.getPackageStateOrThrow(snapshot, packageName); in getPackageStates()
286 Utils.getPackageOrThrow(pkgState); in getPackageStates()
298 PackageState pkgState = Utils.getPackageStateOrThrow(snapshot, packageName); in getPackageStates()
DArtFileManager.java22 import static com.android.server.art.Utils.Abi;
77 for (Abi abi : Utils.getAllAbis(pkgState)) { in getDexAndAbis()
89 for (Abi abi : Utils.getAllAbisForNames(dexInfo.abiNames(), pkgState)) { in getDexAndAbis()
108 boolean isInDalvikCache = Utils.isInDalvikCache(pkgState, mInjector.getArtd()); in getWritableArtifacts()
110 for (Abi abi : Utils.getAllAbis(pkgState)) { in getWritableArtifacts()
122 for (Abi abi : Utils.getAllAbisForNames(dexInfo.abiNames(), pkgState)) { in getWritableArtifacts()
358 return Utils.isSystemOrRootOrShell(); in isSystemOrRootOrShell()
DDexopter.java23 import static com.android.server.art.Utils.Abi;
24 import static com.android.server.art.Utils.InitProfileResult;
180 Utils.check(isProfileGuidedCompilerFilter == (profile != null)); in dexopt()
184 Utils.check(Utils.implies(needsToBeShared, canBePublic)); in dexopt()
367 targetCompilerFilter, Utils.executeAndWait(callback.executor(), () -> { in adjustCompilerFilter()
420 if (!compilerFilter.isEmpty() && !Utils.isValidArtServiceCompilerFilter(compilerFilter)) { in getSystemUiCompilerFilter()
441 return Utils.getOrInitReferenceProfile(mInjector.getArtd(), dexInfo.dexPath(), in getOrInitReferenceProfile()
449 return Utils.initReferenceProfile(mInjector.getArtd(), dexInfo.dexPath(), in initReferenceProfile()
773 return Utils.isSystemUiPackage(mContext, packageName); in isSystemUiPackage()
777 return Utils.isLauncherPackage(mContext, packageName); in isLauncherPackage()
[all …]
DPreRebootDexoptJob.java65 private static final String JOB_PKG_NAME = Utils.PLATFORM_PACKAGE_NAME;
111 Utils.check(mIsRunningJobKnownByJobScheduler); in onStartJob()
269 Utils.check(mRunningJob == null); in startLocked()
352 Utils.check(value == null || value.equals("_a") || value.equals("_b")); in updateOtaSlotLocked()
354 Utils.check(mOtaSlot == null || value == null || Objects.equals(mOtaSlot, value)); in updateOtaSlotLocked()
DArtJni.java78 Utils.logArtdException(e); in validateDexPath()
97 Utils.logArtdException(e); in validateClassLoaderContext()
DPrimaryDexopter.java22 import static com.android.server.art.Utils.Abi;
86 return Utils.isInDalvikCache(mPkgState, mInjector.getArtd()); in isInDalvikCache()
158 return Utils.getAllAbis(mPkgState); in getAllAbis()
DArtShellCommand.java406 Utils.getFuture(runningJob); in handleBgDexoptJob()
413 BackgroundDexoptJob.Result result = Utils.getFuture(future); in handleBgDexoptJob()
512 if (packageName.equals(Utils.PLATFORM_PACKAGE_NAME)) { in handleSnapshotProfile()
574 PackageState pkgState = Utils.getPackageStateOrThrow(snapshot, packageName); in handleDumpProfile()
575 AndroidPackage pkg = Utils.getPackageOrThrow(pkgState); in handleDumpProfile()
576 try (var tracing = new Utils.Tracing("dump profiles")) { in handleDumpProfile()
633 Utils.executeAndWait(progressCallbackExecutor, () -> { in handleBatchDexopt()
801 Utils.getFuture(future); in handleRunPrDexoptJob()
1065 PackageState pkgState = Utils.getPackageStateOrThrow(snapshot, packageName); in getSplitName()
1066 AndroidPackage pkg = Utils.getPackageOrThrow(pkgState); in getSplitName()
[all …]
DArtdRefCache.java105 Utils.logArtdException(e); in getArtd()
196 Utils.check(mRefCache.mPinCount >= 0); in run()
DUtils.java74 public final class Utils { class
80 private Utils() {} in Utils() method in Utils
111 Utils.check(pkgState.getPrimaryCpuAbi() != null); in getAllAbis()
133 Utils.check(abiNames.stream().allMatch(Utils::isNativeAbi)); in getAllAbisForNames()
158 Utils.check(isNativeAbi(preferredAbi)); in getPrimaryAbi()
DSecondaryDexopter.java22 import static com.android.server.art.Utils.Abi;
122 return Utils.getAllAbisForNames(dexInfo.abiNames(), mPkgState); in getAllAbis()
DBackgroundDexoptJob.java66 private static final String JOB_PKG_NAME = Utils.PLATFORM_PACKAGE_NAME;
148 Utils.executeAndWait( in schedule()
183 try (var tracing = new Utils.TracingWithTimingLogging(AsLog.getTag(), "jobExecution")) { in start()
DDumpHelper.java232 Utils.Abi abi = Utils.getPrimaryAbi(loadingPkgState); in getLoaderState()
DReasonMapping.java138 if (!Utils.isValidArtServiceCompilerFilter(value)) { in getCompilerFilterForReason()
DPrimaryDexUtils.java147 if (!Utils.isEmpty(dependencies)) { in getDetailedDexInfoImpl()
298 if (Utils.isEmpty(sharedLibraries)) { in encodeSharedLibraries()
/art/libartservice/service/java/com/android/server/art/prereboot/
DPreRebootStatsReporter.java35 import com.android.server.art.Utils;
94 Utils.check(reason == Status.STATUS_NOT_SCHEDULED_DISABLED in recordJobNotScheduled()
152 Utils.check(jobRuns.size() > 0); in recordJobEnded()
154 Utils.check(lastRun.getJobEndedTimestampMillis() == 0); in recordJobEnded()
330 Utils.deleteIfExistsSafe(tempFile); in save()
335 Utils.deleteIfExistsSafe(new File(mInjector.getFilename())); in delete()
DPreRebootDriver.java46 import com.android.server.art.Utils;
101 Utils.logArtdException(e); in run()
126 Utils.logArtdException(e); in run()
DPreRebootManager.java35 import com.android.server.art.Utils;
/art/libartservice/service/java/com/android/server/art/model/
DDexoptParams.java32 import com.android.server.art.Utils;
135 } else if (!Utils.isValidArtServiceCompilerFilter(mParams.mCompilerFilter)) { in build()