Skip to content

Commit

Permalink
Merge pull request #1340 from kiwix/hotfix/macgills/#1294-landing-pag…
Browse files Browse the repository at this point in the history
…es-broken

#1294 Landing page is not displayed on Wikimedia zims
  • Loading branch information
macgills authored Aug 9, 2019
2 parents 7da84c0 + 88c65bc commit ce1d233
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def buildNumber = System.getenv('TRAVIS_BUILD_NUMBER') ?: "dev"
ext {
versionMajor = 2
versionMinor = 5
versionPatch = 1
versionPatch = 2
}

private String generateVersionName() {
Expand Down
21 changes: 9 additions & 12 deletions app/src/main/java/org/kiwix/kiwixmobile/ZimContentProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@
import android.os.ParcelFileDescriptor.AutoCloseOutputStream;
import android.util.Log;
import android.webkit.MimeTypeMap;

import org.kiwix.kiwixlib.JNIKiwix;
import org.kiwix.kiwixlib.JNIKiwixException;
import org.kiwix.kiwixlib.JNIKiwixInt;
import org.kiwix.kiwixlib.JNIKiwixReader;
import org.kiwix.kiwixlib.JNIKiwixSearcher;
import org.kiwix.kiwixlib.JNIKiwixString;
import org.kiwix.kiwixlib.Pair;
import org.kiwix.kiwixmobile.utils.files.FileUtils;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
Expand All @@ -49,8 +39,15 @@
import java.util.ArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.inject.Inject;
import org.kiwix.kiwixlib.JNIKiwix;
import org.kiwix.kiwixlib.JNIKiwixException;
import org.kiwix.kiwixlib.JNIKiwixInt;
import org.kiwix.kiwixlib.JNIKiwixReader;
import org.kiwix.kiwixlib.JNIKiwixSearcher;
import org.kiwix.kiwixlib.JNIKiwixString;
import org.kiwix.kiwixlib.Pair;
import org.kiwix.kiwixmobile.utils.files.FileUtils;

import static org.kiwix.kiwixmobile.utils.Constants.TAG_KIWIX;

Expand Down Expand Up @@ -344,7 +341,7 @@ public String getType(Uri uri) {

// This is the code which retrieve the mimeType from the libzim
// "slow" and still bugyy
if (mimeType.isEmpty()) {
if (mimeType == null || mimeType.isEmpty()) {
String t = uri.toString();
int pos = uri.toString().indexOf(CONTENT_URI.toString());
if (pos != -1) {
Expand Down
Binary file modified secrets.tar.enc
Binary file not shown.

0 comments on commit ce1d233

Please sign in to comment.