bump: facebook.fresco version 3.1.3 -> 3.6.0(latest)
This commit is contained in:
@@ -176,9 +176,6 @@ android {
|
||||
pickFirst "lib/x86_64/libuniffi_zeus_cashu_restore.so"
|
||||
|
||||
jniLibs {
|
||||
// when useLegacyPackaging is false (default). Setting it to true would require
|
||||
// compressed libraries which is not recommended for 16KB devices.
|
||||
// Per official Android docs: https://developer.android.com/guide/practices/page-sizes
|
||||
useLegacyPackaging false
|
||||
}
|
||||
}
|
||||
@@ -221,7 +218,7 @@ dependencies {
|
||||
implementation files("../../node_modules/react-native-tor/android/libs/sifir_android.aar")
|
||||
// gif
|
||||
implementation 'com.facebook.fresco:animated-gif:3.6.0'
|
||||
implementation 'com.facebook.fresco:fresco:3.1.3'
|
||||
implementation 'com.facebook.fresco:fresco:3.6.0'
|
||||
|
||||
// Pegasus
|
||||
// implementation(name:"Lndmobile", ext:"aar")
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
// Prevent crash when VisionCamera native library cannot be loaded on the device/ABI.
|
||||
// This repo targets 16KB page-size compliance; some prebuilt native libs may not load on
|
||||
// certain emulator/device setups.
|
||||
|
||||
import fs from 'fs';
|
||||
|
||||
export function patchVisionCamera() {
|
||||
const cameraPackagePath =
|
||||
'./node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/react/CameraPackage.kt';
|
||||
|
||||
if (!fs.existsSync(cameraPackagePath)) {
|
||||
console.log('Patching react-native-vision-camera');
|
||||
console.log(' - Skipping: CameraPackage.kt not found');
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('Patching react-native-vision-camera');
|
||||
|
||||
let content = fs.readFileSync(cameraPackagePath, 'utf8');
|
||||
|
||||
// Guard native module creation so an UnsatisfiedLinkError in VisionCamera's static init
|
||||
// doesn't crash the whole app at startup.
|
||||
if (!content.includes('catch (e: UnsatisfiedLinkError)')) {
|
||||
content = content.replace(
|
||||
/override fun createNativeModules\(reactContext: ReactApplicationContext\): List<NativeModule> =\n\s*listOf\(\n\s*CameraViewModule\(reactContext\),\n\s*CameraDevicesManager\(reactContext\)\n\s*\)/m,
|
||||
`override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> =
|
||||
try {
|
||||
listOf(
|
||||
CameraViewModule(reactContext),
|
||||
CameraDevicesManager(reactContext)
|
||||
)
|
||||
} catch (e: UnsatisfiedLinkError) {
|
||||
// VisionCamera native lib failed to load. Disable camera modules instead of crashing.
|
||||
emptyList()
|
||||
}`
|
||||
);
|
||||
}
|
||||
|
||||
fs.writeFileSync(cameraPackagePath, content);
|
||||
console.log(' - Guarded CameraPackage.kt createNativeModules()');
|
||||
}
|
||||
Reference in New Issue
Block a user