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
(cherry picked from commit 6f2978c9fc)
This commit is contained in:
committed by
Aemon Cannon
parent
f83d79928f
commit
472e9444ac
@@ -463,6 +463,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()) {
|
||||
@@ -471,7 +474,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