summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlinus_lee <llee@cyngn.com>2014-12-12 12:37:34 -0800
committerlinus_lee <llee@cyngn.com>2014-12-12 12:38:15 -0800
commita2c41023951c7ba420a34138d960478796f9e5b8 (patch)
tree1de3d794de2f2fa7fde1db8bf62a6d2815099ddd /src
parentc32971bbc62afc02991cefc2d5f816646d6d5a7b (diff)
downloadandroid_packages_apps_Eleven-a2c41023951c7ba420a34138d960478796f9e5b8.tar.gz
android_packages_apps_Eleven-a2c41023951c7ba420a34138d960478796f9e5b8.tar.bz2
android_packages_apps_Eleven-a2c41023951c7ba420a34138d960478796f9e5b8.zip
Eleven: Fix default art color in notification
The key being passed in did not match in some cases causing this problem Change-Id: Ibbd985d6f0fb0ff3fb90908481f8180715cf2ec7
Diffstat (limited to 'src')
-rw-r--r--src/com/cyanogenmod/eleven/cache/ImageFetcher.java3
-rw-r--r--src/com/cyanogenmod/eleven/widgets/LetterTileDrawable.java16
2 files changed, 17 insertions, 2 deletions
diff --git a/src/com/cyanogenmod/eleven/cache/ImageFetcher.java b/src/com/cyanogenmod/eleven/cache/ImageFetcher.java
index d6300bd..afa06c1 100644
--- a/src/com/cyanogenmod/eleven/cache/ImageFetcher.java
+++ b/src/com/cyanogenmod/eleven/cache/ImageFetcher.java
@@ -191,10 +191,9 @@ public class ImageFetcher extends ImageWorker {
boolean smallArtwork) {
// Check the disk cache
Bitmap artwork = null;
- String key = albumName;
+ String key = String.valueOf(albumId);
if (artwork == null && albumName != null && mImageCache != null) {
- key = generateAlbumCacheKey(albumName, artistName);
artwork = mImageCache.getBitmapFromDiskCache(key);
}
if (artwork == null && albumId >= 0 && mImageCache != null) {
diff --git a/src/com/cyanogenmod/eleven/widgets/LetterTileDrawable.java b/src/com/cyanogenmod/eleven/widgets/LetterTileDrawable.java
index 24cb8e2..176c216 100644
--- a/src/com/cyanogenmod/eleven/widgets/LetterTileDrawable.java
+++ b/src/com/cyanogenmod/eleven/widgets/LetterTileDrawable.java
@@ -258,6 +258,15 @@ public class LetterTileDrawable extends Drawable {
mOffset = offset;
}
+ /**
+ * Sets the tile data used to determine the display text and color
+ * @param displayName the name to display - Some logic will be applied to do some trimming
+ * and up to the first two letters will be displayed
+ * @param identifier the identifier used to determine the color of the background. For
+ * album, use albumId, for artist use artistName and for playlist use
+ * playlistId
+ * @param type the type of item that this tile drawable corresponds to
+ */
public void setTileDetails(final String displayName, final String identifier,
final ImageType type) {
mDisplayName = MusicUtils.getTrimmedName(displayName);
@@ -292,6 +301,13 @@ public class LetterTileDrawable extends Drawable {
/**
* Draws the default letter tile drawable for the image type to a bitmap
+ * @param identifier the identifier used to determine the color of the background. For
+ * album, use albumId, for artist use artistName and for playlist use
+ * playlistId
+ * @param type the type of item that this tile drawable corresponds to
+ * @param isCircle whether to draw a circle or a square
+ * @param smallArtwork true if you want to draw a smaller version of the default bitmap for
+ * perf/memory reasons
*/
public static Bitmap createDefaultBitmap(Context context, String identifier, ImageType type,
boolean isCircle, boolean smallArtwork) {