Skip to content
Commit 991ff90e authored by David Brazdil's avatar David Brazdil
Browse files

Move DexLoadReporter setup before AppComponentFactory calls

BaseDexClassLoader has a callback for reporting all loaded secondary dex
files to DexManager. The callback needs to be set up:
(a) after the default app class loader is initialized, so as to not
report the app's main APK being loaded, and
(b) before control is handed over to the app for the first time, so as
to not miss any BaseDexClassLoader instantiations.

The latter used to mean setting up the callback before
Application.onCreate() but AppComponentFactory calls happen even
earlier. Hence move the call into LoadedApk where the borderline between
(a) and (b) lies.

Test: manually check dex loads from instantiateClassLoader are reported
Change-Id: I7961913de302bcede6c231304544d21d8db806a8
parent c4ce66dd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment