Skip to content

Commit d9ec57a

Browse files
cortinicofacebook-github-bot
authored andcommitted
Add further logging to help investigate T228303477 (#52185)
Summary: Pull Request resolved: #52185 It seems like one of the activity on the stack is not properly implementing `DefaultHardwareBackBtnHandler`. This will make the crash more clear as it will be clear which activity is the one responsible for the crash. Changelog: [Internal] [Changed] - Reviewed By: javache Differential Revision: D77142320 fbshipit-source-id: 1913976d1ad5d3ceafcfc0569f3b74dad9e919ae
1 parent 33fed54 commit d9ec57a

File tree

1 file changed

+2
-1
lines changed
  • packages/react-native/ReactAndroid/src/main/java/com/facebook/react

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ public open class ReactDelegate {
111111

112112
public fun onHostResume() {
113113
if (activity !is DefaultHardwareBackBtnHandler) {
114-
throw ClassCastException("Host Activity does not implement DefaultHardwareBackBtnHandler")
114+
throw ClassCastException(
115+
"Host Activity `${activity.javaClass.simpleName}` does not implement DefaultHardwareBackBtnHandler")
115116
}
116117
if (ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture() &&
117118
reactHost != null) {

0 commit comments

Comments
 (0)