Commit 8edcbb66 authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Correctly handle shared class loaders

- The requested parent or shared class loaders might not be the
  the actual class loader, hence cache the requested class loader instead.

  Before this change using a shared class loader and proxying classes that
  are not loaded by the DexClassLoader (and thereby cannot be shared) caused
  the caching not to work properly.

- If a parent class loader is set, the shared class loader is ignored.
  Hence do not set the parent class loader when using shared class
  loaders. This behavior was broken for some time but people did not
  notice as we very rarely use more than one non-boot-class class
  loader.

Bug: 72571446
Test: - atest SystemUISharedLibTests (sets the shared_classloader
          property)
      - frameworks/opt/net/wifi/tests/wifitests/runtests.sh (discovered
          the missing caching of the proxies)
      - atest CtsMockingDebuggableTestCases
              CtsMockingTestCases
	      CtsExtendedMockingTestCases
	      CtsInlineMockingTestCases
Change-Id: I33c12311cb17366b936f4716c1bf89a5d2e18074
parent 6d49840f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment