(fix) fix crashes

Signed-off-by: androidacy-user <opensource@androidacy.com>
pull/27/head v2.1.0
androidacy-user 2 years ago
parent 18217e03d3
commit aa34e36559

@ -467,7 +467,7 @@ dependencies {
implementation("androidx.security:security-crypto:1.1.0-alpha06") implementation("androidx.security:security-crypto:1.1.0-alpha06")
// some utils // 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") implementation("org.apache.commons:commons-compress:1.23.0")
// analytics // analytics

@ -192,6 +192,7 @@
-keepclassmembers class kotlin.SafePublicationLazyImpl { -keepclassmembers class kotlin.SafePublicationLazyImpl {
java.lang.Object _value; java.lang.Object _value;
} }
-keepclassmembers class org.apache.commons.compress.archivers.zip.* { *; }
# fix bug with androidx work and future # fix bug with androidx work and future
# -keep class androidx.work.impl.utils.futures.* { *; } # -keep class androidx.work.impl.utils.futures.* { *; }

@ -106,7 +106,9 @@ public class CrashHandler extends FoxActivity {
}); });
// get restart button // get restart button
findViewById(R.id.restart).setOnClickListener(v -> { 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(); finish();
startActivity(getPackageManager().getLaunchIntentForPackage(getPackageName())); startActivity(getPackageManager().getLaunchIntentForPackage(getPackageName()));
}); });

@ -738,7 +738,7 @@ public class MainActivity extends FoxActivity implements SwipeRefreshLayout.OnRe
} }
// if it's still null, but it's enabled, throw an error // if it's still null, but it's enabled, throw an error
if (AndroidacyRepoData.getInstance().isEnabled() && AndroidacyRepoData.getInstance().memberLevel == null) { 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")) { if (AndroidacyRepoData.getInstance() != null && AndroidacyRepoData.getInstance().isEnabled() && Objects.equals(AndroidacyRepoData.getInstance().memberLevel, "Guest")) {
runtimeUtils.showUpgradeSnackbar(this, this); runtimeUtils.showUpgradeSnackbar(this, this);

@ -17,8 +17,8 @@ gradleEnterprise {
dependencyResolutionManagement { dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories { repositories {
google()
mavenCentral() mavenCentral()
google()
// enable jitpack // enable jitpack
maven { setUrl("https://jitpack.io") } maven { setUrl("https://jitpack.io") }
} }

Loading…
Cancel
Save