From 36bec33977538c1f7faff7479d0bbcb0bec4b9cb Mon Sep 17 00:00:00 2001 From: somena1 Date: Sat, 6 Nov 2021 01:03:15 +0100 Subject: [PATCH] android: Fix restart on resizing or splitting screen This fixes an issue where the app would restart on entering split screen, or on resizing the app's side of a split screen. Basically this line of the Android manifest is making an assurance to the system that the app is prepared to handle these changes; docs here: https://developer.android.com/guide/topics/manifest/activity-element#config When the system doesn't get that assurance, it just restarts the app from scratch to be sure. And empirically the app indeed does just fine when we add those assurances and then go ahead and switch to split-screen mode, or resize the app's portion of the split screen. That layer of things is basically all RN's job, so RN is handling this just fine -- we just haven't been letting the system know that we're ready to do so. Also got this fixed in the RN template app upstream: https://github.com/facebook/react-native/pull/32536 https://github.com/facebook/react-native/commit/fc962c9b6 [greg: expanded commit message] Fixes: #5068 --- android/app/src/main/AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 950f6c3dd45..53193e1290d 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -70,7 +70,7 @@ android:theme="@style/AppTheme">