Commit 33005a4
Gate requestBody processing behind BuildConfig.DEBUG (#54920)
Summary:
Pull Request resolved: #54920
Gates `requestBody` handling for `reportRequestStart` on Android with `BuildConfig.DEBUG`. This is an appropriate optimisation as we do not use body previews outside of CDP debugging, aligning with the same conditional behaviour on iOS.
I'd like to also pick this change for 0.83.1, with D89373824, for additional safety.
**Other notes**
Gating by `BuildConfig` isn't done elsewhere in this file, as other potentially expensive behaviour is gated lower down by both `REACT_NATIVE_DEBUGGER_ENABLED` and the `Network.enable` CDP message. This was the only remaining gap with the iOS implementation.
Changelog: [Internal]
Reviewed By: vzaidman
Differential Revision: D89377163
fbshipit-source-id: 10a27f6b02f65755d4293f5cf33697d542bc94651 parent 9692e64 commit 33005a4
1 file changed
Lines changed: 11 additions & 2 deletions
File tree
- packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/network
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
33 | 43 | | |
34 | 44 | | |
35 | 45 | | |
36 | 46 | | |
37 | 47 | | |
38 | | - | |
39 | | - | |
| 48 | + | |
40 | 49 | | |
41 | 50 | | |
42 | 51 | | |
| |||
0 commit comments