Skip to content

Commit 53dc68a

Browse files
sbuggaymeta-codesync[bot]
authored andcommitted
Don't flash the performance monitor there's no metro connection (facebook#54019)
Summary: Pull Request resolved: facebook#54019 Currently the performance monitor flickers on boot if there's no metro connection. This change checks first if we have a packager before enabling the monitor. No metro connection: {F1982423105} Metro connection: {F1982423112} Changelog: [Internal] Reviewed By: shwanton Differential Revision: D83701372 fbshipit-source-id: d099880d3ab509942a937a6bde11ebdde13450cd
1 parent 84947fb commit 53dc68a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,10 @@ public abstract class DevSupportManagerBase(
567567
perfMonitorOverlayManager?.let { manager ->
568568
reactInstanceDevHelper.inspectorTarget?.addPerfMonitorListener(manager)
569569
}
570-
perfMonitorOverlayManager?.enable()
571-
perfMonitorOverlayManager?.startBackgroundTrace()
570+
if (isPackagerConnected) {
571+
perfMonitorOverlayManager?.enable()
572+
perfMonitorOverlayManager?.startBackgroundTrace()
573+
}
572574
perfMonitorInitialized = true
573575
}
574576

0 commit comments

Comments
 (0)