Skip to content

Commit aa34e36

Browse files
(fix) fix crashes
Signed-off-by: androidacy-user <opensource@androidacy.com>
1 parent 18217e0 commit aa34e36

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

app/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ dependencies {
467467
implementation("androidx.security:security-crypto:1.1.0-alpha06")
468468

469469
// some utils
470-
implementation("commons-io:commons-io:20030203.000550")
470+
implementation("commons-io:commons-io:2.11.0")
471471
implementation("org.apache.commons:commons-compress:1.23.0")
472472

473473
// analytics

app/proguard-rules.pro

+1
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@
192192
-keepclassmembers class kotlin.SafePublicationLazyImpl {
193193
java.lang.Object _value;
194194
}
195+
-keepclassmembers class org.apache.commons.compress.archivers.zip.* { *; }
195196

196197
# fix bug with androidx work and future
197198
# -keep class androidx.work.impl.utils.futures.* { *; }

app/src/main/java/com/fox2code/mmm/CrashHandler.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ protected void onCreate(Bundle savedInstanceState) {
106106
});
107107
// get restart button
108108
findViewById(R.id.restart).setOnClickListener(v -> {
109-
// Restart the app
109+
// Restart the app and submit sans feedback
110+
Throwable sentryException = (Throwable) getIntent().getSerializableExtra("sentryException");
111+
if (crashReportingEnabled) Sentry.captureException(sentryException);
110112
finish();
111113
startActivity(getPackageManager().getLaunchIntentForPackage(getPackageName()));
112114
});
@@ -169,4 +171,4 @@ public void copyCrashDetails(View view) {
169171
runOnUiThread(() -> view.setBackgroundResource(R.drawable.baseline_copy_all_24));
170172
}).start();
171173
}
172-
}
174+
}

app/src/main/java/com/fox2code/mmm/MainActivity.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ public void maybeShowUpgrade() {
738738
}
739739
// if it's still null, but it's enabled, throw an error
740740
if (AndroidacyRepoData.getInstance().isEnabled() && AndroidacyRepoData.getInstance().memberLevel == null) {
741-
throw new IllegalStateException("AndroidacyRepoData is enabled, but member level is null");
741+
Timber.e("AndroidacyRepoData is enabled, but member level is null");
742742
}
743743
if (AndroidacyRepoData.getInstance() != null && AndroidacyRepoData.getInstance().isEnabled() && Objects.equals(AndroidacyRepoData.getInstance().memberLevel, "Guest")) {
744744
runtimeUtils.showUpgradeSnackbar(this, this);
@@ -763,4 +763,4 @@ public void maybeShowUpgrade() {
763763
}
764764
}
765765
}
766-
}
766+
}

settings.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ gradleEnterprise {
1717
dependencyResolutionManagement {
1818
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
1919
repositories {
20-
google()
2120
mavenCentral()
21+
google()
2222
// enable jitpack
2323
maven { setUrl("https://jitpack.io") }
2424
}

0 commit comments

Comments
 (0)