Skip to content

Commit f34a7fb

Browse files
Jean-Baptiste QueruAndroid Code Review
authored andcommitted
Merge "Shoud specify the Resource class instance as an argument of the method newDrawable and change the name from 'DrawableCacheClear' to 'clearDrawableCache' (additional changes for ID:15815) https://review.source.android.com/#change,15815"
2 parents 13d3347 + 708654c commit f34a7fb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/java/android/content/res/Resources.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,8 +1305,8 @@ public void updateConfiguration(Configuration config,
13051305
keyboardHidden, mConfiguration.navigation, width, height,
13061306
mConfiguration.screenLayout, mConfiguration.uiMode, sSdkVersion);
13071307

1308-
drawableCacheClear(mDrawableCache, configChanges);
1309-
drawableCacheClear(mColorDrawableCache, configChanges);
1308+
clearDrawableCache(mDrawableCache, configChanges);
1309+
clearDrawableCache(mColorDrawableCache, configChanges);
13101310

13111311
mColorStateListCache.clear();
13121312

@@ -1320,7 +1320,7 @@ public void updateConfiguration(Configuration config,
13201320
}
13211321
}
13221322

1323-
private void drawableCacheClear(
1323+
private void clearDrawableCache(
13241324
LongSparseArray<WeakReference<ConstantState>> cache,
13251325
int configChanges) {
13261326
int N = cache.size();
@@ -1781,7 +1781,7 @@ private Drawable getCachedDrawable(
17811781
//Log.i(TAG, "Returning cached drawable @ #" +
17821782
// Integer.toHexString(((Integer)key).intValue())
17831783
// + " in " + this + ": " + entry);
1784-
return entry.newDrawable();
1784+
return entry.newDrawable(this);
17851785
}
17861786
else { // our entry has been purged
17871787
drawableCache.delete(key);

0 commit comments

Comments
 (0)