Skip to content

Commit

Permalink
Merge pull request #169 from TomTasche/development
Browse files Browse the repository at this point in the history
3.2.7
  • Loading branch information
TomTasche authored Mar 22, 2020
2 parents de7eab0 + 6653c95 commit 83bf11d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion OpenDocument.core
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
xmlns:tools="http://schemas.android.com/tools"
package="at.tomtasche.reader"
android:installLocation="auto"
android:versionCode="123"
android:versionName="3.2.5"
android:versionCode="125"
android:versionName="3.2.7"
tools:ignore="GoogleAppIndexingWarning">

<!-- added by HelpCrunch SDK otherwise -->
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/cpp/CoreWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Java_at_tomtasche_reader_background_CoreWrapper_parseNative(JNIEnv *env, jobject
return result;
}

const auto meta = translator->getMeta();
auto meta = translator->getMeta();

jfieldID passwordField = env->GetFieldID(optionsClass, "password", "Ljava/lang/String;");
jstring password = (jstring) env->GetObjectField(options, passwordField);
Expand All @@ -56,6 +56,8 @@ Java_at_tomtasche_reader_background_CoreWrapper_parseNative(JNIEnv *env, jobject
env->ReleaseStringUTFChars(password, passwordC);

decrypted = translator->decrypt(passwordCpp);

meta = translator->getMeta();
}

if (!decrypted) {
Expand All @@ -82,7 +84,7 @@ Java_at_tomtasche_reader_background_CoreWrapper_parseNative(JNIEnv *env, jobject
jmethodID addMethod = env->GetMethodID(listClass, "add", "(Ljava/lang/Object;)Z");

jfieldID pageNamesField = env->GetFieldID(resultClass, "pageNames", "Ljava/util/List;");
jstring pageNames = (jstring) env->GetObjectField(result, pageNamesField);
jobject pageNames = (jobject) env->GetObjectField(result, pageNamesField);

jfieldID ooxmlField = env->GetFieldID(optionsClass, "ooxml", "Z");
jboolean ooxml = env->GetBooleanField(options, ooxmlField);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ protected void onStart() {

// app was started from another app, but make sure not to load it twice
// (i.e. after bringing app back from background)
if (documentFragment != null) {
if (getSupportFragmentManager().findFragmentByTag(DOCUMENT_FRAGMENT_TAG) == null) {
analyticsManager.setCurrentScreen(this, "screen_main");

handleIntent(getIntent());
Expand All @@ -227,7 +227,7 @@ public void onConfigurationChanged(@NonNull Configuration newConfig) {
protected void onResume() {
super.onResume();

if (documentFragment != null) {
if (getSupportFragmentManager().findFragmentByTag(DOCUMENT_FRAGMENT_TAG) == null) {
// setCurrentScreen not ready to call before that
analyticsManager.setCurrentScreen(this, "screen_main");
}
Expand Down

0 comments on commit 83bf11d

Please sign in to comment.