Skip to content

Commit 808e45b

Browse files
committed
Fix page number on resume bug
1 parent 4f453b4 commit 808e45b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/src/main/AndroidManifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
34
package="com.artifex.mupdf.viewer"
45
>
56
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
6-
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
7+
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"
8+
tools:ignore="QueryAllPackagesPermission" />
79

810
<application
911
android:theme="@style/Theme.Custom.Activity">

lib/src/main/java/com/artifex/mupdf/viewer/DocumentActivity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,8 @@ protected void onDocMotion() {
369369

370370
@Override
371371
public void onSizeChanged(int w, int h, int oldw, int oldh) {
372-
if (core.isReflowable()) {
372+
SharedPreferences prefs = getPreferences(Context.MODE_PRIVATE);
373+
if (core.isReflowable() && prefs.getInt("page"+mDocKey, 0) == 0) {
373374
mLayoutW = w * 72 / mDisplayDPI;
374375
mLayoutH = h * 72 / mDisplayDPI;
375376
relayoutDocument();

0 commit comments

Comments
 (0)