Commit 36e6971
Move defaults for
Summary:
The optional parameters on `DevSupportManagerFactory.create()` (the New Architecture overload) all have canonical defaults, but callers were forced to pass every one explicitly. Move the defaults into the interface signature so callers only specify the parameters that vary — `applicationContext`, `reactInstanceManagerHelper`, `packagerPathForJSBundleName`, and `useDevSupport`. This also lets external factories inject a `customPackagerCommandHandlers` map without having to repeat the eleven other arguments.
`ReactHostImpl` is updated to use the shorter form. JVM signatures are unchanged (Kotlin default values on abstract interface methods don't emit bridge methods), so no ABI change for Java callers.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D110599799DevSupportManagerFactory.create() into the interface signature (#57429)1 parent 97aa7ad commit 36e6971
3 files changed
Lines changed: 20 additions & 18 deletions
File tree
- packages/react-native/ReactAndroid
- api
- src/main/java/com/facebook/react
- devsupport
- runtime
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1950 | 1950 | | |
1951 | 1951 | | |
1952 | 1952 | | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
1953 | 1958 | | |
1954 | 1959 | | |
1955 | 1960 | | |
| |||
3017 | 3022 | | |
3018 | 3023 | | |
3019 | 3024 | | |
| 3025 | + | |
| 3026 | + | |
3020 | 3027 | | |
3021 | 3028 | | |
3022 | 3029 | | |
| |||
Lines changed: 10 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
Lines changed: 3 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | 116 | | |
125 | 117 | | |
126 | 118 | | |
| |||
156 | 148 | | |
157 | 149 | | |
158 | 150 | | |
| 151 | + | |
159 | 152 | | |
160 | 153 | | |
161 | 154 | | |
162 | 155 | | |
163 | 156 | | |
164 | 157 | | |
| 158 | + | |
165 | 159 | | |
166 | 160 | | |
167 | 161 | | |
| |||
170 | 164 | | |
171 | 165 | | |
172 | 166 | | |
| 167 | + | |
173 | 168 | | |
174 | 169 | | |
175 | 170 | | |
| |||
0 commit comments