1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-05 10:49:24 +02:00

fixed file opening for fb2.zip/fb2 from ASTRO file manager

0.7.1


git-svn-id: https://only.mawhrin.net/repos/FBReaderJ/trunk@1741 6a642e6f-84f6-412e-ac94-c4a38d5a04b0
This commit is contained in:
Nikolay Pultsin 2010-09-13 21:35:41 +00:00
parent 2be8618de7
commit 0fb0c57c9d
4 changed files with 23 additions and 2 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.geometerplus.zlibrary.ui.android" android:versionCode="700" android:versionName="0.7.0" android:installLocation="auto">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.geometerplus.zlibrary.ui.android" android:versionCode="701" android:versionName="0.7.1" android:installLocation="auto">
<uses-sdk android:minSdkVersion="3" />
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true" />
<uses-permission android:name="android.permission.INTERNET" />
@ -24,6 +24,13 @@
<data android:pathPattern=".*\\.mobi" />
<data android:pathPattern=".*\\.prc" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="content" />
<data android:pathPattern=".*\\.fb2" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />

View file

@ -24,6 +24,13 @@
<data android:pathPattern=".*\\.mobi" />
<data android:pathPattern=".*\\.prc" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="content" />
<data android:pathPattern=".*\\.fb2" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />

View file

@ -1 +1 @@
0.7.0
0.7.1

View file

@ -70,6 +70,13 @@ public abstract class ZLAndroidActivity extends Activity {
final Uri uri = intent.getData();
if (uri != null) {
fileToOpen = uri.getPath();
final String scheme = uri.getScheme();
if ("content".equals(scheme)) {
final File file = new File(fileToOpen);
if (!file.exists()) {
fileToOpen = file.getParent();
}
}
}
intent.setData(null);
}