Remove error reporting

pull/27/head
Fox2Code 3 years ago
parent 3c2595a176
commit 3fde42e83b

@ -1,7 +1,7 @@
plugins { plugins {
id 'com.android.application' id 'com.android.application'
id 'com.mikepenz.aboutlibraries.plugin' id 'com.mikepenz.aboutlibraries.plugin'
id "io.sentry.android.gradle" version "3.1.5" // id "io.sentry.android.gradle" version "3.1.5"
} }
android { android {
@ -79,12 +79,12 @@ aboutLibraries {
additionalLicenses = ["LGPL_3_0_only"] additionalLicenses = ["LGPL_3_0_only"]
} }
sentry { /*sentry {
ignoredBuildTypes = ["debug"] ignoredBuildTypes = ["debug"]
includeProguardMapping = true includeProguardMapping = true
autoUploadProguardMapping = isLocalSentry autoUploadProguardMapping = false // isLocalSentry
tracingInstrumentation { tracingInstrumentation {
enabled = false enabled = false
@ -93,7 +93,7 @@ sentry {
autoInstallation { autoInstallation {
enabled = false enabled = false
} }
} }*/
configurations { configurations {
implementation.exclude group: 'org.jetbrains' , module: 'annotations' implementation.exclude group: 'org.jetbrains' , module: 'annotations'
@ -127,8 +127,8 @@ dependencies {
implementation 'com.github.Fox2Code:AndroidANSI:1.0.1' implementation 'com.github.Fox2Code:AndroidANSI:1.0.1'
// Error reporting // Error reporting
implementation 'io.sentry:sentry-android:6.4.1' /*implementation 'io.sentry:sentry-android:6.4.1'
implementation 'io.sentry:sentry-android-fragment:6.4.1' implementation 'io.sentry:sentry-android-fragment:6.4.1'*/
// Markdown // Markdown
implementation "io.noties.markwon:core:4.6.2" implementation "io.noties.markwon:core:4.6.2"

@ -28,8 +28,6 @@ import com.fox2code.mmm.utils.Http;
import com.fox2code.rosettax.LanguageSwitcher; import com.fox2code.rosettax.LanguageSwitcher;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import java.io.IOException;
import java.io.Writer;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.Locale; import java.util.Locale;
@ -45,12 +43,6 @@ import io.noties.markwon.syntax.Prism4jThemeDefault;
import io.noties.markwon.syntax.SyntaxHighlightPlugin; import io.noties.markwon.syntax.SyntaxHighlightPlugin;
import io.noties.prism4j.Prism4j; import io.noties.prism4j.Prism4j;
import io.noties.prism4j.annotations.PrismBundle; import io.noties.prism4j.annotations.PrismBundle;
import io.sentry.JsonObjectWriter;
import io.sentry.NoOpLogger;
import io.sentry.TypeCheckHint;
import io.sentry.android.core.SentryAndroid;
import io.sentry.android.fragment.FragmentLifecycleIntegration;
import io.sentry.hints.DiskFlushNotification;
@PrismBundle( @PrismBundle(
includeAll = true, includeAll = true,
@ -188,10 +180,10 @@ public class MainApplication extends FoxApplication
getSharedPreferences().edit().putBoolean("has_root_access", bool).apply(); getSharedPreferences().edit().putBoolean("has_root_access", bool).apply();
} }
public static boolean isCrashReportingEnabled() { /*public static boolean isCrashReportingEnabled() {
return getSharedPreferences().getBoolean("pref_crash_reporting", return getSharedPreferences().getBoolean("pref_crash_reporting",
BuildConfig.DEFAULT_ENABLE_CRASH_REPORTING && !BuildConfig.DEBUG); BuildConfig.DEFAULT_ENABLE_CRASH_REPORTING && !BuildConfig.DEBUG);
} }*/
public static SharedPreferences getBootSharedPreferences() { public static SharedPreferences getBootSharedPreferences() {
return bootSharedPreferences; return bootSharedPreferences;
@ -368,7 +360,7 @@ public class MainApplication extends FoxApplication
}, "Emoji compat init.").start(); }, "Emoji compat init.").start();
} }
SentryAndroid.init(this, options -> { /*SentryAndroid.init(this, options -> {
options.addIntegration(new FragmentLifecycleIntegration(this, true, false)); options.addIntegration(new FragmentLifecycleIntegration(this, true, false));
// Note: Sentry library only take a screenshot of Fox Magisk Module Manager. // Note: Sentry library only take a screenshot of Fox Magisk Module Manager.
// The screen shot doesn't and cannot contain other applications (if in multi windows) // The screen shot doesn't and cannot contain other applications (if in multi windows)
@ -434,7 +426,7 @@ public class MainApplication extends FoxApplication
return null; return null;
} }
}); });
}); });*/
} }
@Override @Override

@ -50,10 +50,6 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipFile; import java.util.zip.ZipFile;
import java.util.zip.ZipInputStream; import java.util.zip.ZipInputStream;
import io.sentry.Breadcrumb;
import io.sentry.Sentry;
import io.sentry.SentryLevel;
public class InstallerActivity extends FoxActivity { public class InstallerActivity extends FoxActivity {
private static final String TAG = "InstallerActivity"; private static final String TAG = "InstallerActivity";
public LinearProgressIndicator progressIndicator; public LinearProgressIndicator progressIndicator;
@ -108,7 +104,7 @@ public class InstallerActivity extends FoxActivity {
} }
Log.i(TAG, "Install link: " + target); Log.i(TAG, "Install link: " + target);
// Note: Sentry only send this info on crash. // Note: Sentry only send this info on crash.
if (MainApplication.isCrashReportingEnabled()) { /*if (MainApplication.isCrashReportingEnabled()) {
Breadcrumb breadcrumb = new Breadcrumb(); Breadcrumb breadcrumb = new Breadcrumb();
breadcrumb.setType("install"); breadcrumb.setType("install");
breadcrumb.setData("target", target); breadcrumb.setData("target", target);
@ -117,7 +113,7 @@ public class InstallerActivity extends FoxActivity {
breadcrumb.setCategory("app.action.preinstall"); breadcrumb.setCategory("app.action.preinstall");
breadcrumb.setLevel(SentryLevel.INFO); breadcrumb.setLevel(SentryLevel.INFO);
Sentry.addBreadcrumb(breadcrumb); Sentry.addBreadcrumb(breadcrumb);
} }*/
boolean urlMode = target.startsWith("http://") || target.startsWith("https://"); boolean urlMode = target.startsWith("http://") || target.startsWith("https://");
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
setTitle(name); setTitle(name);
@ -455,7 +451,7 @@ public class InstallerActivity extends FoxActivity {
installCommand).to(installerController, installerMonitor); installCommand).to(installerController, installerMonitor);
} }
// Note: Sentry only send this info on crash. // Note: Sentry only send this info on crash.
if (MainApplication.isCrashReportingEnabled()) { /*if (MainApplication.isCrashReportingEnabled()) {
Breadcrumb breadcrumb = new Breadcrumb(); Breadcrumb breadcrumb = new Breadcrumb();
breadcrumb.setType("install"); breadcrumb.setType("install");
breadcrumb.setData("moduleId", moduleId == null ? "<null>" : moduleId); breadcrumb.setData("moduleId", moduleId == null ? "<null>" : moduleId);
@ -468,7 +464,7 @@ public class InstallerActivity extends FoxActivity {
breadcrumb.setCategory("app.action.install"); breadcrumb.setCategory("app.action.install");
breadcrumb.setLevel(SentryLevel.INFO); breadcrumb.setLevel(SentryLevel.INFO);
Sentry.addBreadcrumb(breadcrumb); Sentry.addBreadcrumb(breadcrumb);
} }*/
if (mmtReborn && magiskCmdLine) { if (mmtReborn && magiskCmdLine) {
Log.w(TAG, "mmtReborn and magiskCmdLine may not work well together"); Log.w(TAG, "mmtReborn and magiskCmdLine may not work well together");
} }

@ -132,13 +132,13 @@ public class SettingsActivity extends FoxActivity implements LanguageActivity {
return true; return true;
}); });
// Crash reporting // Crash reporting
TwoStatePreference crashReportingPreference = findPreference("pref_crash_reporting"); /*TwoStatePreference crashReportingPreference = findPreference("pref_crash_reporting");
crashReportingPreference.setChecked(MainApplication.isCrashReportingEnabled()); crashReportingPreference.setChecked(MainApplication.isCrashReportingEnabled());
crashReportingPreference.setOnPreferenceChangeListener((preference, newValue) -> { crashReportingPreference.setOnPreferenceChangeListener((preference, newValue) -> {
devModeStepFirstBootIgnore = true; devModeStepFirstBootIgnore = true;
devModeStep = 0; devModeStep = 0;
return true; return true;
}); });*/
Preference enableBlur = findPreference("pref_enable_blur"); Preference enableBlur = findPreference("pref_enable_blur");
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
enableBlur.setSummary(R.string.require_android_6); enableBlur.setSummary(R.string.require_android_6);

@ -116,13 +116,13 @@
app:summary="@string/prevent_reboot_desc" app:summary="@string/prevent_reboot_desc"
app:title="@string/prevent_reboot_pref" /> app:title="@string/prevent_reboot_pref" />
<!-- Crash reporting --> <!-- Crash reporting -->
<SwitchPreferenceCompat <!--<SwitchPreferenceCompat
app:defaultValue="true" app:defaultValue="true"
app:icon="@drawable/ic_baseline_bug_report_24" app:icon="@drawable/ic_baseline_bug_report_24"
app:key="pref_crash_reporting" app:key="pref_crash_reporting"
app:singleLineTitle="false" app:singleLineTitle="false"
app:summary="@string/crash_reporting_desc" app:summary="@string/crash_reporting_desc"
app:title="@string/crash_reporting" /> app:title="@string/crash_reporting" />-->
<!-- Purposely crash the app --> <!-- Purposely crash the app -->
<Preference <Preference
app:icon="@drawable/ic_baseline_bug_report_24" app:icon="@drawable/ic_baseline_bug_report_24"

Loading…
Cancel
Save