summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/IconCache.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/IconCache.java')
-rw-r--r--src/com/android/launcher2/IconCache.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/launcher2/IconCache.java b/src/com/android/launcher2/IconCache.java
index 7e37afe82..5c07cfb42 100644
--- a/src/com/android/launcher2/IconCache.java
+++ b/src/com/android/launcher2/IconCache.java
@@ -24,6 +24,7 @@ import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
+import android.util.Pair;
import android.util.DisplayMetrics;
import java.util.HashMap;
@@ -187,4 +188,16 @@ public class IconCache {
}
return entry;
}
+
+ public HashMap<ComponentName,Bitmap> getAllIcons() {
+ synchronized (mCache) {
+ HashMap<ComponentName,Bitmap> set = new HashMap<ComponentName,Bitmap>();
+ int i = 0;
+ for (ComponentName cn : mCache.keySet()) {
+ final CacheEntry e = mCache.get(cn);
+ set.put(cn, e.icon);
+ }
+ return set;
+ }
+ }
}