aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2012-11-18 11:27:35 +0100
committerSamuel Tardieu <sam@rfc1149.net>2012-11-18 11:34:04 +0100
commit76f7fae0bb460fa470cd77226475c32fcf49444b (patch)
treebda8e7dfee9353a5e214c04c65095cd23168beff
parent8e182617c6b115f46bb5573bc795e861b1ca64ac (diff)
downloadcgeo-76f7fae0bb460fa470cd77226475c32fcf49444b.zip
cgeo-76f7fae0bb460fa470cd77226475c32fcf49444b.tar.gz
cgeo-76f7fae0bb460fa470cd77226475c32fcf49444b.tar.bz2
fix #2171: MapsForge-related crash on Android 4.2
MapsForge crashes on Android 4.2. A local patch has been applied to be able to use OSM maps.
-rw-r--r--main/libs/mapsforge-map-0.3.0-jar-with-dependencies.jarbin311202 -> 309799 bytes
-rw-r--r--mapsforge_patches/InMemoryTileCache.java.patch11
2 files changed, 11 insertions, 0 deletions
diff --git a/main/libs/mapsforge-map-0.3.0-jar-with-dependencies.jar b/main/libs/mapsforge-map-0.3.0-jar-with-dependencies.jar
index b4c85f8..e22212b 100644
--- a/main/libs/mapsforge-map-0.3.0-jar-with-dependencies.jar
+++ b/main/libs/mapsforge-map-0.3.0-jar-with-dependencies.jar
Binary files differ
diff --git a/mapsforge_patches/InMemoryTileCache.java.patch b/mapsforge_patches/InMemoryTileCache.java.patch
new file mode 100644
index 0000000..656bbe9
--- /dev/null
+++ b/mapsforge_patches/InMemoryTileCache.java.patch
@@ -0,0 +1,11 @@
+--- trunk/mapsforge-map/src/main/java/org/mapsforge/android/maps/mapgenerator/InMemoryTileCache.java
++++ trunk/mapsforge-map/src/main/java/org/mapsforge/android/maps/mapgenerator/InMemoryTileCache.java
+@@ -138,7 +138,7 @@
+ }
+
+ Bitmap pooledBitmap = this.bitmapPool.remove(this.bitmapPool.size() - 1);
+-
++ this.byteBuffer.rewind();
+ bitmap.copyPixelsToBuffer(this.byteBuffer);
+ this.byteBuffer.rewind();
+ pooledBitmap.copyPixelsFromBuffer(this.byteBuffer);