Lines Matching refs:icon
83 * Returns the cached task icon if the task key is not expired, updating the cache if it is.
87 // Return the cached activity icon if it exists
88 Drawable icon = mIconCache.getAndInvalidateIfModified(taskKey);
89 if (icon != null) {
90 return icon;
94 icon = createNewIconForTask(taskKey, td, false /* returnDefault */);
95 if (icon != null) {
96 mIconCache.put(taskKey, icon);
97 return icon;
101 // We couldn't load any icon
121 Log.e(TAG, "Could not find icon drawable from resource", e);
131 // Load the icon from the activity info and cache it
134 Drawable icon = getBadgedActivityIcon(activityInfo, userId, desc);
135 if (icon != null) {
136 return icon;
140 // At this point, even if we can't load the icon, we will set the default icon.
146 protected Drawable createDrawableFromBitmap(Bitmap icon, int userId,
149 new BitmapDrawable(mContext.getResources(), icon), userId, desc);
152 protected abstract Drawable createBadgedDrawable(Drawable icon, int userId,
156 * @return the activity icon for the ActivityInfo for a user, badging if necessary.
171 Bitmap icon = Bitmap.createBitmap(1, 1, Bitmap.Config.ALPHA_8);
172 icon.eraseColor(0);
173 mDefaultIcon = new BitmapDrawable(context.getResources(), icon);
183 protected Drawable createBadgedDrawable(Drawable icon, int userId,
186 icon = mContext.getPackageManager().getUserBadgedIcon(icon, new UserHandle(userId));
188 return icon;