mirror of
https://github.com/sudoxnym/fdroiddata.git
synced 2026-04-14 19:46:54 +00:00
132 lines
5.2 KiB
Diff
132 lines
5.2 KiB
Diff
diff --git a/android/app/build.gradle b/android/app/build.gradle
|
|
index 8310498..17fe350 100644
|
|
--- a/android/app/build.gradle
|
|
+++ b/android/app/build.gradle
|
|
@@ -252,5 +252,4 @@ task copyDownloadableDepsToLibs(type: Copy) {
|
|
into 'libs'
|
|
}
|
|
|
|
-apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
|
-apply from: "../../node_modules/@bugsnag/react-native/bugsnag-react-native.gradle"
|
|
\ No newline at end of file
|
|
+apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
|
\ No newline at end of file
|
|
diff --git a/android/app/src/main/java/com/standardnotes/MainActivity.java b/android/app/src/main/java/com/standardnotes/MainActivity.java
|
|
index 79c701c..67fe038 100644
|
|
--- a/android/app/src/main/java/com/standardnotes/MainActivity.java
|
|
+++ b/android/app/src/main/java/com/standardnotes/MainActivity.java
|
|
@@ -28,8 +28,7 @@ public class MainActivity extends ReactActivity {
|
|
String packageName = this.getContext().getPackageName();
|
|
Bundle props = new Bundle();
|
|
SharedPreferences settings = this.getContext().getSharedPreferences("react-native", Context.MODE_PRIVATE);
|
|
- String bugsnagOptOut = settings.getString("bugsnagoptout", "false");
|
|
- props.putBoolean("bugsnagOptOut", bugsnagOptOut.equals("true"));
|
|
+ props.putBoolean("bugsnagOptOut", true);
|
|
if (packageName.equals("com.standardnotes.dev")) {
|
|
props.putString("env", "dev");
|
|
} else {
|
|
diff --git a/android/app/src/main/java/com/standardnotes/MainApplication.java b/android/app/src/main/java/com/standardnotes/MainApplication.java
|
|
index fe96c13..f06b13e 100644
|
|
--- a/android/app/src/main/java/com/standardnotes/MainApplication.java
|
|
+++ b/android/app/src/main/java/com/standardnotes/MainApplication.java
|
|
@@ -4,8 +4,6 @@ import android.app.Application;
|
|
import android.app.Activity;
|
|
import android.content.Context;
|
|
|
|
-import com.bugsnag.android.BreadcrumbType;
|
|
-import com.bugsnag.android.Configuration;
|
|
import com.facebook.react.PackageList;
|
|
import com.facebook.react.ReactApplication;
|
|
import com.facebook.react.ReactInstanceManager;
|
|
@@ -18,7 +16,6 @@ import java.lang.reflect.InvocationTargetException;
|
|
import java.util.HashSet;
|
|
import java.util.List;
|
|
|
|
-import com.bugsnag.android.Bugsnag;
|
|
import com.facebook.react.modules.network.OkHttpClientProvider;
|
|
|
|
import android.annotation.SuppressLint;
|
|
@@ -67,23 +64,7 @@ public class MainApplication extends Application implements ReactApplication {
|
|
|
|
rebuildOkHtttp();
|
|
|
|
- Configuration config = Configuration.load(this);
|
|
- config.setEnabledBreadcrumbTypes(new HashSet<BreadcrumbType>() {{
|
|
- add(BreadcrumbType.NAVIGATION);
|
|
- add(BreadcrumbType.STATE);
|
|
- add(BreadcrumbType.PROCESS);
|
|
- add(BreadcrumbType.MANUAL);
|
|
- add(BreadcrumbType.USER);
|
|
- add(BreadcrumbType.LOG);
|
|
- add(BreadcrumbType.ERROR);
|
|
- }});
|
|
-
|
|
SharedPreferences settings = getApplicationContext().getSharedPreferences("react-native", Context.MODE_PRIVATE);
|
|
- String bugsnagOptOut = settings.getString("bugsnagoptout", "false");
|
|
-
|
|
- if (!bugsnagOptOut.equals("true")) {
|
|
- Bugsnag.start(this, config);
|
|
- }
|
|
|
|
SoLoader.init(this, /* native exopackage */ false);
|
|
|
|
diff --git a/index.js b/index.js
|
|
index bc0dece..73806b5 100644
|
|
--- a/index.js
|
|
+++ b/index.js
|
|
@@ -1,5 +1,4 @@
|
|
import 'react-native-gesture-handler';
|
|
-import Bugsnag from '@bugsnag/react-native';
|
|
import { enableScreens } from 'react-native-screens';
|
|
import { SNLog } from '@standardnotes/snjs';
|
|
|
|
@@ -14,8 +13,8 @@ if (__DEV__ === false) {
|
|
console.log = () => {};
|
|
console.warn = () => {};
|
|
console.error = () => {};
|
|
- SNLog.onError = Bugsnag.notify;
|
|
- SNLog.onLog = Bugsnag.leaveBreadcrumb;
|
|
+ SNLog.onLog = console.log;
|
|
+ SNLog.onError = console.error;
|
|
} else {
|
|
SNLog.onLog = console.log;
|
|
SNLog.onError = console.error;
|
|
diff --git a/src/App.tsx b/src/App.tsx
|
|
index 8a7492f..f4ae6e4 100644
|
|
--- a/src/App.tsx
|
|
+++ b/src/App.tsx
|
|
@@ -1,4 +1,3 @@
|
|
-import Bugsnag from '@bugsnag/react-native';
|
|
import { ActionSheetProvider } from '@expo/react-native-action-sheet';
|
|
import { MobileApplication } from '@Lib/application';
|
|
import { ApplicationGroup } from '@Lib/application_group';
|
|
@@ -132,16 +131,6 @@ export const App = (props: { env: 'prod' | 'dev'; bugsnagOptOut: boolean }) => {
|
|
MobileApplication | undefined
|
|
>();
|
|
|
|
- useEffect(() => {
|
|
- if (!__DEV__ && !props.bugsnagOptOut) {
|
|
- try {
|
|
- Bugsnag.start();
|
|
- } catch {
|
|
- console.error('Bugnsag failed to start');
|
|
- }
|
|
- }
|
|
- }, [props.bugsnagOptOut]);
|
|
-
|
|
useEffect(() => {
|
|
const removeAppChangeObserver = applicationGroupRef.current.addApplicationChangeObserver(
|
|
() => {
|
|
diff --git a/src/lib/interface.ts b/src/lib/interface.ts
|
|
index bd37717..55d0637 100644
|
|
--- a/src/lib/interface.ts
|
|
+++ b/src/lib/interface.ts
|
|
@@ -289,7 +289,7 @@ export class MobileDeviceInterface extends DeviceInterface {
|
|
|
|
async getBugsnagOptedOut() {
|
|
try {
|
|
- return (await DefaultPreference.get(BUGSNAG_OPT_OUT_KEY)) === 'true';
|
|
+ return true;
|
|
} catch {
|
|
return false;
|
|
}
|