jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/376085 )

Change subject: Update ZIM library to latest version.
......................................................................


Update ZIM library to latest version.

This update to the zimdroid library features improvements in searching the
ZIM file's index by using the requested title or URL, plus the expected
namespace of the data item. ("namespace" in the sense of ZIM namespaces,
not Wikipedia namespaces.)

This fixes some edge cases that have been recently observed when trying to
fetch certain article titles, and also when trying to search in certain
character sets.

Bug: T175035
Bug: T175039
Change-Id: I3b0b9aced253f8e7452322fab16224845651492a
---
M app/build.gradle
M app/src/main/java/org/wikipedia/offline/Compilation.java
M app/src/main/java/org/wikipedia/offline/OfflineManager.java
3 files changed, 1 insertion(+), 7 deletions(-)

Approvals:
  jenkins-bot: Verified
  Mholloway: Looks good to me, approved



diff --git a/app/build.gradle b/app/build.gradle
index 5413aaf..a6d9375 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -196,7 +196,7 @@
     compile 'org.apache.commons:commons-lang3:3.5'
     compile "commons-io:commons-io:2.5"
     compile 'org.jsoup:jsoup:1.10.2'
-    compile 'com.dmitrybrant:zimdroid:0.0.13'
+    compile 'com.dmitrybrant:zimdroid:0.0.14'
 
     annotationProcessor 
"com.jakewharton:butterknife-compiler:$butterKnifeVersion"
 
diff --git a/app/src/main/java/org/wikipedia/offline/Compilation.java 
b/app/src/main/java/org/wikipedia/offline/Compilation.java
index 3896511..39cb8bc 100644
--- a/app/src/main/java/org/wikipedia/offline/Compilation.java
+++ b/app/src/main/java/org/wikipedia/offline/Compilation.java
@@ -241,9 +241,6 @@
 
     @Nullable
     ByteArrayOutputStream getDataForUrl(@NonNull String url) throws 
IOException {
-        if (url.startsWith("A/") || url.startsWith("I/")) {
-            url = url.substring(2);
-        }
         return reader == null ? null : 
reader.getDataForUrl(URLDecoder.decode(url, "utf-8"));
     }
 
diff --git a/app/src/main/java/org/wikipedia/offline/OfflineManager.java 
b/app/src/main/java/org/wikipedia/offline/OfflineManager.java
index 9dcc6c8..5728f56 100644
--- a/app/src/main/java/org/wikipedia/offline/OfflineManager.java
+++ b/app/src/main/java/org/wikipedia/offline/OfflineManager.java
@@ -149,9 +149,6 @@
     }
 
     @Nullable public ByteArrayOutputStream getDataForUrl(@NonNull String url) 
throws IOException {
-        if (url.startsWith("A/") || url.startsWith("I/")) {
-            url = url.substring(2);
-        }
         for (Compilation c : compilations) {
             ByteArrayOutputStream stream = c.getDataForUrl(url);
             if (stream != null) {

-- 
To view, visit https://gerrit.wikimedia.org/r/376085
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3b0b9aced253f8e7452322fab16224845651492a
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[email protected]>
Gerrit-Reviewer: Cooltey <[email protected]>
Gerrit-Reviewer: Mholloway <[email protected]>
Gerrit-Reviewer: Sharvaniharan <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to