Commit 4560fc0
Fix crash on HeadlessJsTaskService on old architecture (#48124)
Summary:
Pull Request resolved: #48124
Fixes #47592
The logic in HeadlessJsTaskService is broken. We should not check whether `getReactContext` is null or not.
Instead we should use the `enableBridgelessArchitecture` feature flag to understand if New Architecture was enabled or not.
The problem we were having is that `HeadlessJsTaskService` was attempting to load the New Architecture even if the user would have it turned off. The Service would then die attempting to load `libappmodules.so` which was correctly missing.
Changelog:
[Android] [Fixed] - Fix crash on HeadlessJsTaskService on old architecture
Reviewed By: javache
Differential Revision: D66826271
fbshipit-source-id: 2b8418e0b01b65014cdbfd0ec2f843420a15f9db1 parent ddfa212 commit 4560fc0
File tree
1 file changed
+12
-13
lines changed- packages/react-native/ReactAndroid/src/main/java/com/facebook/react
1 file changed
+12
-13
lines changedLines changed: 12 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
189 | 185 | | |
190 | 186 | | |
191 | 187 | | |
192 | 188 | | |
193 | | - | |
| 189 | + | |
194 | 190 | | |
195 | 191 | | |
196 | | - | |
197 | | - | |
198 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
199 | 198 | | |
200 | 199 | | |
201 | 200 | | |
202 | 201 | | |
203 | | - | |
| 202 | + | |
204 | 203 | | |
205 | 204 | | |
206 | | - | |
| 205 | + | |
207 | 206 | | |
208 | 207 | | |
209 | 208 | | |
0 commit comments