OSDN Git Service

Shoud specify the Resource class instance as an argument of the method
authorMasanori Ogino <ogino.masanori@sharp.co.jp>
Tue, 20 Jul 2010 09:55:51 +0000 (18:55 +0900)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 5 Aug 2011 08:05:40 +0000 (16:05 +0800)
newDrawable and change the name from 'DrawableCacheClear' to 'clearDrawableCache'
(additional changes for ID:15815)
https://review.source.android.com/#change,15815

Change-Id: I6bf19b8e6e187df8c8e3cb57d9e04278ddfe5055

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

index 98180c7..a6513aa 100755 (executable)
@@ -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);