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

Commit 264d1f12 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "fixed applyConfigurationToResourcesLocked WeakReference is null"

parents c0aacbe5 a9c9bf51
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -793,7 +793,8 @@ public class ResourcesManager {

            for (int i = mResourceImpls.size() - 1; i >= 0; i--) {
                ResourcesKey key = mResourceImpls.keyAt(i);
                ResourcesImpl r = mResourceImpls.valueAt(i).get();
                WeakReference<ResourcesImpl> weakImplRef = mResourceImpls.valueAt(i);
                ResourcesImpl r = weakImplRef != null ? weakImplRef.get() : null;
                if (r != null) {
                    if (DEBUG || DEBUG_CONFIGURATION) Slog.v(TAG, "Changing resources "
                            + r + " config to: " + config);
@@ -854,8 +855,9 @@ public class ResourcesManager {

            final int implCount = mResourceImpls.size();
            for (int i = 0; i < implCount; i++) {
                final ResourcesImpl impl = mResourceImpls.valueAt(i).get();
                final ResourcesKey key = mResourceImpls.keyAt(i);
                final WeakReference<ResourcesImpl> weakImplRef = mResourceImpls.valueAt(i);
                final ResourcesImpl impl = weakImplRef != null ? weakImplRef.get() : null;
                if (impl != null && key.mResDir.equals(assetPath)) {
                    if (!ArrayUtils.contains(key.mLibDirs, libAsset)) {
                        final int newLibAssetCount = 1 +