Merge "Remove unused flag DEXOPT_ONLY_SHARED_DEX."
This commit is contained in:
committed by
Android (Google) Code Review
commit
09d9b58b59
@@ -652,12 +652,6 @@ public class PackageDexOptimizer {
|
||||
@DexOptResult
|
||||
private int dexOptSecondaryDexPathLI(ApplicationInfo info, String path,
|
||||
PackageDexUsage.DexUseInfo dexUseInfo, DexoptOptions options) {
|
||||
if (options.isDexoptOnlySharedDex() && !dexUseInfo.isUsedByOtherApps()) {
|
||||
// We are asked to optimize only the dex files used by other apps and this is not
|
||||
// on of them: skip it.
|
||||
return DEX_OPT_SKIPPED;
|
||||
}
|
||||
|
||||
String compilerFilter = getRealCompilerFilter(info, options.getCompilerFilter(),
|
||||
dexUseInfo.isUsedByOtherApps());
|
||||
// Get the dexopt flags after getRealCompilerFilter to make sure we get the correct flags.
|
||||
|
||||
@@ -40,10 +40,6 @@ public final class DexoptOptions {
|
||||
// will only consider the primary apk.
|
||||
public static final int DEXOPT_ONLY_SECONDARY_DEX = 1 << 3;
|
||||
|
||||
// When set, dexopt will optimize only dex files that are used by other apps.
|
||||
// Currently, this flag is ignored for primary apks.
|
||||
public static final int DEXOPT_ONLY_SHARED_DEX = 1 << 4;
|
||||
|
||||
// When set, dexopt will attempt to scale down the optimizations previously applied in order
|
||||
// save disk space.
|
||||
public static final int DEXOPT_DOWNGRADE = 1 << 5;
|
||||
@@ -105,7 +101,6 @@ public final class DexoptOptions {
|
||||
DEXOPT_FORCE |
|
||||
DEXOPT_BOOT_COMPLETE |
|
||||
DEXOPT_ONLY_SECONDARY_DEX |
|
||||
DEXOPT_ONLY_SHARED_DEX |
|
||||
DEXOPT_DOWNGRADE |
|
||||
DEXOPT_AS_SHARED_LIBRARY |
|
||||
DEXOPT_IDLE_BACKGROUND_JOB |
|
||||
@@ -146,10 +141,6 @@ public final class DexoptOptions {
|
||||
return (mFlags & DEXOPT_ONLY_SECONDARY_DEX) != 0;
|
||||
}
|
||||
|
||||
public boolean isDexoptOnlySharedDex() {
|
||||
return (mFlags & DEXOPT_ONLY_SHARED_DEX) != 0;
|
||||
}
|
||||
|
||||
public boolean isDowngrade() {
|
||||
return (mFlags & DEXOPT_DOWNGRADE) != 0;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,6 @@ public class DexoptOptionsTests {
|
||||
assertFalse(opt.isBootComplete());
|
||||
assertFalse(opt.isCheckForProfileUpdates());
|
||||
assertFalse(opt.isDexoptOnlySecondaryDex());
|
||||
assertFalse(opt.isDexoptOnlySharedDex());
|
||||
assertFalse(opt.isDowngrade());
|
||||
assertFalse(opt.isForce());
|
||||
assertFalse(opt.isDexoptIdleBackgroundJob());
|
||||
@@ -67,7 +66,6 @@ public class DexoptOptionsTests {
|
||||
DexoptOptions.DEXOPT_BOOT_COMPLETE |
|
||||
DexoptOptions.DEXOPT_CHECK_FOR_PROFILES_UPDATES |
|
||||
DexoptOptions.DEXOPT_ONLY_SECONDARY_DEX |
|
||||
DexoptOptions.DEXOPT_ONLY_SHARED_DEX |
|
||||
DexoptOptions.DEXOPT_DOWNGRADE |
|
||||
DexoptOptions.DEXOPT_AS_SHARED_LIBRARY |
|
||||
DexoptOptions.DEXOPT_IDLE_BACKGROUND_JOB |
|
||||
@@ -81,7 +79,6 @@ public class DexoptOptionsTests {
|
||||
assertTrue(opt.isBootComplete());
|
||||
assertTrue(opt.isCheckForProfileUpdates());
|
||||
assertTrue(opt.isDexoptOnlySecondaryDex());
|
||||
assertTrue(opt.isDexoptOnlySharedDex());
|
||||
assertTrue(opt.isDowngrade());
|
||||
assertTrue(opt.isForce());
|
||||
assertTrue(opt.isDexoptAsSharedLibrary());
|
||||
@@ -113,7 +110,6 @@ public class DexoptOptionsTests {
|
||||
assertTrue(opt.isBootComplete());
|
||||
assertTrue(opt.isCheckForProfileUpdates());
|
||||
assertFalse(opt.isDexoptOnlySecondaryDex());
|
||||
assertFalse(opt.isDexoptOnlySharedDex());
|
||||
assertFalse(opt.isDowngrade());
|
||||
assertTrue(opt.isForce());
|
||||
assertFalse(opt.isDexoptAsSharedLibrary());
|
||||
@@ -131,7 +127,6 @@ public class DexoptOptionsTests {
|
||||
assertTrue(opt.isBootComplete());
|
||||
assertFalse(opt.isCheckForProfileUpdates());
|
||||
assertFalse(opt.isDexoptOnlySecondaryDex());
|
||||
assertFalse(opt.isDexoptOnlySharedDex());
|
||||
assertFalse(opt.isDowngrade());
|
||||
assertTrue(opt.isForce());
|
||||
assertFalse(opt.isDexoptAsSharedLibrary());
|
||||
|
||||
Reference in New Issue
Block a user