Skip to content

Commit

Permalink
Removed ACRA
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowVolf committed Jan 11, 2023
1 parent 1c5f723 commit c208847
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 42 deletions.
5 changes: 2 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ android {
applicationId "ru.svolf.pcompiler"
minSdk 21
targetSdk 33
versionCode 25
versionName "2.5.0"
versionCode 26
versionName "2.5.1"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

resConfigs "en", "ar", "bn", "fa", "hi", "in", "it", "pt", "ru", "si", "tr", "vi"
Expand Down Expand Up @@ -65,7 +65,6 @@ dependencies {
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.preference:preference:1.2.0'
testImplementation 'junit:junit:4.13.2'
implementation 'com.faendir:acra:4.10.0'
implementation 'io.reactivex.rxjava2:rxjava:2.2.17'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'com.squareup.okhttp3:okhttp:4.3.1'
Expand Down
Binary file removed app/release/app-release.apk
Binary file not shown.
4 changes: 2 additions & 2 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 25,
"versionName": "2.5.0",
"versionCode": 26,
"versionName": "2.5.1",
"outputFile": "app-release.apk"
}
],
Expand Down
31 changes: 1 addition & 30 deletions app/src/main/java/ru/svolf/pcompiler/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,10 @@
import androidx.annotation.DrawableRes;
import androidx.annotation.StringRes;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.core.app.ActivityCompat;
import androidx.preference.PreferenceManager;

import com.google.android.material.color.DynamicColors;
import com.google.android.material.resources.MaterialResources;

import org.acra.ACRA;
import org.acra.ReportField;
import org.acra.ReportingInteractionMode;
import org.acra.annotation.ReportsCrashes;

import java.lang.reflect.Field;
import java.util.ArrayList;
Expand All @@ -41,31 +34,12 @@
import ru.svolf.girl.reactive.SimpleObservable;
import ru.svolf.pcompiler.util.Constants;
import ru.svolf.pcompiler.util.RuntimeUtil;
import ru.svolf.pcompiler.util.StringWrapper;


/**
* Created by Snow Volf on 17.08.2017, 15:24
*/
@ReportsCrashes(
mailTo = "svolf15@yandex.ru",
mode = ReportingInteractionMode.NOTIFICATION,
resDialogTitle = R.string.error_crashed,
resDialogText = R.string.error_occurred,
resNotifTitle = R.string.app_name,
resDialogIcon = R.mipmap.ic_launcher,
resNotifText = R.string.error_occurred,
resNotifTickerText = R.string.error_crashed,
customReportContent = {
ReportField.APP_VERSION_CODE,
ReportField.APP_VERSION_NAME,
ReportField.ANDROID_VERSION,
ReportField.BRAND,
ReportField.PHONE_MODEL,
ReportField.STACK_TRACE,
ReportField.LOGCAT
}
)

public class App extends Application {
private static App INSTANCE = null;
private SharedPreferences preferences;
Expand Down Expand Up @@ -100,9 +74,6 @@ public void onCreate() {
Log.d(Constants.INSTANCE.getTAG(), String.format("RxJavaPlugins errorHandler %s", throwable));
throwable.printStackTrace();
});
if (StringWrapper.b("8zuv+ap22YnX6ohcFCYktA")) {
ACRA.init(this);
}
PreferenceManager.setDefaultValues(this, R.xml.settings, false);
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
// Support android 12 Monet Engine
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package ru.svolf.pcompiler.ui.activity;

import android.app.AlertDialog;
import android.os.Build;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

import androidx.annotation.Nullable;
import androidx.appcompat.widget.Toolbar;

import org.acra.ACRA;

import ru.svolf.pcompiler.App;
import ru.svolf.pcompiler.R;
import ru.svolf.pcompiler.ui.fragment.settings.SettingsFragment;
Expand Down Expand Up @@ -53,7 +50,7 @@ private void debugMenu() {
try {
throw new RuntimeException("DevException");
} catch (RuntimeException ex){
ACRA.getErrorReporter().handleException(ex);
ex.printStackTrace();
}
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import net.lingala.zip4j.exception.ZipException
import net.lingala.zip4j.model.ZipParameters
import net.lingala.zip4j.model.enums.CompressionLevel
import net.lingala.zip4j.model.enums.CompressionMethod
import org.acra.ACRA
import ru.svolf.girl.ui.CodeText
import ru.svolf.girl.ui.GirlToolbar
import ru.svolf.pcompiler.App
Expand Down Expand Up @@ -350,15 +349,13 @@ class TabbedActivity : BaseActivity(), TabManager.TabListener {
zipFile.addFiles(extra, parameters)
zipFile.addFiles(extraDex, parameters)
} catch (e: Exception) {
ACRA.getErrorReporter().handleException(e)
Toast.makeText(this, e.message, Toast.LENGTH_LONG).show()
}
}
zipFile.comment = archiveComment
Toast.makeText(this, String.format(getString(R.string.message_saved_in_path_zip), zipFile.file.absolutePath), Toast.LENGTH_LONG).show()
} catch (e: ZipException) {
Log.e(TAG, e.message!!)
ACRA.getErrorReporter().handleException(e)
}
}

Expand Down

0 comments on commit c208847

Please sign in to comment.