Merge "Skip class path checking for secondary dex files"

This commit is contained in:
Calin Juravle
2017-02-16 00:04:44 +00:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 5 deletions

View File

@@ -66,6 +66,9 @@ public class PackageDexOptimizer {
public static final int DEX_OPT_PERFORMED = 1;
public static final int DEX_OPT_FAILED = -1;
/** Special library name that skips shared libraries check during compilation. */
public static final String SKIP_SHARED_LIBRARY_CHECK = "&";
private final Installer mInstaller;
private final Object mInstallLock;
@@ -274,7 +277,7 @@ public class PackageDexOptimizer {
// TODO(calin): maybe add a separate call.
mInstaller.dexopt(path, info.uid, info.packageName, isa, /*dexoptNeeded*/ 0,
/*oatDir*/ null, dexoptFlags,
compilerFilter, info.volumeUuid, /*sharedLibrariesPath*/ null);
compilerFilter, info.volumeUuid, SKIP_SHARED_LIBRARY_CHECK);
}
return DEX_OPT_PERFORMED;

View File

@@ -545,9 +545,6 @@ public class PackageManagerService extends IPackageManager.Stub {
public static final int REASON_LAST = REASON_CORE_APP;
/** Special library name that skips shared libraries check during compilation. */
private static final String SKIP_SHARED_LIBRARY_CHECK = "&";
/** All dangerous permission names in the same order as the events in MetricsEvent */
private static final List<String> ALL_DANGEROUS_PERMISSIONS = Arrays.asList(
Manifest.permission.READ_CALENDAR,
@@ -2401,7 +2398,7 @@ public class PackageManagerService extends IPackageManager.Stub {
DEXOPT_PUBLIC,
getCompilerFilterForReason(REASON_SHARED_APK),
StorageManager.UUID_PRIVATE_INTERNAL,
SKIP_SHARED_LIBRARY_CHECK);
PackageDexOptimizer.SKIP_SHARED_LIBRARY_CHECK);
}
} catch (FileNotFoundException e) {
Slog.w(TAG, "Library not found: " + libPath);