Skip to content

Commit 24e6722

Browse files
javachefacebook-github-bot
authored andcommitted
Add TODOs for missing ReactActivityDelegate methods (#43294)
Summary: Pull Request resolved: #43294 These are gated by `ReactFeatureFlags.enableBridgelessArchitecture` and are missing support. They should be evaluated for backwards compatibility Changelog: [Internal] Reviewed By: fkgozali Differential Revision: D54422143 fbshipit-source-id: b35b60f17d68d412a354b20e02fb6bbf591c40b0
1 parent 6cacc6d commit 24e6722

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
144144
}
145145

146146
public boolean onKeyDown(int keyCode, KeyEvent event) {
147-
if (!ReactFeatureFlags.enableBridgelessArchitecture) {
147+
if (ReactFeatureFlags.enableBridgelessArchitecture) {
148+
// TODO T156475655: support onKeyDown
149+
} else {
148150
if (getReactNativeHost().hasInstance()
149151
&& getReactNativeHost().getUseDeveloperSupport()
150152
&& keyCode == KeyEvent.KEYCODE_MEDIA_FAST_FORWARD) {
@@ -160,7 +162,9 @@ public boolean onKeyUp(int keyCode, KeyEvent event) {
160162
}
161163

162164
public boolean onKeyLongPress(int keyCode, KeyEvent event) {
163-
if (!ReactFeatureFlags.enableBridgelessArchitecture) {
165+
if (ReactFeatureFlags.enableBridgelessArchitecture) {
166+
// TODO T156475655: support onKeyLongPress
167+
} else {
164168
if (getReactNativeHost().hasInstance()
165169
&& getReactNativeHost().getUseDeveloperSupport()
166170
&& keyCode == KeyEvent.KEYCODE_MEDIA_FAST_FORWARD) {
@@ -176,7 +180,9 @@ public boolean onBackPressed() {
176180
}
177181

178182
public boolean onNewIntent(Intent intent) {
179-
if (!ReactFeatureFlags.enableBridgelessArchitecture) {
183+
if (ReactFeatureFlags.enableBridgelessArchitecture) {
184+
// TODO T156475655: support onNewIntent
185+
} else {
180186
if (getReactNativeHost().hasInstance()) {
181187
getReactNativeHost().getReactInstanceManager().onNewIntent(intent);
182188
return true;
@@ -186,15 +192,19 @@ public boolean onNewIntent(Intent intent) {
186192
}
187193

188194
public void onWindowFocusChanged(boolean hasFocus) {
189-
if (!ReactFeatureFlags.enableBridgelessArchitecture) {
195+
if (ReactFeatureFlags.enableBridgelessArchitecture) {
196+
// TODO T156475655: support onWindowFocusChanged
197+
} else {
190198
if (getReactNativeHost().hasInstance()) {
191199
getReactNativeHost().getReactInstanceManager().onWindowFocusChange(hasFocus);
192200
}
193201
}
194202
}
195203

196204
public void onConfigurationChanged(Configuration newConfig) {
197-
if (!ReactFeatureFlags.enableBridgelessArchitecture) {
205+
if (ReactFeatureFlags.enableBridgelessArchitecture) {
206+
// TODO T156475655: support onConfigurationChanged
207+
} else {
198208
if (getReactNativeHost().hasInstance()) {
199209
getReactInstanceManager().onConfigurationChanged(getContext(), newConfig);
200210
}

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ public void onActivityResult(
140140
int requestCode, int resultCode, Intent data, boolean shouldForwardToReactInstance) {
141141
if (ReactFeatureFlags.enableBridgelessArchitecture) {
142142
// TODO T156475655: Implement onActivityResult for Bridgeless
143-
return;
144143
} else {
145144
if (getReactNativeHost().hasInstance() && shouldForwardToReactInstance) {
146145
getReactNativeHost()

0 commit comments

Comments
 (0)