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

Commit 09c03ec9 authored by Charles Chen's avatar Charles Chen
Browse files

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
parent 9c053702
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();