Lines Matching refs:componentName
22 import android.content.ComponentName;
67 private final HashMap<ComponentName, CacheEntry> mCache =
68 new HashMap<ComponentName, CacheEntry>(INITIAL_ICON_CACHE_CAPACITY);
150 * Remove any records for the supplied ComponentName.
152 public void remove(ComponentName componentName) {
154 mCache.remove(componentName);
162 HashSet<ComponentName> forDeletion = new HashSet<ComponentName>();
163 for (ComponentName componentName: mCache.keySet()) {
164 if (componentName.getPackageName().equals(packageName)) {
165 forDeletion.add(componentName);
168 for (ComponentName condemned: forDeletion) {
187 Iterator<Entry<ComponentName, CacheEntry>> it = mCache.entrySet().iterator();
203 CacheEntry entry = cacheLocked(application.componentName, info, labelCache);
217 ComponentName component = intent.getComponent();
231 public Bitmap getIcon(ComponentName component, ResolveInfo resolveInfo,
247 private CacheEntry cacheLocked(ComponentName componentName, ResolveInfo info,
249 CacheEntry entry = mCache.get(componentName);
253 mCache.put(componentName, entry);
256 ComponentName key = LauncherModel.getComponentNameFromResolveInfo(info);
273 Bitmap preloaded = getPreloadedIcon(componentName);
276 componentName.toShortString());
280 componentName.toShortString());
288 public HashMap<ComponentName,Bitmap> getAllIcons() {
290 HashMap<ComponentName,Bitmap> set = new HashMap<ComponentName,Bitmap>();
291 for (ComponentName cn : mCache.keySet()) {
306 * @param componentName the icon should be returned for this component
310 public static void preloadIcon(Context context, ComponentName componentName, Bitmap icon,
315 packageManager.getActivityIcon(componentName);
322 final String key = componentName.flattenToString();
325 resourceFile = context.openFileOutput(getResourceFilename(componentName),
353 * @param componentName the component that should own the icon
356 private Bitmap getPreloadedIcon(ComponentName componentName) {
357 final String key = componentName.flattenToShortString();
363 resourceFile = mContext.openFileInput(getResourceFilename(componentName));
410 * @param componentName the component that should own the icon
413 public boolean deletePreloadedIcon(ComponentName componentName) {
414 if (componentName == null) {
417 if (mCache.remove(componentName) != null) {
420 boolean success = mContext.deleteFile(getResourceFilename(componentName));
426 private static String getResourceFilename(ComponentName component) {