merge from open-source master
Change-Id: Ide1539b6777faf232d5360d6dc89a5d255982747
This commit is contained in:
@@ -1305,8 +1305,8 @@ public class Resources {
|
|||||||
keyboardHidden, mConfiguration.navigation, width, height,
|
keyboardHidden, mConfiguration.navigation, width, height,
|
||||||
mConfiguration.screenLayout, mConfiguration.uiMode, sSdkVersion);
|
mConfiguration.screenLayout, mConfiguration.uiMode, sSdkVersion);
|
||||||
|
|
||||||
drawableCacheClear(mDrawableCache, configChanges);
|
clearDrawableCache(mDrawableCache, configChanges);
|
||||||
drawableCacheClear(mColorDrawableCache, configChanges);
|
clearDrawableCache(mColorDrawableCache, configChanges);
|
||||||
|
|
||||||
mColorStateListCache.clear();
|
mColorStateListCache.clear();
|
||||||
|
|
||||||
@@ -1320,7 +1320,7 @@ public class Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawableCacheClear(
|
private void clearDrawableCache(
|
||||||
LongSparseArray<WeakReference<ConstantState>> cache,
|
LongSparseArray<WeakReference<ConstantState>> cache,
|
||||||
int configChanges) {
|
int configChanges) {
|
||||||
int N = cache.size();
|
int N = cache.size();
|
||||||
@@ -1781,7 +1781,7 @@ public class Resources {
|
|||||||
//Log.i(TAG, "Returning cached drawable @ #" +
|
//Log.i(TAG, "Returning cached drawable @ #" +
|
||||||
// Integer.toHexString(((Integer)key).intValue())
|
// Integer.toHexString(((Integer)key).intValue())
|
||||||
// + " in " + this + ": " + entry);
|
// + " in " + this + ": " + entry);
|
||||||
return entry.newDrawable();
|
return entry.newDrawable(this);
|
||||||
}
|
}
|
||||||
else { // our entry has been purged
|
else { // our entry has been purged
|
||||||
drawableCache.delete(key);
|
drawableCache.delete(key);
|
||||||
|
|||||||
Reference in New Issue
Block a user