Skip to content

Commit

Permalink
Fix crashes resulting from react-native-screens Activity restart on
Browse files Browse the repository at this point in the history
Android

As per the react-native-screens documentation on Android setup:
Discards any Activity state persisted during the Activity restart process,
to avoid inconsistencies that lead to crashes.
  • Loading branch information
jinchung committed Oct 7, 2023
1 parent ba397cd commit 6c07ad2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions android/app/src/main/java/me/rainbow/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import me.rainbow.NativeModules.RNBackHandler.RNBackHandlerPackage;
import me.rainbow.NativeModules.Internals.*;
import android.webkit.WebView;
import com.facebook.react.ReactActivityDelegate;
import com.zoontek.rnbootsplash.RNBootSplash;

import android.content.Intent;
Expand All @@ -19,7 +18,7 @@ public class MainActivity extends ReactActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.onCreate(null);
WebView.setWebContentsDebuggingEnabled(false);
}

Expand Down

0 comments on commit 6c07ad2

Please sign in to comment.