From db661ff297cd0b65e3f206a2bc9e1bb38ba47e1a Mon Sep 17 00:00:00 2001 From: Thomas Taschauer Date: Sat, 30 May 2020 13:08:18 +0200 Subject: [PATCH 01/19] use latest NDK --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 6c3dc21dc6ff..05f721f20669 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'com.google.firebase.crashlytics' android { compileSdkVersion 29 - ndkVersion "21.0.6113669" + ndkVersion "21.1.6352462" defaultConfig { applicationId "at.tomtasche.reader" From 3597ba6379bbabc2ec546128d57fae07e64c8841 Mon Sep 17 00:00:00 2001 From: Thomas Taschauer Date: Tue, 2 Jun 2020 11:50:06 +0200 Subject: [PATCH 02/19] New translations strings.xml (Slovenian) --- app/src/main/res/values-sl-rSI/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-sl-rSI/strings.xml b/app/src/main/res/values-sl-rSI/strings.xml index 1013a63a9ef0..bf5a1e939ff0 100644 --- a/app/src/main/res/values-sl-rSI/strings.xml +++ b/app/src/main/res/values-sl-rSI/strings.xml @@ -48,7 +48,7 @@ OpenDocument Reader povsod omogoča ogled dokumentov, ki so shranjeni v obliki OpenDocument (.odt, .ods, .odp). S programom OpenDocument Reader lahko berete in hitro iščete po dokumentih. Ste našli še zadnjo napako v dokumentu, ki jo želite popraviti? Sedaj podpira tudi urejanje! - Ta program se registrira, da privzeto odpre vse vrste datotek, da lahko podpira programe, kot je \"Samsung My Files\". Če vam ta značilnost povzroča težave, jo lahko tukaj izklopite. + Ta program se registrira, da privzeto odpre vse vrste datotek, da lahko podpira programe, kot je \"Samsung Moje datoteke\". Če vam ta značilnost povzroča težave, jo lahko tukaj izklopite. Branje … Začenjanje TTS-a … Pripravljen! From ca747822e73b3d3095f73540d8ab8b7ed567eedd Mon Sep 17 00:00:00 2001 From: Thomas Taschauer Date: Fri, 5 Jun 2020 18:40:06 +0200 Subject: [PATCH 03/19] New translations strings.xml (Hindi) --- app/src/main/res/values-hi-rIN/strings.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-hi-rIN/strings.xml b/app/src/main/res/values-hi-rIN/strings.xml index 3ea04e700dfa..2a307f243b1b 100644 --- a/app/src/main/res/values-hi-rIN/strings.xml +++ b/app/src/main/res/values-hi-rIN/strings.xml @@ -1,2 +1,5 @@ - + + कुछ गलत हो गया है।फ़ाइल नहीं खोल सका। + फ़ाइल नहीं मिली। शायद यह अब मौजूद नहीं है? + From c564df791d05f9aabdda601ef23394c33470f4cf Mon Sep 17 00:00:00 2001 From: Thomas Taschauer Date: Fri, 5 Jun 2020 18:50:06 +0200 Subject: [PATCH 04/19] New translations strings.xml (Hindi) --- app/src/main/res/values-hi-rIN/strings.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/res/values-hi-rIN/strings.xml b/app/src/main/res/values-hi-rIN/strings.xml index 2a307f243b1b..1f23cfc1c10f 100644 --- a/app/src/main/res/values-hi-rIN/strings.xml +++ b/app/src/main/res/values-hi-rIN/strings.xml @@ -2,4 +2,7 @@ कुछ गलत हो गया है।फ़ाइल नहीं खोल सका। फ़ाइल नहीं मिली। शायद यह अब मौजूद नहीं है? + यह एक समर्थित file format नहीं है। + असमर्थित फ़ाइल format। इसे किसी अन्य app में खोलने का प्रयास करें। + आप इसे प्रदर्शित किए जाने के तरीके से खुश नहीं हैं। इसे किसी दूसरे एप्प में खोले। From a93422465d1dc189895d01b76136c83a00dc00b8 Mon Sep 17 00:00:00 2001 From: Thomas Taschauer Date: Fri, 5 Jun 2020 19:00:06 +0200 Subject: [PATCH 05/19] New translations strings.xml (Hindi) --- app/src/main/res/values-hi-rIN/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/res/values-hi-rIN/strings.xml b/app/src/main/res/values-hi-rIN/strings.xml index 1f23cfc1c10f..cbf7b892ec54 100644 --- a/app/src/main/res/values-hi-rIN/strings.xml +++ b/app/src/main/res/values-hi-rIN/strings.xml @@ -5,4 +5,8 @@ यह एक समर्थित file format नहीं है। असमर्थित फ़ाइल format। इसे किसी अन्य app में खोलने का प्रयास करें। आप इसे प्रदर्शित किए जाने के तरीके से खुश नहीं हैं। इसे किसी दूसरे एप्प में खोले। + आप इसे प्रदर्शित किए जाने के तरीके से खुश नहीं हैं। सुधार के लिए इसे अस्थायी रूप से अपलोड करें। + इस प्रकार की फ़ाइल का समर्थन करने वाले कोई app इस device पर नहीं मिला। + फ़ाइल को save करने के लिए कोई स्थान नहीं चुना गया है। + फ़ाइल save नहीं हो पाया। कृपया support@opendocument.app पर संपर्क करें From 669fbb004f368608315824786abc922f76f7af03 Mon Sep 17 00:00:00 2001 From: Thomas Taschauer Date: Fri, 5 Jun 2020 19:10:06 +0200 Subject: [PATCH 06/19] New translations strings.xml (Hindi) --- app/src/main/res/values-hi-rIN/strings.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/res/values-hi-rIN/strings.xml b/app/src/main/res/values-hi-rIN/strings.xml index cbf7b892ec54..e15493edfa4c 100644 --- a/app/src/main/res/values-hi-rIN/strings.xml +++ b/app/src/main/res/values-hi-rIN/strings.xml @@ -9,4 +9,11 @@ इस प्रकार की फ़ाइल का समर्थन करने वाले कोई app इस device पर नहीं मिला। फ़ाइल को save करने के लिए कोई स्थान नहीं चुना गया है। फ़ाइल save नहीं हो पाया। कृपया support@opendocument.app पर संपर्क करें + फ़ोन मे मेमोरी नही है। फ़ोन में बहुत अधिक चित्र हैं, या फ़ाइल बहुत बड़ी है। + यह फ़ाइल पासवर्ड द्वारा सुरक्षित है। + पढ़ने और save करने के लिए अनुमति की आवश्यकता है। + ताज़ा दस्तावेज़ + दस्तावेज़ खोलें via: + लोड हो रहा है… + अपलोड हो रहा है... From 66773dc4d9aa67effa25fc3f2b7f43f91b2ea017 Mon Sep 17 00:00:00 2001 From: Thomas Taschauer Date: Fri, 5 Jun 2020 19:20:05 +0200 Subject: [PATCH 07/19] New translations strings.xml (Hindi) --- app/src/main/res/values-hi-rIN/strings.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app/src/main/res/values-hi-rIN/strings.xml b/app/src/main/res/values-hi-rIN/strings.xml index e15493edfa4c..aebacff6f624 100644 --- a/app/src/main/res/values-hi-rIN/strings.xml +++ b/app/src/main/res/values-hi-rIN/strings.xml @@ -16,4 +16,21 @@ दस्तावेज़ खोलें via: लोड हो रहा है… अपलोड हो रहा है... + कृपया प्रतीक्षा करें, इसमें कुछ सेकंड लग सकते हैं + के साथ ओपन करें... + दस्तावेज़ साझा करें + दस्तावेज़ संपादित करें + विज्ञापन निकालें + फुलस्क्रीन मोड खोलें + दस्तावेज़ छापें + फुलस्क्रीन मोड से बाहर निकलने के लिए Back दबाएं। + पिछला + अगला + पृष्ठ में खोजें + चलाएँ + थोड़ा रुकें + अगला + पिछला + Save + सहायता From 35f28fa9d7ca2d80c8717ce9c5912fe31255e51b Mon Sep 17 00:00:00 2001 From: Artsem Lemiasheuski Date: Mon, 8 Jun 2020 21:48:39 +0200 Subject: [PATCH 08/19] iOS strings to translate --- app/src/main/res/values/strings.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a5ad6a1855b9..94393e262a59 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -74,5 +74,16 @@ Remove ads forever Remove ads temporarily for free by watching a short video + + + OK + You have unsaved changes + Save them now? + Yes + Discard changes + Cancel + Please enter the password to decrypt this document + Error + Back to documents From 71c8c946772897263eb8faaaae9db285aeb9eaa2 Mon Sep 17 00:00:00 2001 From: Artsem Lemiasheuski Date: Tue, 9 Jun 2020 20:15:36 +0200 Subject: [PATCH 09/19] Removed iOS string. --- app/src/main/res/values/strings.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 94393e262a59..36223d33d1e9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -82,7 +82,6 @@ Yes Discard changes Cancel - Please enter the password to decrypt this document Error Back to documents From 38af8dea761a21fbd121882f6e8c39f8601d9d70 Mon Sep 17 00:00:00 2001 From: Thomas Taschauer Date: Fri, 17 Jul 2020 04:40:06 +0200 Subject: [PATCH 10/19] New translations strings.xml (Japanese) --- app/src/main/res/values-ja-rJP/strings.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/res/values-ja-rJP/strings.xml b/app/src/main/res/values-ja-rJP/strings.xml index 1f7f36d88472..1a8f4601e37d 100644 --- a/app/src/main/res/values-ja-rJP/strings.xml +++ b/app/src/main/res/values-ja-rJP/strings.xml @@ -7,6 +7,8 @@ ファイルの表示方法に満足できませんか? 代わりに別のアプリで開きます。 ファイルの表示方法に満足できませんか? 一時的にアップロードして、形式を改善します。 お使いのデバイスで、このファイル形式をサポートするアプリが見つかりませんでした。 + 選択したファイルを保存する場所がありません。 + ファイルを保存できませんでした。support@opendoocument.app にお問い合わせください デバイスのメモリ不足です! 写真が多すぎるかファイルが大きすぎます。 ドキュメントがパスワードで保護されています ドキュメントの読み取りと保存を行う権限が必要です @@ -23,6 +25,8 @@ 最近開いたドキュメント ドキュメントの検索 ドキュメントを開く + 開く... + ドキュメントを共有 ドキュメントを編集 広告を削除する 全画面表示を開く @@ -51,6 +55,7 @@ テキスト読み上げできませんでした。 一時停止しました。 完了しました。 + ドキュメントを保存しました。 印刷しています… お使いのデバイスで印刷は利用できません。Android の新しいバージョンにアップグレードしてください。 外出先で ODF ファイルを開いたり読み込みます! From b1dc2d9a4629e7576674f9bae2b8c58a432f213f Mon Sep 17 00:00:00 2001 From: Thomas Taschauer Date: Sat, 15 Aug 2020 20:52:25 +0200 Subject: [PATCH 11/19] update repositories --- .idea/jarRepositories.xml | 30 ++++++++++++++++++++++++ .idea/modules.xml | 4 +++- app/build.gradle | 27 +++++++++++---------- build.gradle | 4 ++-- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 5 files changed, 51 insertions(+), 18 deletions(-) create mode 100644 .idea/jarRepositories.xml diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 000000000000..eb2873e7ed57 --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index 9eee52292075..81b7a1a117ac 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -3,7 +3,9 @@ + + - + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 05f721f20669..7d55bbef1a53 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'com.google.firebase.crashlytics' android { compileSdkVersion 29 - ndkVersion "21.1.6352462" + ndkVersion "21.3.6528147" defaultConfig { applicationId "at.tomtasche.reader" @@ -52,19 +52,19 @@ android { dependencies { implementation 'com.google.firebase:firebase-storage:19.1.1' - implementation 'com.google.firebase:firebase-auth:19.3.1' - implementation 'com.google.firebase:firebase-ads:19.1.0' - implementation 'com.google.firebase:firebase-core:17.4.0' - implementation 'com.google.firebase:firebase-perf:19.0.7' - implementation 'com.google.firebase:firebase-crashlytics:17.0.0' - implementation 'com.google.firebase:firebase-crashlytics-ndk:17.0.0' + implementation 'com.google.firebase:firebase-auth:19.3.2' + implementation 'com.google.firebase:firebase-ads:19.3.0' + implementation 'com.google.firebase:firebase-perf:19.0.8' + implementation 'com.google.firebase:firebase-crashlytics:17.2.1' + implementation 'com.google.firebase:firebase-crashlytics-ndk:17.2.1' - implementation 'com.android.billingclient:billing:2.2.0' + implementation 'com.android.billingclient:billing:3.0.0' implementation 'androidx.multidex:multidex:2.0.1' - implementation 'androidx.appcompat:appcompat:1.1.0' - implementation 'androidx.core:core:1.2.0' - implementation 'com.google.android.material:material:1.1.0' + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'androidx.core:core:1.3.1' + implementation 'com.google.android.material:material:1.2.0' + implementation 'androidx.webkit:webkit:1.3.0-rc02' implementation 'com.github.AppIntro:AppIntro:5.1.0' @@ -81,8 +81,9 @@ dependencies { implementation 'com.viliussutkus89:wvware-android:1.2.4' implementation 'com.github.huzongyao:AndroidMagic:v1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-beta01' - androidTestImplementation 'androidx.test:rules:1.3.0-beta01' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + androidTestImplementation 'androidx.test:rules:1.2.0' + androidTestImplementation 'androidx.test.ext:junit:1.1.1' } apply plugin: 'com.google.gms.google-services' diff --git a/build.gradle b/build.gradle index 8fe740cd0179..446c9f7a6afc 100644 --- a/build.gradle +++ b/build.gradle @@ -6,10 +6,10 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.6.3' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'com.google.gms:google-services:4.3.3' classpath 'com.google.firebase:perf-plugin:1.3.1' - classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0-beta03' + classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0' } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8874e4147306..76a954708a06 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Mar 20 16:52:52 CET 2020 +#Thu Jun 11 20:20:35 CEST 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip From d3482922ebc36446ce2637b46f65ab590842bd53 Mon Sep 17 00:00:00 2001 From: Thomas Taschauer Date: Sat, 15 Aug 2020 20:53:35 +0200 Subject: [PATCH 12/19] improve tests --- .idea/modules/app/google-services.json | 73 +++++++++++++++++++ .../reader/test/OdtActivityTest.java | 29 ++++++-- .../reader/test/PdfActivityTest.java | 2 + build-test.sh | 7 ++ 4 files changed, 104 insertions(+), 7 deletions(-) create mode 100644 .idea/modules/app/google-services.json create mode 100644 build-test.sh diff --git a/.idea/modules/app/google-services.json b/.idea/modules/app/google-services.json new file mode 100644 index 000000000000..d24fca3a5c02 --- /dev/null +++ b/.idea/modules/app/google-services.json @@ -0,0 +1,73 @@ +{ + "project_info": { + "project_number": "1093041624247", + "firebase_url": "https://admob-app-id-9025061963.firebaseio.com", + "project_id": "admob-app-id-9025061963", + "storage_bucket": "admob-app-id-9025061963.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:1093041624247:android:6ee3f7722637d69e", + "android_client_info": { + "package_name": "at.tomtasche.reader" + } + }, + "oauth_client": [ + { + "client_id": "1093041624247-r99k5n37emneuo117a7mhm8b7hk6eh77.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "at.tomtasche.reader", + "certificate_hash": "ce886552f406efbd45a7408375422af74f18412b" + } + }, + { + "client_id": "1093041624247-jl8grfrvqrjf5d7hg9b9gvhq3tkcg936.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "at.tomtasche.reader", + "certificate_hash": "251d73b707fdaaaae180a52864d4892ace7025a1" + } + }, + { + "client_id": "1093041624247-nnsfmjhf0j1klsfadraatuedk8b8k8it.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "at.tomtasche.reader", + "certificate_hash": "e501cb13981ea890ad3f276b8c53539401664d6e" + } + }, + { + "client_id": "1093041624247-ma9ptn5dtg2n9d80r6bkmpgjnn7os4g2.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyDitZgQ9LSQaWVpNngpFdeM9F74ecGCPVs" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "1093041624247-ma9ptn5dtg2n9d80r6bkmpgjnn7os4g2.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "1093041624247-3mpspg70slchbpn1vut1h5g884mkt778.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "at.tomtasche.reader.lite1", + "app_store_id": "1510195065" + } + } + ] + } + }, + "admob_app_id": "ca-app-pub-8161473686436957~9025061963" + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/app/src/androidTest/java/at/tomtasche/reader/test/OdtActivityTest.java b/app/src/androidTest/java/at/tomtasche/reader/test/OdtActivityTest.java index c390ddafd119..14c82a4ca970 100644 --- a/app/src/androidTest/java/at/tomtasche/reader/test/OdtActivityTest.java +++ b/app/src/androidTest/java/at/tomtasche/reader/test/OdtActivityTest.java @@ -1,6 +1,5 @@ package at.tomtasche.reader.test; - import android.Manifest; import android.os.Environment; import android.view.View; @@ -10,6 +9,7 @@ import org.hamcrest.Description; import org.hamcrest.Matcher; import org.hamcrest.TypeSafeMatcher; +import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -24,6 +24,7 @@ import androidx.test.espresso.FailureHandler; import androidx.test.espresso.ViewInteraction; import androidx.test.filters.LargeTest; +import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner; import androidx.test.rule.ActivityTestRule; import androidx.test.rule.GrantPermissionRule; import androidx.test.runner.AndroidJUnit4; @@ -41,7 +42,7 @@ import static org.hamcrest.Matchers.allOf; @LargeTest -@RunWith(AndroidJUnit4.class) +@RunWith(AndroidJUnit4ClassRunner.class) public class OdtActivityTest { private boolean loadingDone; @@ -66,13 +67,16 @@ private static void copy(InputStream src, File dst) throws IOException { } } - @Test - public void mainActivityTest() { + private void setup() { // TODO: fix for Android 29+ try { - final File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), "test.odt"); - file.mkdirs(); + File folder = new File(Environment.getExternalStorageDirectory(), "AAA_ODRTEST"); + folder.mkdirs(); + + File file = new File(folder, "test.odt"); + + file.delete(); file.createNewFile(); InputStream inputStream = new URL("https://api.libreoffice.org/examples/cpp/DocumentLoader/test.odt").openStream(); @@ -82,6 +86,11 @@ public void mainActivityTest() { throw new RuntimeException(e); } + } + + @Test + public void mainActivityTest() { + setup(); ViewInteraction actionMenuItemView = onView( allOf(withId(R.id.menu_open), withContentDescription("Open document"), @@ -94,7 +103,7 @@ public void mainActivityTest() { appCompatTextView.perform(click()); ViewInteraction textView = onView( - allOf(withId(android.R.id.text1), withText("Download"), + allOf(withId(android.R.id.text1), withText("AAA_ODRTEST"), isDisplayed())); textView.perform(click()); @@ -125,6 +134,12 @@ public void handle(Throwable error, Matcher viewMatcher) { loadingDialog.check(matches(withText("This could take a few minutes, depending on the structure of your document and the processing power of your device."))); } while (!loadingDone); + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + ViewInteraction actionMenuItemView2 = onView( allOf(withId(R.id.menu_edit), withContentDescription("Edit document"), isEnabled())); diff --git a/app/src/androidTest/java/at/tomtasche/reader/test/PdfActivityTest.java b/app/src/androidTest/java/at/tomtasche/reader/test/PdfActivityTest.java index cd1618d2b79f..aef825de7487 100644 --- a/app/src/androidTest/java/at/tomtasche/reader/test/PdfActivityTest.java +++ b/app/src/androidTest/java/at/tomtasche/reader/test/PdfActivityTest.java @@ -74,6 +74,8 @@ private static void copy(InputStream src, File dst) throws IOException { public void mainActivityTest() { // TODO: fix for Android 29+ + if (true) return; + try { final File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS), "AAA/test.pdf"); file.getParentFile().mkdirs(); diff --git a/build-test.sh b/build-test.sh new file mode 100644 index 000000000000..9de67c9ad227 --- /dev/null +++ b/build-test.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +./gradlew assembleDebug +./gradlew assembleDebugAndroidTest + +ls app/build/outputs/apk/debug/app-debug.apk +ls app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk From 3c8e1634da73baa53d7f667486f1ada95af63a65 Mon Sep 17 00:00:00 2001 From: Thomas Taschauer Date: Sat, 15 Aug 2020 20:53:51 +0200 Subject: [PATCH 13/19] disable dark mode for PDF --- .../at/tomtasche/reader/ui/activity/DocumentFragment.java | 4 +++- .../main/java/at/tomtasche/reader/ui/widget/PageView.java | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/at/tomtasche/reader/ui/activity/DocumentFragment.java b/app/src/main/java/at/tomtasche/reader/ui/activity/DocumentFragment.java index b388f9bc753f..32d4500d3fe6 100644 --- a/app/src/main/java/at/tomtasche/reader/ui/activity/DocumentFragment.java +++ b/app/src/main/java/at/tomtasche/reader/ui/activity/DocumentFragment.java @@ -190,6 +190,7 @@ public void onSaveInstanceState(@NonNull Bundle outState) { private void loadWithType(FileLoader.LoaderType loaderType, FileLoader.Options options) { boolean isUpload = false; boolean isEditEnabled = false; + boolean isDarkModeSupported = true; FileLoader loader; switch (loaderType) { @@ -205,6 +206,7 @@ private void loadWithType(FileLoader.LoaderType loaderType, FileLoader.Options o break; case PDF: loader = pdfLoader; + isDarkModeSupported = false; break; case ONLINE: loader = onlineLoader; @@ -221,8 +223,8 @@ private void loadWithType(FileLoader.LoaderType loaderType, FileLoader.Options o } showProgress(isUpload); - toggleDocumentMenu(true, isEditEnabled); + pageView.toggleDarkMode(isDarkModeSupported); loader.loadAsync(options); } diff --git a/app/src/main/java/at/tomtasche/reader/ui/widget/PageView.java b/app/src/main/java/at/tomtasche/reader/ui/widget/PageView.java index fae0639fac12..a0b539dbfbbf 100644 --- a/app/src/main/java/at/tomtasche/reader/ui/widget/PageView.java +++ b/app/src/main/java/at/tomtasche/reader/ui/widget/PageView.java @@ -21,6 +21,8 @@ import java.lang.reflect.Method; import androidx.annotation.Keep; +import androidx.webkit.WebSettingsCompat; +import androidx.webkit.WebViewFeature; import at.tomtasche.reader.background.AndroidFileCache; import at.tomtasche.reader.background.OnlineLoader; import at.tomtasche.reader.background.StreamUtil; @@ -132,6 +134,12 @@ public void onDownloadStart(String url, String userAgent, }); } + public void toggleDarkMode(boolean isDarkEnabled) { + if (WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK)) { + WebSettingsCompat.setForceDark(getSettings(), isDarkEnabled ? WebSettingsCompat.FORCE_DARK_AUTO : WebSettingsCompat.FORCE_DARK_OFF); + } + } + @Override public void loadUrl(String url) { wasCommitCalled = false; From fdec307b1b3f0142d81c273ed6f2054b8bbea89c Mon Sep 17 00:00:00 2001 From: Thomas Taschauer Date: Sat, 15 Aug 2020 21:15:19 +0200 Subject: [PATCH 14/19] update core --- OpenDocument.core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenDocument.core b/OpenDocument.core index 977fb9f6190a..43a196d4e78a 160000 --- a/OpenDocument.core +++ b/OpenDocument.core @@ -1 +1 @@ -Subproject commit 977fb9f6190ae8a1e5a172d48275e342038553bd +Subproject commit 43a196d4e78a1e5ef9d45751df20d9a131b9d139 From 26cc10287316116efe5c50955ff62099035798fe Mon Sep 17 00:00:00 2001 From: Thomas Taschauer Date: Sat, 15 Aug 2020 21:23:58 +0200 Subject: [PATCH 15/19] raise version --- app/src/main/AndroidManifest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index b794c04212d8..81fcf675aa77 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -3,8 +3,8 @@ xmlns:tools="http://schemas.android.com/tools" package="at.tomtasche.reader" android:installLocation="auto" - android:versionCode="132" - android:versionName="3.3.2" + android:versionCode="133" + android:versionName="3.3.3" tools:ignore="GoogleAppIndexingWarning"> Date: Sun, 16 Aug 2020 11:03:09 +0200 Subject: [PATCH 16/19] offer to upload ODF files too --- .../reader/background/OnlineLoader.java | 20 +++++++++---------- .../reader/ui/activity/DocumentFragment.java | 5 ++--- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/at/tomtasche/reader/background/OnlineLoader.java b/app/src/main/java/at/tomtasche/reader/background/OnlineLoader.java index 2f4141bfb71e..6001c8914e1f 100644 --- a/app/src/main/java/at/tomtasche/reader/background/OnlineLoader.java +++ b/app/src/main/java/at/tomtasche/reader/background/OnlineLoader.java @@ -58,11 +58,14 @@ public class OnlineLoader extends FileLoader { public static final String GOOGLE_VIEWER_URL = "https://docs.google.com/viewer?embedded=true&url="; public static final String MICROSOFT_VIEWER_URL = "https://view.officeapps.live.com/op/view.aspx?src="; + private OdfLoader odfLoader; + private StorageReference storage; private FirebaseAuth auth; - public OnlineLoader(Context context) { + public OnlineLoader(Context context, OdfLoader odfLoader) { super(context, LoaderType.ONLINE); + this.odfLoader = odfLoader; } @Override @@ -131,25 +134,22 @@ public void loadSync(Options options) { metadataBuilder.setContentType(options.fileType); } - StorageReference reference = storage.child("uploads/" + currentUserId + "/" + UUID.randomUUID() + "." + options.fileExtension); + String filePath = currentUserId + "/" + UUID.randomUUID() + "." + options.fileExtension; + StorageReference reference = storage.child("uploads/" + filePath); UploadTask uploadTask = reference.putFile(options.cacheUri, metadataBuilder.build()); Tasks.await(uploadTask); if (uploadTask.isSuccessful()) { - Task urlTask = reference.getDownloadUrl(); - Tasks.await(urlTask); - String viewerUrl; - if (options.fileType.contains("vnd.oasis.opendocument")) { + if (odfLoader.isSupported(options)) { + // ODF does not seem to be supported by google docs viewer viewerUrl = MICROSOFT_VIEWER_URL; } else { - // ODF does not seem to be supported by google docs viewer viewerUrl = GOOGLE_VIEWER_URL; } - String downloadUrl = urlTask.getResult().toString(); - Uri viewerUri = Uri.parse(viewerUrl - + URLEncoder.encode(downloadUrl, StreamUtil.ENCODING)); + String downloadUrl = "https://us-central1-admob-app-id-9025061963.cloudfunctions.net/download?filePath=" + filePath; + Uri viewerUri = Uri.parse(viewerUrl + downloadUrl); result.partTitles.add(null); result.partUris.add(viewerUri); diff --git a/app/src/main/java/at/tomtasche/reader/ui/activity/DocumentFragment.java b/app/src/main/java/at/tomtasche/reader/ui/activity/DocumentFragment.java index 32d4500d3fe6..908a60d54b26 100644 --- a/app/src/main/java/at/tomtasche/reader/ui/activity/DocumentFragment.java +++ b/app/src/main/java/at/tomtasche/reader/ui/activity/DocumentFragment.java @@ -120,7 +120,7 @@ public void onActivityCreated(@Nullable Bundle savedInstanceState) { rawLoader = new RawLoader(context); rawLoader.initialize(this, mainHandler, backgroundHandler, analyticsManager, crashManager); - onlineLoader = new OnlineLoader(context); + onlineLoader = new OnlineLoader(context, odfLoader); onlineLoader.initialize(this, mainHandler, backgroundHandler, analyticsManager, crashManager); pageView.setDocumentFragment(this); @@ -392,8 +392,7 @@ public void onSuccess(FileLoader.Result result) { if (result.loaderType == FileLoader.LoaderType.RAW || result.loaderType == FileLoader.LoaderType.ONLINE) { offerReopen(activity, options, R.string.toast_hint_unsupported_file, false); - } else if (result.loaderType != FileLoader.LoaderType.ODF) { - // ODF does not seem to be supported by docs viewer + } else { offerUpload(activity, options, false); } } From d856f49773a4baad25e411e9680480ab6f73251f Mon Sep 17 00:00:00 2001 From: Thomas Taschauer Date: Sun, 16 Aug 2020 11:09:28 +0200 Subject: [PATCH 17/19] only use download proxy for Microsoft Web Viewer --- .../tomtasche/reader/background/OnlineLoader.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/at/tomtasche/reader/background/OnlineLoader.java b/app/src/main/java/at/tomtasche/reader/background/OnlineLoader.java index 6001c8914e1f..0582cf4202f8 100644 --- a/app/src/main/java/at/tomtasche/reader/background/OnlineLoader.java +++ b/app/src/main/java/at/tomtasche/reader/background/OnlineLoader.java @@ -140,16 +140,19 @@ public void loadSync(Options options) { Tasks.await(uploadTask); if (uploadTask.isSuccessful()) { - String viewerUrl; + Uri viewerUri; if (odfLoader.isSupported(options)) { // ODF does not seem to be supported by google docs viewer - viewerUrl = MICROSOFT_VIEWER_URL; + String downloadUrl = "https://us-central1-admob-app-id-9025061963.cloudfunctions.net/download?filePath=" + filePath; + + viewerUri = Uri.parse(MICROSOFT_VIEWER_URL + downloadUrl); } else { - viewerUrl = GOOGLE_VIEWER_URL; - } + Task urlTask = reference.getDownloadUrl(); + Tasks.await(urlTask); + String downloadUrl = urlTask.getResult().toString(); - String downloadUrl = "https://us-central1-admob-app-id-9025061963.cloudfunctions.net/download?filePath=" + filePath; - Uri viewerUri = Uri.parse(viewerUrl + downloadUrl); + viewerUri = Uri.parse(GOOGLE_VIEWER_URL + URLEncoder.encode(downloadUrl, StreamUtil.ENCODING)); + } result.partTitles.add(null); result.partUris.add(viewerUri); From bba4420d829e17aaf688481a08b7eb26abdc0131 Mon Sep 17 00:00:00 2001 From: Thomas Taschauer Date: Tue, 25 Aug 2020 22:49:08 +0200 Subject: [PATCH 18/19] update zip viewer, fix in-app purchase, raise version --- .idea/vcs.xml | 7 - app/src/main/AndroidManifest.xml | 4 +- app/src/main/assets/zip-prefix.html | 11618 +--------------- app/src/main/assets/zip-suffix.html | 26 +- .../reader/nonfree/BillingManager.java | 9 +- 5 files changed, 35 insertions(+), 11629 deletions(-) diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 20482cf8a51d..b35c6a63af01 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -3,12 +3,5 @@ - - - - - - - \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 81fcf675aa77..89711cef194f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -3,8 +3,8 @@ xmlns:tools="http://schemas.android.com/tools" package="at.tomtasche.reader" android:installLocation="auto" - android:versionCode="133" - android:versionName="3.3.3" + android:versionCode="134" + android:versionName="3.3.4" tools:ignore="GoogleAppIndexingWarning"> - +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JSZip=t()}}(function(){return function s(a,o,h){function u(r,t){if(!o[r]){if(!a[r]){var e="function"==typeof require&&require;if(!t&&e)return e(r,!0);if(l)return l(r,!0);var i=new Error("Cannot find module '"+r+"'");throw i.code="MODULE_NOT_FOUND",i}var n=o[r]={exports:{}};a[r][0].call(n.exports,function(t){var e=a[r][1][t];return u(e||t)},n,n.exports,s,a,o,h)}return o[r].exports}for(var l="function"==typeof require&&require,t=0;t>2,s=(3&e)<<4|r>>4,a=1>6:64,o=2>4,r=(15&n)<<4|(s=p.indexOf(t.charAt(o++)))>>2,i=(3&s)<<6|(a=p.indexOf(t.charAt(o++))),l[h++]=e,64!==s&&(l[h++]=r),64!==a&&(l[h++]=i);return l}},{"./support":30,"./utils":32}],2:[function(t,e,r){"use strict";var i=t("./external"),n=t("./stream/DataWorker"),s=t("./stream/DataLengthProbe"),a=t("./stream/Crc32Probe");s=t("./stream/DataLengthProbe");function o(t,e,r,i,n){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=i,this.compressedContent=n}o.prototype={getContentWorker:function(){var t=new n(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),e=this;return t.on("end",function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),t},getCompressedWorker:function(){return new n(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(t,e,r){return t.pipe(new a).pipe(new s("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new s("compressedSize")).withStreamInfo("compression",e)},e.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,r){"use strict";var i=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(t){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,r){"use strict";var i=t("./utils");var o=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==i.getTypeOf(t)?function(t,e,r,i){var n=o,s=i+r;t^=-1;for(var a=i;a>>8^n[255&(t^e[a])];return-1^t}(0|e,t,t.length,0):function(t,e,r,i){var n=o,s=i+r;t^=-1;for(var a=i;a>>8^n[255&(t^e.charCodeAt(a))];return-1^t}(0|e,t,t.length,0):0}},{"./utils":32}],5:[function(t,e,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,e,r){"use strict";var i=null;i="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:i}},{lie:37}],7:[function(t,e,r){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,n=t("pako"),s=t("./utils"),a=t("./stream/GenericWorker"),o=i?"uint8array":"array";function h(t,e){a.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}r.magic="\b\0",s.inherits(h,a),h.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,t.data),!1)},h.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new n[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},r.compressWorker=function(t){return new h("Deflate",t)},r.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,r){"use strict";function A(t,e){var r,i="";for(r=0;r>>=8;return i}function i(t,e,r,i,n,s){var a,o,h=t.file,u=t.compression,l=s!==O.utf8encode,f=I.transformTo("string",s(h.name)),d=I.transformTo("string",O.utf8encode(h.name)),c=h.comment,p=I.transformTo("string",s(c)),m=I.transformTo("string",O.utf8encode(c)),_=d.length!==h.name.length,g=m.length!==c.length,b="",v="",y="",w=h.dir,k=h.date,x={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(x.crc32=t.crc32,x.compressedSize=t.compressedSize,x.uncompressedSize=t.uncompressedSize);var S=0;e&&(S|=8),l||!_&&!g||(S|=2048);var z=0,C=0;w&&(z|=16),"UNIX"===n?(C=798,z|=function(t,e){var r=t;return t||(r=e?16893:33204),(65535&r)<<16}(h.unixPermissions,w)):(C=20,z|=function(t){return 63&(t||0)}(h.dosPermissions)),a=k.getUTCHours(),a<<=6,a|=k.getUTCMinutes(),a<<=5,a|=k.getUTCSeconds()/2,o=k.getUTCFullYear()-1980,o<<=4,o|=k.getUTCMonth()+1,o<<=5,o|=k.getUTCDate(),_&&(v=A(1,1)+A(B(f),4)+d,b+="up"+A(v.length,2)+v),g&&(y=A(1,1)+A(B(p),4)+m,b+="uc"+A(y.length,2)+y);var E="";return E+="\n\0",E+=A(S,2),E+=u.magic,E+=A(a,2),E+=A(o,2),E+=A(x.crc32,4),E+=A(x.compressedSize,4),E+=A(x.uncompressedSize,4),E+=A(f.length,2),E+=A(b.length,2),{fileRecord:R.LOCAL_FILE_HEADER+E+f+b,dirRecord:R.CENTRAL_FILE_HEADER+A(C,2)+E+A(p.length,2)+"\0\0\0\0"+A(z,4)+A(i,4)+f+b+p}}var I=t("../utils"),n=t("../stream/GenericWorker"),O=t("../utf8"),B=t("../crc32"),R=t("../signature");function s(t,e,r,i){n.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=i,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}I.inherits(s,n),s.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,n.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-i-1))/r:100}}))},s.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=i(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},s.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,r=i(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),e)this.push({data:function(t){return R.DATA_DESCRIPTOR+A(t.crc32,4)+A(t.compressedSize,4)+A(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},s.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return i.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=n},{"../utils":32}],19:[function(t,e,r){"use strict";var i=t("./Uint8ArrayReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,r){"use strict";var i=t("./DataReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},n.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},n.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./DataReader":18}],21:[function(t,e,r){"use strict";var i=t("./ArrayReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,r){"use strict";var i=t("../utils"),n=t("../support"),s=t("./ArrayReader"),a=t("./StringReader"),o=t("./NodeBufferReader"),h=t("./Uint8ArrayReader");e.exports=function(t){var e=i.getTypeOf(t);return i.checkSupport(e),"string"!==e||n.uint8array?"nodebuffer"===e?new o(t):n.uint8array?new h(i.transformTo("uint8array",t)):new s(i.transformTo("array",t)):new a(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,e,r){"use strict";var i=t("./GenericWorker"),n=t("../utils");function s(t){i.call(this,"ConvertWorker to "+t),this.destType=t}n.inherits(s,i),s.prototype.processChunk=function(t){this.push({data:n.transformTo(this.destType,t.data),meta:t.meta})},e.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,r){"use strict";var i=t("./GenericWorker"),n=t("../crc32");function s(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(s,i),s.prototype.processChunk=function(t){this.streamInfo.crc32=n(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,r){"use strict";var i=t("../utils"),n=t("./GenericWorker");function s(t){n.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}i.inherits(s,n),s.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}n.prototype.processChunk.call(this,t)},e.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,r){"use strict";var i=t("../utils"),n=t("./GenericWorker");function s(t){n.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then(function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=i.getTypeOf(t),e.isPaused||e._tickAndRepeat()},function(t){e.error(t)})}i.inherits(s,n),s.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,r){"use strict";function i(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var r=0;r "+t:t}},e.exports=i},{}],29:[function(t,e,r){"use strict";var h=t("../utils"),n=t("./ConvertWorker"),s=t("./GenericWorker"),u=t("../base64"),i=t("../support"),a=t("../external"),o=null;if(i.nodestream)try{o=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function l(t,o){return new a.Promise(function(e,r){var i=[],n=t._internalType,s=t._outputType,a=t._mimeType;t.on("data",function(t,e){i.push(t),o&&o(e)}).on("error",function(t){i=[],r(t)}).on("end",function(){try{var t=function(t,e,r){switch(t){case"blob":return h.newBlob(h.transformTo("arraybuffer",e),r);case"base64":return u.encode(e);default:return h.transformTo(t,e)}}(s,function(t,e){var r,i=0,n=null,s=0;for(r=0;r>>6:(r<65536?e[s++]=224|r>>>12:(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63),e[s++]=128|r>>>6&63),e[s++]=128|63&r);return e}(t)},s.utf8decode=function(t){return h.nodebuffer?o.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,r,i,n,s=t.length,a=new Array(2*s);for(e=r=0;e>10&1023,a[r++]=56320|1023&i)}return a.length!==r&&(a.subarray?a=a.subarray(0,r):a.length=r),o.applyFromCharCode(a)}(t=o.transformTo(h.uint8array?"uint8array":"array",t))},o.inherits(a,i),a.prototype.processChunk=function(t){var e=o.transformTo(h.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(h.uint8array){var r=e;(e=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),e.set(r,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var i=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+u[t[r]]>e?r:e}(e),n=e;i!==e.length&&(h.uint8array?(n=e.subarray(0,i),this.leftOver=e.subarray(i,e.length)):(n=e.slice(0,i),this.leftOver=e.slice(i,e.length))),this.push({data:s.utf8decode(n),meta:t.meta})},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=a,o.inherits(l,i),l.prototype.processChunk=function(t){this.push({data:s.utf8encode(t.data),meta:t.meta})},s.Utf8EncodeWorker=l},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,a){"use strict";var o=t("./support"),h=t("./base64"),r=t("./nodejsUtils"),i=t("set-immediate-shim"),u=t("./external");function n(t){return t}function l(t,e){for(var r=0;r>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=i(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,r,i,n=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4>>6:(r<65536?e[s++]=224|r>>>12:(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63),e[s++]=128|r>>>6&63),e[s++]=128|63&r);return e},r.buf2binstring=function(t){return l(t,t.length)},r.binstring2buf=function(t){for(var e=new h.Buf8(t.length),r=0,i=e.length;r>10&1023,o[i++]=56320|1023&n)}return l(o,i)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+u[t[r]]>e?r:e}},{"./common":41}],43:[function(t,e,r){"use strict";e.exports=function(t,e,r,i){for(var n=65535&t|0,s=t>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e,r,i){var n=o,s=i+r;t^=-1;for(var a=i;a>>8^n[255&(t^e[a])];return-1^t}},{}],46:[function(t,e,r){"use strict";var h,d=t("../utils/common"),u=t("./trees"),c=t("./adler32"),p=t("./crc32"),i=t("./messages"),l=0,f=4,m=0,_=-2,g=-1,b=4,n=2,v=8,y=9,s=286,a=30,o=19,w=2*s+1,k=15,x=3,S=258,z=S+x+1,C=42,E=113,A=1,I=2,O=3,B=4;function R(t,e){return t.msg=i[e],e}function T(t){return(t<<1)-(4t.avail_out&&(r=t.avail_out),0!==r&&(d.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function N(t,e){u._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,F(t.strm)}function U(t,e){t.pending_buf[t.pending++]=e}function P(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function L(t,e){var r,i,n=t.max_chain_length,s=t.strstart,a=t.prev_length,o=t.nice_match,h=t.strstart>t.w_size-z?t.strstart-(t.w_size-z):0,u=t.window,l=t.w_mask,f=t.prev,d=t.strstart+S,c=u[s+a-1],p=u[s+a];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(u[(r=e)+a]===p&&u[r+a-1]===c&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&sh&&0!=--n);return a<=t.lookahead?a:t.lookahead}function j(t){var e,r,i,n,s,a,o,h,u,l,f=t.w_size;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=f+(f-z)){for(d.arraySet(t.window,t.window,f,f,0),t.match_start-=f,t.strstart-=f,t.block_start-=f,e=r=t.hash_size;i=t.head[--e],t.head[e]=f<=i?i-f:0,--r;);for(e=r=f;i=t.prev[--e],t.prev[e]=f<=i?i-f:0,--r;);n+=f}if(0===t.strm.avail_in)break;if(a=t.strm,o=t.window,h=t.strstart+t.lookahead,u=n,l=void 0,l=a.avail_in,u=x)for(s=t.strstart-t.insert,t.ins_h=t.window[s],t.ins_h=(t.ins_h<=x&&(t.ins_h=(t.ins_h<=x)if(i=u._tr_tally(t,t.strstart-t.match_start,t.match_length-x),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=x){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=x&&(t.ins_h=(t.ins_h<=x&&t.match_length<=t.prev_length){for(n=t.strstart+t.lookahead-x,i=u._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-x),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=n&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(j(t),0===t.lookahead&&e===l)return A;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+r;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,N(t,!1),0===t.strm.avail_out))return A;if(t.strstart-t.block_start>=t.w_size-z&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(N(t,!0),0===t.strm.avail_out?O:B):(t.strstart>t.block_start&&(N(t,!1),t.strm.avail_out),A)}),new M(4,4,8,4,Z),new M(4,5,16,8,Z),new M(4,6,32,32,Z),new M(4,4,16,16,W),new M(8,16,32,32,W),new M(8,16,128,128,W),new M(8,32,128,256,W),new M(32,128,258,1024,W),new M(32,258,258,4096,W)],r.deflateInit=function(t,e){return Y(t,e,v,15,8,0)},r.deflateInit2=Y,r.deflateReset=K,r.deflateResetKeep=G,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?_:(t.state.gzhead=e,m):_},r.deflate=function(t,e){var r,i,n,s;if(!t||!t.state||5>8&255),U(i,i.gzhead.time>>16&255),U(i,i.gzhead.time>>24&255),U(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),U(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(U(i,255&i.gzhead.extra.length),U(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=p(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(U(i,0),U(i,0),U(i,0),U(i,0),U(i,0),U(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),U(i,3),i.status=E);else{var a=v+(i.w_bits-8<<4)<<8;a|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(a|=32),a+=31-a%31,i.status=E,P(i,a),0!==i.strstart&&(P(i,t.adler>>>16),P(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),F(t),n=i.pending,i.pending!==i.pending_buf_size));)U(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),F(t),n=i.pending,i.pending===i.pending_buf_size)){s=1;break}s=i.gzindexn&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),0===s&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),F(t),n=i.pending,i.pending===i.pending_buf_size)){s=1;break}s=i.gzindexn&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),0===s&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&F(t),i.pending+2<=i.pending_buf_size&&(U(i,255&t.adler),U(i,t.adler>>8&255),t.adler=0,i.status=E)):i.status=E),0!==i.pending){if(F(t),0===t.avail_out)return i.last_flush=-1,m}else if(0===t.avail_in&&T(e)<=T(r)&&e!==f)return R(t,-5);if(666===i.status&&0!==t.avail_in)return R(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==l&&666!==i.status){var o=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(j(t),0===t.lookahead)){if(e===l)return A;break}if(t.match_length=0,r=u._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(N(t,!0),0===t.strm.avail_out?O:B):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}(i,e):3===i.strategy?function(t,e){for(var r,i,n,s,a=t.window;;){if(t.lookahead<=S){if(j(t),t.lookahead<=S&&e===l)return A;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=x&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=x?(r=u._tr_tally(t,1,t.match_length-x),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=u._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(N(t,!0),0===t.strm.avail_out?O:B):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}(i,e):h[i.level].func(i,e);if(o!==O&&o!==B||(i.status=666),o===A||o===O)return 0===t.avail_out&&(i.last_flush=-1),m;if(o===I&&(1===e?u._tr_align(i):5!==e&&(u._tr_stored_block(i,0,0,!1),3===e&&(D(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),F(t),0===t.avail_out))return i.last_flush=-1,m}return e!==f?m:i.wrap<=0?1:(2===i.wrap?(U(i,255&t.adler),U(i,t.adler>>8&255),U(i,t.adler>>16&255),U(i,t.adler>>24&255),U(i,255&t.total_in),U(i,t.total_in>>8&255),U(i,t.total_in>>16&255),U(i,t.total_in>>24&255)):(P(i,t.adler>>>16),P(i,65535&t.adler)),F(t),0=r.w_size&&(0===s&&(D(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new d.Buf8(r.w_size),d.arraySet(u,e,l-r.w_size,r.w_size,0),e=u,l=r.w_size),a=t.avail_in,o=t.next_in,h=t.input,t.avail_in=l,t.next_in=0,t.input=e,j(r);r.lookahead>=x;){for(i=r.strstart,n=r.lookahead-(x-1);r.ins_h=(r.ins_h<>>=y=v>>>24,p-=y,0===(y=v>>>16&255))C[s++]=65535&v;else{if(!(16&y)){if(0==(64&y)){v=m[(65535&v)+(c&(1<>>=y,p-=y),p<15&&(c+=z[i++]<>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(c&(1<>>=y,p-=y,(y=s-a)>3,c&=(1<<(p-=w<<3))-1,t.next_in=i,t.next_out=s,t.avail_in=i>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function s(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new I.Buf16(320),this.work=new I.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=P,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new I.Buf32(i),e.distcode=e.distdyn=new I.Buf32(n),e.sane=1,e.back=-1,N):U}function o(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,a(t)):U}function h(t,e){var r,i;return t&&t.state?(i=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=s.wsize?(I.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(i<(n=s.wsize-s.wnext)&&(n=i),I.arraySet(s.window,e,r-i,n,s.wnext),(i-=n)?(I.arraySet(s.window,e,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=B(r.check,E,2,0),l=u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&u)){t.msg="unknown compression method",r.mode=30;break}if(l-=4,k=8+(15&(u>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=3;case 3:for(;l<32;){if(0===o)break t;o--,u+=i[s++]<>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,r.check=B(r.check,E,4,0)),l=u=0,r.mode=4;case 4:for(;l<16;){if(0===o)break t;o--,u+=i[s++]<>8),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=5;case 5:if(1024&r.flags){for(;l<16;){if(0===o)break t;o--,u+=i[s++]<>>8&255,r.check=B(r.check,E,2,0)),l=u=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(o<(c=r.length)&&(c=o),c&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),I.arraySet(r.head.extra,i,s,c,k)),512&r.flags&&(r.check=B(r.check,i,c,s)),o-=c,s+=c,r.length-=c),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===o)break t;for(c=0;k=i[s+c++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k)),k&&c>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;l<32;){if(0===o)break t;o--,u+=i[s++]<>>=7&l,l-=7&l,r.mode=27;break}for(;l<3;){if(0===o)break t;o--,u+=i[s++]<>>=1)){case 0:r.mode=14;break;case 1:if(j(r),r.mode=20,6!==e)break;u>>>=2,l-=2;break t;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}u>>>=2,l-=2;break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===o)break t;o--,u+=i[s++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&u,l=u=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(c=r.length){if(o>>=5,l-=5,r.ndist=1+(31&u),u>>>=5,l-=5,r.ncode=4+(15&u),u>>>=4,l-=4,286>>=3,l-=3}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},x=T(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,x){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<>>=_,l-=_,r.lens[r.have++]=b;else{if(16===b){for(z=_+2;l>>=_,l-=_,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}k=r.lens[r.have-1],c=3+(3&u),u>>>=2,l-=2}else if(17===b){for(z=_+3;l>>=_)),u>>>=3,l-=3}else{for(z=_+7;l>>=_)),u>>>=7,l-=7}if(r.have+c>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;c--;)r.lens[r.have++]=k}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,S={bits:r.lenbits},x=T(D,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,x){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},x=T(F,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,x){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(6<=o&&258<=h){t.next_out=a,t.avail_out=h,t.next_in=s,t.avail_in=o,r.hold=u,r.bits=l,R(t,d),a=t.next_out,n=t.output,h=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,u=r.hold,l=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;g=(C=r.lencode[u&(1<>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,r.length=b,0===g){r.mode=26;break}if(32&g){r.back=-1,r.mode=12;break}if(64&g){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&g,r.mode=22;case 22:if(r.extra){for(z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;g=(C=r.distcode[u&(1<>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,64&g){t.msg="invalid distance code",r.mode=30;break}r.offset=b,r.extra=15&g,r.mode=24;case 24:if(r.extra){for(z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===h)break t;if(c=d-h,r.offset>c){if((c=r.offset-c)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}p=c>r.wnext?(c-=r.wnext,r.wsize-c):r.wnext-c,c>r.length&&(c=r.length),m=r.window}else m=n,p=a-r.offset,c=r.length;for(hc?(m=R[T+a[v]],A[I+a[v]]):(m=96,0),h=1<>S)+(u-=h)]=p<<24|m<<16|_|0,0!==u;);for(h=1<>=1;if(0!==h?(E&=h-1,E+=h):E=0,v++,0==--O[b]){if(b===w)break;b=e[r+a[v]]}if(k>>7)]}function U(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function P(t,e,r){t.bi_valid>c-r?(t.bi_buf|=e<>c-t.bi_valid,t.bi_valid+=r-c):(t.bi_buf|=e<>>=1,r<<=1,0<--e;);return r>>>1}function Z(t,e,r){var i,n,s=new Array(g+1),a=0;for(i=1;i<=g;i++)s[i]=a=a+r[i-1]<<1;for(n=0;n<=e;n++){var o=t[2*n+1];0!==o&&(t[2*n]=j(s[o]++,o))}}function W(t){var e;for(e=0;e>1;1<=r;r--)G(t,s,r);for(n=h;r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],G(t,s,1),i=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=i,s[2*n]=s[2*r]+s[2*i],t.depth[n]=(t.depth[r]>=t.depth[i]?t.depth[r]:t.depth[i])+1,s[2*r+1]=s[2*i+1]=n,t.heap[1]=n++,G(t,s,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,i,n,s,a,o,h=e.dyn_tree,u=e.max_code,l=e.stat_desc.static_tree,f=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,p=e.stat_desc.max_length,m=0;for(s=0;s<=g;s++)t.bl_count[s]=0;for(h[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<_;r++)p<(s=h[2*h[2*(i=t.heap[r])+1]+1]+1)&&(s=p,m++),h[2*i+1]=s,u>=7;i>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return o;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return h;for(e=32;e>>3,(s=t.static_len+3+7>>>3)<=n&&(n=s)):n=s=r+5,r+4<=n&&-1!==e?J(t,e,r,i):4===t.strategy||s===n?(P(t,2+(i?1:0),3),K(t,z,C)):(P(t,4+(i?1:0),3),function(t,e,r,i){var n;for(P(t,e-257,5),P(t,r-1,5),P(t,i-4,4),n=0;n>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(A[r]+u+1)]++,t.dyn_dtree[2*N(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){P(t,2,3),L(t,m,z),function(t){16===t.bi_valid?(U(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,r){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,r){"use strict";e.exports="function"==typeof setImmediate?setImmediate:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)}); + diff --git a/app/src/main/java/at/tomtasche/reader/nonfree/BillingManager.java b/app/src/main/java/at/tomtasche/reader/nonfree/BillingManager.java index 0ef61ce6596f..c83c1ced9629 100644 --- a/app/src/main/java/at/tomtasche/reader/nonfree/BillingManager.java +++ b/app/src/main/java/at/tomtasche/reader/nonfree/BillingManager.java @@ -24,6 +24,7 @@ public class BillingManager implements PurchasesUpdatedListener { + // test SKU: android.test.purchased public static final String BILLING_PRODUCT_FOREVER = "remove_ads_for_eva"; private boolean enabled; @@ -206,10 +207,12 @@ public void close() { @Override public void onPurchasesUpdated(BillingResult billingResult, @Nullable List purchases) { if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK) { - billingPreferences.setPurchased(true); + refreshPurchased(); - adManager.removeAds(); - enabled = false; + if (hasPurchased()) { + adManager.removeAds(); + enabled = false; + } analyticsManager.report("purchase_success"); analyticsManager.report(FirebaseAnalytics.Event.ECOMMERCE_PURCHASE); From f335c8b1cefa25ef7902b59caf03408f9e4ca2e8 Mon Sep 17 00:00:00 2001 From: Thomas Taschauer Date: Tue, 25 Aug 2020 22:50:25 +0200 Subject: [PATCH 19/19] add script to upload symbols --- upload-symbols.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 upload-symbols.sh diff --git a/upload-symbols.sh b/upload-symbols.sh new file mode 100644 index 000000000000..3f896a60c191 --- /dev/null +++ b/upload-symbols.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./gradlew app:uploadCrashlyticsSymbolFileRelease