Permalink
Browse files

change to android parent 2.0.0

  • Loading branch information...
1 parent 6daf84f commit 1383cdb09d36f4a5dcbf9f03f020525fd2ff9bbd @luigi-agosti luigi-agosti committed Oct 25, 2011
View
@@ -8,4 +8,6 @@
**/*.pydevproject
.project
release.properties
+project.properties
+**/project.properties
target
View
@@ -11,6 +11,10 @@
<name>imageloader-acceptance</name>
<packaging>apk</packaging>
+ <properties>
+ <eclipse.excludeArtifactIds>robotium,android-test</eclipse.excludeArtifactIds>
+ </properties>
+
<dependencies>
<dependency>
<groupId>com.jayway.android.robotium</groupId>
@@ -57,37 +61,6 @@
</test>
</configuration>
</plugin>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <outputDirectory>libs</outputDirectory>
- <excludeTransitive>true</excludeTransitive>
- <excludeArtifactIds>robotium,android-test</excludeArtifactIds>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <version>2.4.1</version>
- <configuration>
- <filesets>
- <fileset>
- <directory>libs</directory>
- <includes>
- <include>*.jar</include>
- </includes>
- </fileset>
- </filesets>
- </configuration>
- </plugin>
</plugins>
</build>
@@ -0,0 +1,30 @@
+package com.novoda.imageloader.core.file;
+
+import java.io.FilterInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+public class FlushedInputStream extends FilterInputStream {
+
+ public FlushedInputStream(InputStream inputStream) {
+ super(inputStream);
+ }
+
+ @Override
+ public long skip(long n) throws IOException {
+ long totalBytesSkipped = 0L;
+ while (totalBytesSkipped < n) {
+ long bytesSkipped = in.skip(n - totalBytesSkipped);
+ if (bytesSkipped == 0L) {
+ int b = read();
+ if (b < 0) {
+ break;
+ } else {
+ bytesSkipped = 1;
+ }
+ }
+ totalBytesSkipped += bytesSkipped;
+ }
+ return totalBytesSkipped;
+ }
+}
@@ -41,7 +41,6 @@ public Bitmap scaleBitmap(Bitmap b, int width, int height) {
finalWidth = new Float(imageWidth * factor).intValue();
}
Bitmap scaledBitmap = Bitmap.createScaledBitmap(b, finalWidth, finalHeight, true);
- b.recycle();
return scaledBitmap;
}
@@ -1 +0,0 @@
-target=android-8
View
@@ -10,6 +10,10 @@
<name>imageloader-demo</name>
<packaging>apk</packaging>
+ <properties>
+ <eclipse.excludeArtifactIds>android,commons-codec,commons-logging,httpclient,opengl-api,httpcore,json,xpp3,xmlParserAPIs,imageloader-demo,junit,javassist,objenesis,h2</eclipse.excludeArtifactIds>
+ </properties>
+
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
@@ -26,39 +30,6 @@
<build>
<sourceDirectory>src</sourceDirectory>
- <plugins>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <outputDirectory>libs</outputDirectory>
- <excludeArtifactIds>
- android,commons-codec,commons-logging,httpclient,opengl-api,httpcore,json,xpp3,xmlParserAPIs,imageloader-demo,junit,javassist,objenesis,h2
- </excludeArtifactIds>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <configuration>
- <filesets>
- <fileset>
- <directory>libs</directory>
- <includes>
- <include>*.jar</include>
- </includes>
- </fileset>
- </filesets>
- </configuration>
- </plugin>
- </plugins>
</build>
</project>
View
@@ -4,7 +4,7 @@
<parent>
<groupId>com.novoda</groupId>
<artifactId>android</artifactId>
- <version>1.7</version>
+ <version>2.0.0</version>
</parent>
<groupId>com.novoda.imageloader</groupId>
<artifactId>imageloader-parent</artifactId>
@@ -22,13 +22,6 @@
<url>https://github.com/novoda/public-mvn-repo/raw/master/releases</url>
</repository>
</repositories>
-
- <pluginRepositories>
- <pluginRepository>
- <id>public-mvn-repo-releases</id>
- <url>https://github.com/novoda/public-mvn-repo/raw/master/releases</url>
- </pluginRepository>
- </pluginRepositories>
<distributionManagement>
<repository>

0 comments on commit 1383cdb

Please sign in to comment.