Skip to content

Commit 32d37f0

Browse files
sbuggayfacebook-github-bot
authored andcommitted
Long press back to open DevMenu (#53189)
Summary: Pull Request resolved: #53189 In addition to the menu button and long pressing fast forward option, adds long pressing back as an option to open DevTools for devices like the Chromecast remote. Changelog: [Android][Added] - Add long-press back as an option to open the DevMenu for devices that lack menu & fast-forward. {F1981060943} Reviewed By: alanleedev Differential Revision: D79923779 fbshipit-source-id: b758d591ebe3b8e601dbf704212123451e3c32e1
1 parent 1d4c9f9 commit 32d37f0

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ public open class ReactDelegate {
247247
}
248248

249249
public fun onKeyLongPress(keyCode: Int): Boolean {
250-
if (keyCode == KeyEvent.KEYCODE_MEDIA_FAST_FORWARD) {
250+
if (keyCode == KeyEvent.KEYCODE_MEDIA_FAST_FORWARD || keyCode == KeyEvent.KEYCODE_BACK) {
251251
if (ReactNativeNewArchitectureFeatureFlags.enableBridgelessArchitecture() &&
252252
reactHost != null) {
253253
val devSupportManager = reactHost?.devSupportManager

0 commit comments

Comments
 (0)