Fix ClassLoader issue of WindowContext
The root cause of this issue is that we pass mClassLoader to new created Resources, but it may be null if we don't set ClassLoader from container. This CL fixes this issue by use ContextImpl#getClassLoader instead. Bug: 203027987 Test: reproducible steps mentioned in bug Change-Id: Ic88a351b3e9bbcf8382b9aefea63e2be2f190cb6
This commit is contained in:
@@ -2743,7 +2743,7 @@ class ContextImpl extends Context {
|
||||
*/
|
||||
private static Resources createWindowContextResources(@NonNull ContextImpl windowContextBase) {
|
||||
final LoadedApk packageInfo = windowContextBase.mPackageInfo;
|
||||
final ClassLoader classLoader = windowContextBase.mClassLoader;
|
||||
final ClassLoader classLoader = windowContextBase.getClassLoader();
|
||||
final IBinder token = windowContextBase.getWindowContextToken();
|
||||
|
||||
final String resDir = packageInfo.getResDir();
|
||||
|
||||
Reference in New Issue
Block a user