mirror of
https://github.com/sudoxnym/fdroiddata.git
synced 2026-05-19 04:09:14 +00:00
fix standard notes patching
This commit is contained in:
parent
894ba5580b
commit
7de2342e31
2 changed files with 159 additions and 24 deletions
|
|
@ -1654,7 +1654,6 @@ Builds:
|
|||
|
||||
- versionName: 3.6.24
|
||||
versionCode: 3000304
|
||||
disable: patch doesn't apply
|
||||
commit: 3.6.24
|
||||
subdir: android/app/
|
||||
sudo:
|
||||
|
|
@ -1670,7 +1669,7 @@ Builds:
|
|||
- yarn cache clean snjs
|
||||
- npm_config_build_from_source=true yarn --force
|
||||
patch:
|
||||
- bugsnag-3.6.11.patch
|
||||
- bugsnag-3.6.24.patch
|
||||
gradle:
|
||||
- prod
|
||||
srclibs:
|
||||
|
|
@ -1702,28 +1701,10 @@ Builds:
|
|||
- target_sdk_version=`sed -n -E 's/.*targetSdkVersion = ([0-9]{1,2}).*/\1/p'
|
||||
../build.gradle`
|
||||
- pushd $$libsodium$$
|
||||
- CC="$$NDK$$/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi${target_sdk_version}-clang"
|
||||
CFLAGS="-Os -fPIC -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -marm -march=armv7-a"
|
||||
./configure --prefix=${lib}/libsodium-android-armv7-a/ --host=arm-linux-androideabi
|
||||
- make -j${nproc}
|
||||
- make install
|
||||
- make distclean
|
||||
- CC="$$NDK$$/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android${target_sdk_version}-clang"
|
||||
CFLAGS="-fPIC -O2" ./configure --prefix=${lib}/libsodium-android-armv8-a/
|
||||
--host=aarch64-linux-android
|
||||
- make -j${nproc}
|
||||
- make install
|
||||
- make distclean
|
||||
- CC="$$NDK$$/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android${target_sdk_version}-clang"
|
||||
CFLAGS="-fPIC -O2" ./configure --prefix=${lib}/libsodium-android-i686/ --host=i686-linux-android
|
||||
- make -j${nproc}
|
||||
- make install
|
||||
- make distclean
|
||||
- CC="$$NDK$$/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android${target_sdk_version}-clang"
|
||||
CFLAGS="-fPIC -O2" ./configure --prefix=${lib}/libsodium-android-westmere/
|
||||
--host=x86_64-linux-android
|
||||
- make -j${nproc}
|
||||
- make install
|
||||
- ./dist-build/android-armv7-a.sh
|
||||
- ./dist-build/android-armv8-a.sh
|
||||
- ./dist-build/android-x86.sh
|
||||
- ./dist-build/android-x86_64.sh
|
||||
- popd
|
||||
ndk: r21e
|
||||
|
||||
|
|
|
|||
154
metadata/com.standardnotes/bugsnag-3.6.24.patch
Normal file
154
metadata/com.standardnotes/bugsnag-3.6.24.patch
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
diff --git a/android/app/build.gradle b/android/app/build.gradle
|
||||
index 49f4765..12c93c6 100644
|
||||
--- a/android/app/build.gradle
|
||||
+++ b/android/app/build.gradle
|
||||
@@ -254,4 +254,3 @@ task copyDownloadableDepsToLibs(type: Copy) {
|
||||
}
|
||||
|
||||
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"
|
||||
diff --git a/android/app/src/main/java/com/standardnotes/MainApplication.java b/android/app/src/main/java/com/standardnotes/MainApplication.java
|
||||
index 69c4085..d76ecba 100644
|
||||
--- a/android/app/src/main/java/com/standardnotes/MainApplication.java
|
||||
+++ b/android/app/src/main/java/com/standardnotes/MainApplication.java
|
||||
@@ -5,8 +5,6 @@ import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.webkit.WebView;
|
||||
|
||||
-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;
|
||||
@@ -19,7 +17,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;
|
||||
@@ -74,24 +71,6 @@ 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", "true");
|
||||
-
|
||||
- if (!bugsnagOptOut.equals("true")) {
|
||||
- Bugsnag.start(this, config);
|
||||
- }
|
||||
-
|
||||
SoLoader.init(this, /* native exopackage */ false);
|
||||
|
||||
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
||||
diff --git a/index.js b/index.js
|
||||
index bc0dece..0909408 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';
|
||||
|
||||
@@ -10,16 +9,8 @@ import { enableAndroidFontFix } from './src/style/android_text_fix';
|
||||
|
||||
enableScreens();
|
||||
|
||||
-if (__DEV__ === false) {
|
||||
- console.log = () => {};
|
||||
- console.warn = () => {};
|
||||
- console.error = () => {};
|
||||
- SNLog.onError = Bugsnag.notify;
|
||||
- SNLog.onLog = Bugsnag.leaveBreadcrumb;
|
||||
-} else {
|
||||
- SNLog.onLog = console.log;
|
||||
- SNLog.onError = console.error;
|
||||
-}
|
||||
+SNLog.onLog = console.log;
|
||||
+SNLog.onError = console.error;
|
||||
|
||||
enableAndroidFontFix();
|
||||
|
||||
diff --git a/package.json b/package.json
|
||||
index f5a9442..d110070 100644
|
||||
--- a/package.json
|
||||
+++ b/package.json
|
||||
@@ -18,7 +18,6 @@
|
||||
"test": "jest"
|
||||
},
|
||||
"dependencies": {
|
||||
- "@bugsnag/react-native": "^7.5.6",
|
||||
"@expo/react-native-action-sheet": "^3.8.0",
|
||||
"@react-native-community/async-storage": "1.12.1",
|
||||
"@react-native-community/masked-view": "^0.1.10",
|
||||
@@ -73,7 +72,6 @@
|
||||
"@typescript-eslint/eslint-plugin": "^4.11.1",
|
||||
"@typescript-eslint/parser": "^4.11.1",
|
||||
"babel-jest": "^26.6.3",
|
||||
- "bugsnag-sourcemaps": "^1.3.0",
|
||||
"concurrently": "^5.3.0",
|
||||
"detox": "^17.8.3",
|
||||
"eslint": "^7.10.0",
|
||||
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 7d20717..44f5950 100644
|
||||
--- a/src/lib/interface.ts
|
||||
+++ b/src/lib/interface.ts
|
||||
@@ -288,18 +288,7 @@ export class MobileDeviceInterface extends DeviceInterface {
|
||||
}
|
||||
|
||||
async getBugsnagOptedOut() {
|
||||
- try {
|
||||
- /**
|
||||
- * Checking the absense of the 'bugsnagoptout' preference.
|
||||
- * If the value is absent, then error reporting is opt-in by default.
|
||||
- */
|
||||
- const bugsnagOptedOut =
|
||||
- (await DefaultPreference.get(BUGSNAG_OPT_OUT_KEY)) ?? 'true';
|
||||
-
|
||||
- return bugsnagOptedOut === 'true';
|
||||
- } catch {
|
||||
- return true;
|
||||
- }
|
||||
+ return true;
|
||||
}
|
||||
|
||||
setBusgnagOptedOut(optedOut: true | false) {
|
||||
Loading…
Reference in a new issue