Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3edc04d3 authored by Garry Boyer's avatar Garry Boyer Committed by Android (Google) Code Review
Browse files

Merge "Revert multi-package APK flag to off."

parents 6f881950 17041530
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -152,9 +152,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;

+12 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.content.pm.PackageParser.Package;
import android.content.pm.PackageParser.Permission;
import android.os.Build;
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;
@@ -346,8 +347,19 @@ public class PackageParserTest {
        assertOneComponentOfEachType("com.android.frameworks.coretests.Test%s", p);
    }

    /**
     * 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";