@@ -450,26 +450,29 @@ public abstract class DevSupportManagerBase(
450450 }
451451 }
452452
453- val fpsDebugLabel =
454- if (devSettings.isFpsDebugEnabled)
455- applicationContext.getString(R .string.catalyst_perf_monitor_stop)
456- else applicationContext.getString(R .string.catalyst_perf_monitor)
457- options[fpsDebugLabel] = DevOptionHandler {
458- if (! devSettings.isFpsDebugEnabled) {
459- // Request overlay permission if needed when "Show Perf Monitor" option is selected
460- val context: Context ? = reactInstanceDevHelper.currentActivity
461- if (context == null ) {
462- FLog .e(ReactConstants .TAG , " Unable to get reference to react activity" )
463- } else {
464- requestPermission(context)
453+ // Do not show legacy performance overlay if V2 is enabled
454+ if (! ReactNativeFeatureFlags .perfMonitorV2Enabled()) {
455+ val fpsDebugLabel =
456+ if (devSettings.isFpsDebugEnabled)
457+ applicationContext.getString(R .string.catalyst_perf_monitor_stop)
458+ else applicationContext.getString(R .string.catalyst_perf_monitor)
459+ options[fpsDebugLabel] = DevOptionHandler {
460+ if (! devSettings.isFpsDebugEnabled) {
461+ // Request overlay permission if needed when "Show Perf Monitor" option is selected
462+ val context: Context ? = reactInstanceDevHelper.currentActivity
463+ if (context == null ) {
464+ FLog .e(ReactConstants .TAG , " Unable to get reference to react activity" )
465+ } else {
466+ requestPermission(context)
467+ }
465468 }
469+ devSettings.isFpsDebugEnabled = ! devSettings.isFpsDebugEnabled
470+ }
471+ options[applicationContext.getString(R .string.catalyst_settings)] = DevOptionHandler {
472+ val intent = Intent (applicationContext, DevSettingsActivity ::class .java)
473+ intent.setFlags(Intent .FLAG_ACTIVITY_NEW_TASK )
474+ applicationContext.startActivity(intent)
466475 }
467- devSettings.isFpsDebugEnabled = ! devSettings.isFpsDebugEnabled
468- }
469- options[applicationContext.getString(R .string.catalyst_settings)] = DevOptionHandler {
470- val intent = Intent (applicationContext, DevSettingsActivity ::class .java)
471- intent.setFlags(Intent .FLAG_ACTIVITY_NEW_TASK )
472- applicationContext.startActivity(intent)
473476 }
474477
475478 if (customDevOptions.isNotEmpty()) {
0 commit comments