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

Commit 6f2978c9 authored by Jason O'Brien's avatar Jason O'Brien
Browse files

Add instrumented app to JAR path (isolated splits)

The base APK is loaded during normal execution even when isolated splits
are requested. This preserves that behavior during instrumented tests,
which previously skipped the base APK (causing class loading errors).

Test: tested on device with a trivial automated instrumented test
Bug: 146183755
Change-Id: Ia54072ee91b7c06cb4a787a8954ad2e69b322cac
parent e46c7474
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -464,6 +464,9 @@ public final class LoadedApk {
                    || appDir.equals(instrumentedAppDir)) {
                    || appDir.equals(instrumentedAppDir)) {
                outZipPaths.clear();
                outZipPaths.clear();
                outZipPaths.add(instrumentationAppDir);
                outZipPaths.add(instrumentationAppDir);
                if (!instrumentationAppDir.equals(instrumentedAppDir)) {
                    outZipPaths.add(instrumentedAppDir);
                }


                // Only add splits if the app did not request isolated split loading.
                // Only add splits if the app did not request isolated split loading.
                if (!aInfo.requestsIsolatedSplitLoading()) {
                if (!aInfo.requestsIsolatedSplitLoading()) {
@@ -472,7 +475,6 @@ public final class LoadedApk {
                    }
                    }


                    if (!instrumentationAppDir.equals(instrumentedAppDir)) {
                    if (!instrumentationAppDir.equals(instrumentedAppDir)) {
                        outZipPaths.add(instrumentedAppDir);
                        if (instrumentedSplitAppDirs != null) {
                        if (instrumentedSplitAppDirs != null) {
                            Collections.addAll(outZipPaths, instrumentedSplitAppDirs);
                            Collections.addAll(outZipPaths, instrumentedSplitAppDirs);
                        }
                        }