Merge "Revert multi-package APK flag to off." into oc-mr1-dev

am: 478f94ba7f

Change-Id: Iaff100a533b0d357135422291c5f10613c936454
This commit is contained in:
Garry Boyer
2017-08-09 23:36:59 +00:00
committed by android-build-merger
2 changed files with 13 additions and 2 deletions

View File

@@ -155,9 +155,8 @@ public class PackageParser {
private static final String PROPERTY_CHILD_PACKAGES_ENABLED =
"persist.sys.child_packages_enabled";
// TODO: Decide the correct default before O-MR1.
private static final boolean MULTI_PACKAGE_APK_ENABLED = Build.IS_DEBUGGABLE &&
SystemProperties.getBoolean(PROPERTY_CHILD_PACKAGES_ENABLED, true);
SystemProperties.getBoolean(PROPERTY_CHILD_PACKAGES_ENABLED, false);
private static final int MAX_PACKAGES_PER_APK = 5;

View File

@@ -28,6 +28,7 @@ import android.content.pm.PackageParser.Permission;
import android.os.Build;
import android.os.Bundle;
import android.os.FileUtils;
import android.os.SystemProperties;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
@@ -398,8 +399,19 @@ public class PackageParserTest {
"key2", "this_is_provider");
}
/**
* Determines if the current device supports multi-package APKs.
*/
private boolean supportsMultiPackageApk() {
return SystemProperties.getBoolean("persist.sys.child_packages_enabled", false);
}
@Test
public void testMultiPackageComponents() throws Exception {
// TODO(gboyer): Remove once we decide to launch multi-package APKs.
if (!supportsMultiPackageApk()) {
return;
}
String parentName = "com.android.frameworks.coretests.install_multi_package";
String firstChildName =
"com.android.frameworks.coretests.install_multi_package.first_child";