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

Commit c23b6ee4 authored by Alan Stokes's avatar Alan Stokes Committed by Android (Google) Code Review
Browse files

Merge "Don't record loading of APKs as dynamic code."

parents af4ba04d bfe19f87
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -228,8 +228,11 @@ public class DexManager {
                    continue;
                }

                if (!primaryOrSplit) {
                    // Record loading of a DEX file from an app data directory.
                    mDexLogger.recordDex(loaderUserId, dexPath, searchResult.mOwningPackageName,
                            loadingAppInfo.packageName);
                }

                if (classLoaderContexts != null) {

+5 −2
Original line number Diff line number Diff line
@@ -141,7 +141,8 @@ public class DexManagerTests {
        assertIsUsedByOtherApps(mBarUser0, pui, true);
        assertTrue(pui.getDexUseInfoMap().isEmpty());

        assertHasDclInfo(mBarUser0, mFooUser0, mBarUser0.getBaseAndSplitDexPaths());
        // A package loading another package's APK is not DCL (it's not app data).
        assertNoDclInfo(mBarUser0);
    }

    @Test
@@ -334,7 +335,9 @@ public class DexManagerTests {
        notifyDexLoad(mFooUser0, newSplits, mUser0);
        PackageUseInfo pui = getPackageUseInfo(mBarUser0);
        assertIsUsedByOtherApps(newSplits, pui, true);
        assertHasDclInfo(mBarUser0, mFooUser0, newSplits);

        // Primary and split APKs are not recorded as DCL.
        assertNoDclInfo(mBarUser0);
    }

    @Test