Create AppComponentFactory.instantiateClassLoader API
Adds a hook to AppComponentFactory to allow control over the instantiation of the main app class loader. LoadedApk creates the default class loader and uses it to load the base APK. If AppComponentFactory is declared in the manifest, its new method instantiateClassLoader is called and its result becomes the class loader used by LoadedApk to instantiate other classes declared in the manifest. By default this is simply the class loader created by LoadedApk. Second method provides AppComponentFactory with a copy of ApplicationInfo. The factory otherwise cannot locate any of the app's resources, including its APK or the data folder. Bug: 111342996 Test: atest CtsClassLoaderFactoryPathClassLoaderTestCases Test: atest CtsClassLoaderFactoryInMemoryDexClassLoaderTestCases Change-Id: Id21d9afaf00b9cb64a107bc9893b952407cff0b5
Loading
Please register or sign in to comment