Remove error reporting

pull/202/head
Fox2Code 2 years ago
parent 3c2595a176
commit 3fde42e83b

@ -1,7 +1,7 @@
plugins {
id 'com.android.application'
id 'com.mikepenz.aboutlibraries.plugin'
id "io.sentry.android.gradle" version "3.1.5"
// id "io.sentry.android.gradle" version "3.1.5"
}
android {
@ -79,12 +79,12 @@ aboutLibraries {
additionalLicenses = ["LGPL_3_0_only"]
}
sentry {
/*sentry {
ignoredBuildTypes = ["debug"]
includeProguardMapping = true
autoUploadProguardMapping = isLocalSentry
autoUploadProguardMapping = false // isLocalSentry
tracingInstrumentation {
enabled = false
@ -93,7 +93,7 @@ sentry {
autoInstallation {
enabled = false
}
}
}*/
configurations {
implementation.exclude group: 'org.jetbrains' , module: 'annotations'
@ -127,8 +127,8 @@ dependencies {
implementation 'com.github.Fox2Code:AndroidANSI:1.0.1'
// Error reporting
implementation 'io.sentry:sentry-android:6.4.1'
implementation 'io.sentry:sentry-android-fragment:6.4.1'
/*implementation 'io.sentry:sentry-android:6.4.1'
implementation 'io.sentry:sentry-android-fragment:6.4.1'*/
// Markdown
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.topjohnwu.superuser.Shell;
import java.io.IOException;
import java.io.Writer;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
@ -45,12 +43,6 @@ import io.noties.markwon.syntax.Prism4jThemeDefault;
import io.noties.markwon.syntax.SyntaxHighlightPlugin;
import io.noties.prism4j.Prism4j;
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(
includeAll = true,
@ -188,10 +180,10 @@ public class MainApplication extends FoxApplication
getSharedPreferences().edit().putBoolean("has_root_access", bool).apply();
}
public static boolean isCrashReportingEnabled() {
/*public static boolean isCrashReportingEnabled() {
return getSharedPreferences().getBoolean("pref_crash_reporting",
BuildConfig.DEFAULT_ENABLE_CRASH_REPORTING && !BuildConfig.DEBUG);
}
}*/
public static SharedPreferences getBootSharedPreferences() {
return bootSharedPreferences;
@ -368,7 +360,7 @@ public class MainApplication extends FoxApplication
}, "Emoji compat init.").start();
}
SentryAndroid.init(this, options -> {
/*SentryAndroid.init(this, options -> {
options.addIntegration(new FragmentLifecycleIntegration(this, true, false));
// 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)
@ -434,7 +426,7 @@ public class MainApplication extends FoxApplication
return null;
}
});
});
});*/
}
@Override

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

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

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

Loading…
Cancel
Save