Fixed the XMLAdapters example
Provider package name was incorrect, resulting in a crash at startup Also added static to the cache http://stackoverflow.com/questions/10135261/possible-bug-in-android-imagedownloader-class-shardbitmapcache-not-static-when Change-Id: I833589645f053be52fbc11aec89dd02b6f2f2787
This commit is contained in:
@@ -47,8 +47,7 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<provider android:name="android.content.XmlDocumentProvider"
|
<provider android:name="XmlDocumentProvider" android:authorities="xmldocument" />
|
||||||
android:authorities="xmldocument" />
|
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public class ImageDownloader {
|
|||||||
private static final int DELAY_BEFORE_PURGE = 30 * 1000; // in milliseconds
|
private static final int DELAY_BEFORE_PURGE = 30 * 1000; // in milliseconds
|
||||||
|
|
||||||
// Hard cache, with a fixed maximum capacity and a life duration
|
// Hard cache, with a fixed maximum capacity and a life duration
|
||||||
private final HashMap<String, Bitmap> sHardBitmapCache =
|
private final static HashMap<String, Bitmap> sHardBitmapCache =
|
||||||
new LinkedHashMap<String, Bitmap>(HARD_CACHE_CAPACITY / 2, 0.75f, true) {
|
new LinkedHashMap<String, Bitmap>(HARD_CACHE_CAPACITY / 2, 0.75f, true) {
|
||||||
private static final long serialVersionUID = -7190622541619388252L;
|
private static final long serialVersionUID = -7190622541619388252L;
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ import java.util.regex.Pattern;
|
|||||||
* <p>To add this provider in your application, you should add its declaration to your application
|
* <p>To add this provider in your application, you should add its declaration to your application
|
||||||
* manifest:
|
* manifest:
|
||||||
* <pre class="prettyprint">
|
* <pre class="prettyprint">
|
||||||
* <provider android:name="android.content.XmlDocumentProvider" android:authorities="xmldocument" />
|
* <provider android:name="XmlDocumentProvider" android:authorities="xmldocument" />
|
||||||
* </pre>
|
* </pre>
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user