Loading services/core/java/com/android/server/am/CachedAppOptimizer.java +1 −1 Original line number Diff line number Diff line Loading @@ -118,7 +118,7 @@ public final class CachedAppOptimizer { private static final int FREEZE_BINDER_TIMEOUT_MS = 100; // Defaults for phenotype flags. @VisibleForTesting static final Boolean DEFAULT_USE_COMPACTION = false; @VisibleForTesting static final Boolean DEFAULT_USE_COMPACTION = true; @VisibleForTesting static final Boolean DEFAULT_USE_FREEZER = true; @VisibleForTesting static final int DEFAULT_COMPACT_ACTION_2 = COMPACT_ACTION_ALL; @VisibleForTesting static final int DEFAULT_COMPACT_ACTION_1 = COMPACT_ACTION_FILE; Loading services/tests/mockingservicestests/src/com/android/server/am/CachedAppOptimizerTest.java +3 −4 Original line number Diff line number Diff line Loading @@ -194,7 +194,7 @@ public final class CachedAppOptimizerTest { public void init_withDeviceConfigSetsParameters() { // When the DeviceConfig already has a flag value stored (note this test will need to // change if the default value changes from false). assertThat(CachedAppOptimizer.DEFAULT_USE_COMPACTION).isFalse(); assertThat(CachedAppOptimizer.DEFAULT_USE_COMPACTION).isTrue(); DeviceConfig.setProperty(DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, CachedAppOptimizer.KEY_USE_COMPACTION, "true", false); DeviceConfig.setProperty(DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, Loading Loading @@ -372,9 +372,8 @@ public final class CachedAppOptimizerTest { CachedAppOptimizer.KEY_USE_COMPACTION, "foobar", false); assertThat(mCountDown.await(5, TimeUnit.SECONDS)).isTrue(); // Then we set the default. assertThat(mCachedAppOptimizerUnderTest.useCompaction()).isEqualTo( CachedAppOptimizer.DEFAULT_USE_COMPACTION); // Invalid value is mapped to false assertThat(mCachedAppOptimizerUnderTest.useCompaction()).isEqualTo(false); } @Test Loading Loading
services/core/java/com/android/server/am/CachedAppOptimizer.java +1 −1 Original line number Diff line number Diff line Loading @@ -118,7 +118,7 @@ public final class CachedAppOptimizer { private static final int FREEZE_BINDER_TIMEOUT_MS = 100; // Defaults for phenotype flags. @VisibleForTesting static final Boolean DEFAULT_USE_COMPACTION = false; @VisibleForTesting static final Boolean DEFAULT_USE_COMPACTION = true; @VisibleForTesting static final Boolean DEFAULT_USE_FREEZER = true; @VisibleForTesting static final int DEFAULT_COMPACT_ACTION_2 = COMPACT_ACTION_ALL; @VisibleForTesting static final int DEFAULT_COMPACT_ACTION_1 = COMPACT_ACTION_FILE; Loading
services/tests/mockingservicestests/src/com/android/server/am/CachedAppOptimizerTest.java +3 −4 Original line number Diff line number Diff line Loading @@ -194,7 +194,7 @@ public final class CachedAppOptimizerTest { public void init_withDeviceConfigSetsParameters() { // When the DeviceConfig already has a flag value stored (note this test will need to // change if the default value changes from false). assertThat(CachedAppOptimizer.DEFAULT_USE_COMPACTION).isFalse(); assertThat(CachedAppOptimizer.DEFAULT_USE_COMPACTION).isTrue(); DeviceConfig.setProperty(DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, CachedAppOptimizer.KEY_USE_COMPACTION, "true", false); DeviceConfig.setProperty(DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, Loading Loading @@ -372,9 +372,8 @@ public final class CachedAppOptimizerTest { CachedAppOptimizer.KEY_USE_COMPACTION, "foobar", false); assertThat(mCountDown.await(5, TimeUnit.SECONDS)).isTrue(); // Then we set the default. assertThat(mCachedAppOptimizerUnderTest.useCompaction()).isEqualTo( CachedAppOptimizer.DEFAULT_USE_COMPACTION); // Invalid value is mapped to false assertThat(mCachedAppOptimizerUnderTest.useCompaction()).isEqualTo(false); } @Test Loading