Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

changes to support build on old devices

  • Loading branch information...
commit c210b82301f50dab33eb1b9e464c3107c0748935 1 parent a1bd29a
@luigi-agosti luigi-agosti authored
View
29 acceptance/AndroidManifest.xml
@@ -1,12 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:a="http://schemas.android.com/apk/res/android"
- package="com.novoda.imageloader.acceptance" a:versionCode="7"
- a:versionName="1.4.6-SNAPSHOT">
- <uses-sdk a:minSdkVersion="8" />
- <uses-sdk a:targetSdkVersion="8" />
- <instrumentation a:targetPackage="com.novoda.imageloader.demo"
- a:name="android.test.InstrumentationTestRunner" />
- <application a:icon="@drawable/icon" a:label="@string/app_name">
- <uses-library a:name="android.test.runner" />
- </application>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.novoda.imageloader.acceptance"
+ android:versionCode="7"
+ android:versionName="1.4.6-SNAPSHOT" >
+
+ <uses-sdk
+ android:minSdkVersion="4"
+ android:targetSdkVersion="8" />
+
+ <instrumentation
+ android:name="android.test.InstrumentationTestRunner"
+ android:targetPackage="com.novoda.imageloader.demo" />
+
+ <application
+ android:icon="@drawable/icon"
+ android:label="@string/app_name" >
+ <uses-library android:name="android.test.runner" />
+ </application>
+
</manifest>
View
11 core/src/main/java/com/novoda/imageloader/core/bitmap/BitmapUtil.java
@@ -1,5 +1,6 @@
package com.novoda.imageloader.core.bitmap;
+import java.io.Closeable;
import java.io.File;
import java.io.FileInputStream;
@@ -7,7 +8,6 @@
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
-import com.novoda.imageloader.core.file.util.FileUtil;
import com.novoda.imageloader.core.model.ImageWrapper;
public class BitmapUtil {
@@ -114,8 +114,13 @@ private void decodeFileToPopulateOptions(File f, final BitmapFactory.Options o)
}
}
- private void closeSilently(FileInputStream fis) {
- new FileUtil().closeSilently(fis);
+ private void closeSilently(Closeable c) {
+ try {
+ if (c != null) {
+ c.close();
+ }
+ } catch (Exception e) {
+ }
}
private int calculateScale(final int requiredSize, int widthTmp, int heightTmp) {
View
2  core/src/main/java/com/novoda/imageloader/core/network/UrlNetworkLoader.java
@@ -36,7 +36,7 @@ public void retrieveImage(String url, File f) {
fileUtil.copyStream(is, os);
} catch (FileNotFoundException fnfe) {
throw new ImageNotFoundException();
- } catch (Exception ex) {
+ } catch (Throwable ex) {
//TODO
} finally {
if(conn != null && settings.getDisconnectOnEveryCall()) {
View
1  demo/AndroidManifest.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.novoda.imageloader.demo" android:versionCode="7" android:versionName="1.4.6-SNAPSHOT">
+
<uses-sdk android:minSdkVersion="4" />
<application android:icon="@drawable/icon" android:label="@string/app_name" android:name=".DemoApplication">
Please sign in to comment.
Something went wrong with that request. Please try again.