summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/graphics/DrawableFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/graphics/DrawableFactory.java')
-rw-r--r--src/com/android/launcher3/graphics/DrawableFactory.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/com/android/launcher3/graphics/DrawableFactory.java b/src/com/android/launcher3/graphics/DrawableFactory.java
index 288749fa7..837301fb8 100644
--- a/src/com/android/launcher3/graphics/DrawableFactory.java
+++ b/src/com/android/launcher3/graphics/DrawableFactory.java
@@ -80,26 +80,25 @@ public class DrawableFactory implements ResourceBasedOverride {
* Returns a drawable that can be used as a badge for the user or null.
*/
@UiThread
- public Drawable getBadgeForUser(UserHandle user, Context context) {
+ public Drawable getBadgeForUser(UserHandle user, Context context, int badgeSize) {
if (mMyUser.equals(user)) {
return null;
}
- Bitmap badgeBitmap = getUserBadge(user, context);
+ Bitmap badgeBitmap = getUserBadge(user, context, badgeSize);
FastBitmapDrawable d = new FastBitmapDrawable(badgeBitmap);
d.setFilterBitmap(true);
d.setBounds(0, 0, badgeBitmap.getWidth(), badgeBitmap.getHeight());
return d;
}
- protected synchronized Bitmap getUserBadge(UserHandle user, Context context) {
+ protected synchronized Bitmap getUserBadge(UserHandle user, Context context, int badgeSize) {
Bitmap badgeBitmap = mUserBadges.get(user);
if (badgeBitmap != null) {
return badgeBitmap;
}
final Resources res = context.getApplicationContext().getResources();
- int badgeSize = res.getDimensionPixelSize(R.dimen.profile_badge_size);
badgeBitmap = Bitmap.createBitmap(badgeSize, badgeSize, Bitmap.Config.ARGB_8888);
Drawable drawable = context.getPackageManager().getUserBadgedDrawableForDensity(