Skip to content

Commit

Permalink
[skip ci] Add TODOs for missing ReactActivityDelegate methods (facebo…
Browse files Browse the repository at this point in the history
…ok#43294)

Summary:

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
  • Loading branch information
javache authored and facebook-github-bot committed Mar 4, 2024
1 parent 127a7cc commit 7b669fb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
}

public boolean onKeyDown(int keyCode, KeyEvent event) {
if (!ReactFeatureFlags.enableBridgelessArchitecture) {
if (ReactFeatureFlags.enableBridgelessArchitecture) {
// TODO T156475655: support onKeyDown
} else {
if (getReactNativeHost().hasInstance()
&& getReactNativeHost().getUseDeveloperSupport()
&& keyCode == KeyEvent.KEYCODE_MEDIA_FAST_FORWARD) {
Expand All @@ -160,7 +162,9 @@ public boolean onKeyUp(int keyCode, KeyEvent event) {
}

public boolean onKeyLongPress(int keyCode, KeyEvent event) {
if (!ReactFeatureFlags.enableBridgelessArchitecture) {
if (ReactFeatureFlags.enableBridgelessArchitecture) {
// TODO T156475655: support onKeyLongPress
} else {
if (getReactNativeHost().hasInstance()
&& getReactNativeHost().getUseDeveloperSupport()
&& keyCode == KeyEvent.KEYCODE_MEDIA_FAST_FORWARD) {
Expand All @@ -176,7 +180,9 @@ public boolean onBackPressed() {
}

public boolean onNewIntent(Intent intent) {
if (!ReactFeatureFlags.enableBridgelessArchitecture) {
if (ReactFeatureFlags.enableBridgelessArchitecture) {
// TODO T156475655: support onNewIntent
} else {
if (getReactNativeHost().hasInstance()) {
getReactNativeHost().getReactInstanceManager().onNewIntent(intent);
return true;
Expand All @@ -186,15 +192,19 @@ public boolean onNewIntent(Intent intent) {
}

public void onWindowFocusChanged(boolean hasFocus) {
if (!ReactFeatureFlags.enableBridgelessArchitecture) {
if (ReactFeatureFlags.enableBridgelessArchitecture) {
// TODO T156475655: support onWindowFocusChanged
} else {
if (getReactNativeHost().hasInstance()) {
getReactNativeHost().getReactInstanceManager().onWindowFocusChange(hasFocus);
}
}
}

public void onConfigurationChanged(Configuration newConfig) {
if (!ReactFeatureFlags.enableBridgelessArchitecture) {
if (ReactFeatureFlags.enableBridgelessArchitecture) {
// TODO T156475655: support onConfigurationChanged
} else {
if (getReactNativeHost().hasInstance()) {
getReactInstanceManager().onConfigurationChanged(getContext(), newConfig);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ public void onActivityResult(
int requestCode, int resultCode, Intent data, boolean shouldForwardToReactInstance) {
if (ReactFeatureFlags.enableBridgelessArchitecture) {
// TODO T156475655: Implement onActivityResult for Bridgeless
return;
} else {
if (getReactNativeHost().hasInstance() && shouldForwardToReactInstance) {
getReactNativeHost()
Expand Down

0 comments on commit 7b669fb

Please sign in to comment.