Loading core/java/android/content/res/ThemedResourceCache.java +14 −14 Original line number Diff line number Diff line Loading @@ -137,9 +137,11 @@ abstract class ThemedResourceCache<T> { */ @UnsupportedAppUsage public void onConfigurationChange(@Config int configChanges) { prune(configChanges); synchronized (this) { pruneLocked(configChanges); mGeneration++; } } /** * Returns whether a cached entry has been invalidated by a configuration Loading Loading @@ -214,8 +216,7 @@ abstract class ThemedResourceCache<T> { * simply prune missing weak references * @return {@code true} if the cache is completely empty after pruning */ private boolean prune(@Config int configChanges) { synchronized (this) { private boolean pruneLocked(@Config int configChanges) { if (mThemedEntries != null) { for (int i = mThemedEntries.size() - 1; i >= 0; i--) { if (pruneEntriesLocked(mThemedEntries.valueAt(i), configChanges)) { Loading @@ -230,7 +231,6 @@ abstract class ThemedResourceCache<T> { return mThemedEntries == null && mNullThemedEntries == null && mUnthemedEntries == null; } } private boolean pruneEntriesLocked(@Nullable LongSparseArray<WeakReference<T>> entries, @Config int configChanges) { Loading Loading
core/java/android/content/res/ThemedResourceCache.java +14 −14 Original line number Diff line number Diff line Loading @@ -137,9 +137,11 @@ abstract class ThemedResourceCache<T> { */ @UnsupportedAppUsage public void onConfigurationChange(@Config int configChanges) { prune(configChanges); synchronized (this) { pruneLocked(configChanges); mGeneration++; } } /** * Returns whether a cached entry has been invalidated by a configuration Loading Loading @@ -214,8 +216,7 @@ abstract class ThemedResourceCache<T> { * simply prune missing weak references * @return {@code true} if the cache is completely empty after pruning */ private boolean prune(@Config int configChanges) { synchronized (this) { private boolean pruneLocked(@Config int configChanges) { if (mThemedEntries != null) { for (int i = mThemedEntries.size() - 1; i >= 0; i--) { if (pruneEntriesLocked(mThemedEntries.valueAt(i), configChanges)) { Loading @@ -230,7 +231,6 @@ abstract class ThemedResourceCache<T> { return mThemedEntries == null && mNullThemedEntries == null && mUnthemedEntries == null; } } private boolean pruneEntriesLocked(@Nullable LongSparseArray<WeakReference<T>> entries, @Config int configChanges) { Loading