OSDN Git Service

Remove extraneous invalidate call that unregisters AssetManagers
authorAdam Lesinski <adamlesinski@google.com>
Fri, 28 Jul 2017 23:31:00 +0000 (16:31 -0700)
committerAdam Lesinski <adamlesinski@google.com>
Fri, 28 Jul 2017 23:33:11 +0000 (16:33 -0700)
We are already taking care of updating AssetManagers affected by
path changes to a running app's ApplicationInfo. There is no need
to invalidate ALL AssetManagers, thereby unregistering them
from ResourcesManager and preventing configuration changes from
reaching them.

Bug: 64004601
Test: manual
Change-Id: I39311ec9b1dfd34eb7025836f75c92e0516bc36b

core/java/android/app/ResourcesManager.java

index 6f326de..9f95ad1 100644 (file)
@@ -44,8 +44,6 @@ import com.android.internal.util.ArrayUtils;
 
 import java.lang.ref.WeakReference;
 import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Map;
 import java.util.Objects;
 import java.util.WeakHashMap;
 import java.util.function.Predicate;
@@ -984,8 +982,6 @@ public class ResourcesManager {
                 }
             }
 
-            invalidatePath("/");
-
             redirectResourcesToNewImplLocked(updatedResourceKeys);
         } finally {
             Trace.traceEnd(Trace.TRACE_TAG_RESOURCES);