diff --git a/app/build.gradle b/app/build.gradle index 53bede2..3acdbe0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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" diff --git a/app/src/main/java/com/fox2code/mmm/MainApplication.java b/app/src/main/java/com/fox2code/mmm/MainApplication.java index fcb7d84..2a9ede0 100644 --- a/app/src/main/java/com/fox2code/mmm/MainApplication.java +++ b/app/src/main/java/com/fox2code/mmm/MainApplication.java @@ -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 diff --git a/app/src/main/java/com/fox2code/mmm/installer/InstallerActivity.java b/app/src/main/java/com/fox2code/mmm/installer/InstallerActivity.java index 33ea0a3..658d594 100644 --- a/app/src/main/java/com/fox2code/mmm/installer/InstallerActivity.java +++ b/app/src/main/java/com/fox2code/mmm/installer/InstallerActivity.java @@ -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 ? "" : 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"); } diff --git a/app/src/main/java/com/fox2code/mmm/settings/SettingsActivity.java b/app/src/main/java/com/fox2code/mmm/settings/SettingsActivity.java index 2f4d359..804b06b 100644 --- a/app/src/main/java/com/fox2code/mmm/settings/SettingsActivity.java +++ b/app/src/main/java/com/fox2code/mmm/settings/SettingsActivity.java @@ -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); diff --git a/app/src/main/res/xml/root_preferences.xml b/app/src/main/res/xml/root_preferences.xml index 3678524..8e05b29 100644 --- a/app/src/main/res/xml/root_preferences.xml +++ b/app/src/main/res/xml/root_preferences.xml @@ -116,13 +116,13 @@ app:summary="@string/prevent_reboot_desc" app:title="@string/prevent_reboot_pref" /> - + app:title="@string/crash_reporting" />-->