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
This commit is contained in:
@@ -464,6 +464,9 @@ public final class LoadedApk {
|
||||
|| appDir.equals(instrumentedAppDir)) {
|
||||
outZipPaths.clear();
|
||||
outZipPaths.add(instrumentationAppDir);
|
||||
if (!instrumentationAppDir.equals(instrumentedAppDir)) {
|
||||
outZipPaths.add(instrumentedAppDir);
|
||||
}
|
||||
|
||||
// Only add splits if the app did not request isolated split loading.
|
||||
if (!aInfo.requestsIsolatedSplitLoading()) {
|
||||
@@ -472,7 +475,6 @@ public final class LoadedApk {
|
||||
}
|
||||
|
||||
if (!instrumentationAppDir.equals(instrumentedAppDir)) {
|
||||
outZipPaths.add(instrumentedAppDir);
|
||||
if (instrumentedSplitAppDirs != null) {
|
||||
Collections.addAll(outZipPaths, instrumentedSplitAppDirs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user