Skip to content

Commit

Permalink
(fix) fix crashes
Browse files Browse the repository at this point in the history
Signed-off-by: androidacy-user <[email protected]>
  • Loading branch information
androidacy-user committed May 10, 2023
1 parent 18217e0 commit aa34e36
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ dependencies {
implementation("androidx.security:security-crypto:1.1.0-alpha06")

// some utils
implementation("commons-io:commons-io:20030203.000550")
implementation("commons-io:commons-io:2.11.0")
implementation("org.apache.commons:commons-compress:1.23.0")

// analytics
Expand Down
1 change: 1 addition & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
-keepclassmembers class kotlin.SafePublicationLazyImpl {
java.lang.Object _value;
}
-keepclassmembers class org.apache.commons.compress.archivers.zip.* { *; }

# fix bug with androidx work and future
# -keep class androidx.work.impl.utils.futures.* { *; }
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/java/com/fox2code/mmm/CrashHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ protected void onCreate(Bundle savedInstanceState) {
});
// get restart button
findViewById(R.id.restart).setOnClickListener(v -> {
// Restart the app
// Restart the app and submit sans feedback
Throwable sentryException = (Throwable) getIntent().getSerializableExtra("sentryException");
if (crashReportingEnabled) Sentry.captureException(sentryException);
finish();
startActivity(getPackageManager().getLaunchIntentForPackage(getPackageName()));
});
Expand Down Expand Up @@ -169,4 +171,4 @@ public void copyCrashDetails(View view) {
runOnUiThread(() -> view.setBackgroundResource(R.drawable.baseline_copy_all_24));
}).start();
}
}
}
4 changes: 2 additions & 2 deletions app/src/main/java/com/fox2code/mmm/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ public void maybeShowUpgrade() {
}
// if it's still null, but it's enabled, throw an error
if (AndroidacyRepoData.getInstance().isEnabled() && AndroidacyRepoData.getInstance().memberLevel == null) {
throw new IllegalStateException("AndroidacyRepoData is enabled, but member level is null");
Timber.e("AndroidacyRepoData is enabled, but member level is null");
}
if (AndroidacyRepoData.getInstance() != null && AndroidacyRepoData.getInstance().isEnabled() && Objects.equals(AndroidacyRepoData.getInstance().memberLevel, "Guest")) {
runtimeUtils.showUpgradeSnackbar(this, this);
Expand All @@ -763,4 +763,4 @@ public void maybeShowUpgrade() {
}
}
}
}
}
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ gradleEnterprise {
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
google()
// enable jitpack
maven { setUrl("https://jitpack.io") }
}
Expand Down

0 comments on commit aa34e36

Please sign in to comment.