Skip to content

Commit 2fb4f13

Browse files
Phecdameta-codesync[bot]
authored andcommitted
Fix debugOptimized DevSettingsActivity manifest (#57406)
Summary: Fixes #57396. `debugOptimized` builds still expose the React Native Dev Menu `Settings` item, but `DevSettingsActivity` was only declared in the `debug` manifest. This caused `Settings` to crash in `debugOptimized` with `ActivityNotFoundException`. This adds a `debugOptimized` manifest matching the existing debug dev-support manifest, so `DevSettingsActivity` is declared for that build type. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [ANDROID] [FIXED] - Fix Dev Menu Settings crash in debugOptimized builds Pull Request resolved: #57406 Test Plan: Verified with RNTester debugOptimized: ``` sh yarn install --frozen-lockfile yarn start ./gradlew :packages:rn-tester:android:app:installDebugOptimized -PreactNativeArchitectures=arm64-v8a ``` then shake and tap `Settings`, confirm that Debug Settings opens instead of crashing. Reviewed By: javache Differential Revision: D110463462 Pulled By: cortinico fbshipit-source-id: 262a23a70c89bfc2de3d5b211672920be6ddcd2d
1 parent 6b45e57 commit 2fb4f13

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
<!--
5+
debugOptimized keeps JS debugging and DevSupport enabled while using
6+
optimized native code. Keep this manifest in sync with the debug
7+
DevSupport manifest so debug-only DevSupport components remain available.
8+
-->
9+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
10+
11+
<!--
12+
On Android 17 (SDK 37) devices, apps that declare this must hold ACCESS_LOCAL_NETWORK
13+
to reach the dev server over the local network. Loopback via `adb reverse` is exempt.
14+
-->
15+
<uses-permission android:name="android.permission.ACCESS_LOCAL_NETWORK"/>
16+
17+
<application>
18+
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity"
19+
android:exported="false" />
20+
</application>
21+
22+
</manifest>

0 commit comments

Comments
 (0)