Created
April 25, 2014 18:26
-
-
Save rnewman/11298776 to your computer and use it in GitHub Desktop.
Spot the bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int getDominantColor(String key) { | |
startRead(); | |
try { | |
FaviconsForURL element = permanentBackingMap.get(key); | |
if (element == null) { | |
element = backingMap.get(key); | |
} | |
if (element == null) { | |
Log.w(LOGTAG, "Cannot compute dominant color of non-cached favicon. Cache fullness " + | |
currentSize.get() + '/' + maxSizeBytes); | |
finishRead(); | |
return 0xFFFFFF; | |
} | |
return element.ensureDominantColor(); | |
} finally { | |
finishRead(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment