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

Commit f34a7fbb authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru Committed by Android Code Review
Browse files

Merge "Shoud specify the Resource class instance as an argument of the method...

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"
parents 13d33472 708654c0
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1305,8 +1305,8 @@ public class Resources {
                    keyboardHidden, mConfiguration.navigation, width, height,
                    mConfiguration.screenLayout, mConfiguration.uiMode, sSdkVersion);

            drawableCacheClear(mDrawableCache, configChanges);
            drawableCacheClear(mColorDrawableCache, configChanges);
            clearDrawableCache(mDrawableCache, configChanges);
            clearDrawableCache(mColorDrawableCache, configChanges);

            mColorStateListCache.clear();

@@ -1320,7 +1320,7 @@ public class Resources {
        }
    }

    private void drawableCacheClear(
    private void clearDrawableCache(
            LongSparseArray<WeakReference<ConstantState>> cache,
            int configChanges) {
        int N = cache.size();
@@ -1781,7 +1781,7 @@ public class Resources {
                    //Log.i(TAG, "Returning cached drawable @ #" +
                    //        Integer.toHexString(((Integer)key).intValue())
                    //        + " in " + this + ": " + entry);
                    return entry.newDrawable();
                    return entry.newDrawable(this);
                }
                else {  // our entry has been purged
                    drawableCache.delete(key);