From aaa8dd10c4ad0a70b1bef1a4d04263e0269f3963 Mon Sep 17 00:00:00 2001 From: Bryce McMath Date: Wed, 13 Nov 2024 15:36:05 -0800 Subject: [PATCH] fix: prevent react-native-screens from causing crashes on android Signed-off-by: Bryce McMath --- .../src/main/java/ca/bc/gov/BCWallet/MainActivity.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/android/app/src/main/java/ca/bc/gov/BCWallet/MainActivity.java b/app/android/app/src/main/java/ca/bc/gov/BCWallet/MainActivity.java index 2ced4ce82..1c5b0ff5b 100644 --- a/app/android/app/src/main/java/ca/bc/gov/BCWallet/MainActivity.java +++ b/app/android/app/src/main/java/ca/bc/gov/BCWallet/MainActivity.java @@ -7,9 +7,17 @@ import androidx.core.app.NotificationManagerCompat; import android.content.Intent; import android.content.res.Configuration; +import android.os.Bundle; public class MainActivity extends ReactActivity { + // react-native-screens override + // https://github.com/software-mansion/react-native-screens#android + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(null); + } + /** * Detects changes in device orientation and sends them to JavaScript by broadcasting an event. * This is used to support the camera on different tablet orientations.