Skip to content

Commit 9d4a519

Browse files
committed
android [nfc]: Set android:exported explicitly on DevSettingsActivity
This follows a change in the RN template app leading to RN v0.68: facebook/react-native@00ac03435 Bump OSS Android build to SDK 31 Because this activity doesn't have any intent filters, this attribute already has "false" as a default value, and there's no need to set it explicitly: https://developer.android.com/guide/topics/manifest/activity-element#exported SDK 31, aka Android 12, started requiring an explicit setting for this attribute when there *is* an intent filter (and the app targets SDK 31+): https://developer.android.com/about/versions/12/behavior-changes-12#exported (I think the default in that case had been "true", which is unsafe when not intended.) So in fa6fbbf we added it to our two other activities, which do have intent filters. It isn't really needed here; not only is the default what we want, but if this activity somehow ever grew an intent filter then there'd be a lint clearly pointing out that we needed this attribute. But the explicitness doesn't hurt anything, and keeps us aligned with the template app; add it.
1 parent b301e9d commit 9d4a519

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

android/app/src/debug/AndroidManifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
tools:remove="android:networkSecurityConfig"
99
tools:ignore="GoogleAppIndexingWarning"
1010
tools:targetApi="28">
11-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
11+
<activity
12+
android:name="com.facebook.react.devsupport.DevSettingsActivity"
13+
android:exported="false" />
1214
</application>
1315
</manifest>

0 commit comments

Comments
 (0)