Skip to content

Commit d9262c6

Browse files
huntiemeta-codesync[bot]
authored andcommitted
Update BG trace label based on touch support (facebook#54247)
Summary: Pull Request resolved: facebook#54247 Changelog: [Internal] Reviewed By: hoxyq Differential Revision: D85253083 fbshipit-source-id: 4f87e9200c1ade237fd184349add88ca263aaab3
1 parent c7fb31c commit d9262c6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,16 @@ internal class PerfMonitorOverlayView(
5656
if (state == TracingState.ENABLEDINBACKGROUNDMODE) {
5757
(statusIndicator.background as GradientDrawable).setColor(Color.RED)
5858
statusLabel.text = "Profiling Active"
59-
tooltipLabel.text = "Press ☰ to open"
59+
tooltipLabel.text =
60+
if (context.packageManager.hasSystemFeature("android.hardware.touchscreen")) "Tap to open"
61+
else "Press ☰ to open"
6062
} else {
6163
(statusIndicator.background as GradientDrawable).setColor(Color.GRAY)
6264
statusLabel.text = "Profiling Stopped"
63-
tooltipLabel.text = "Press ☰ to restart"
65+
tooltipLabel.text =
66+
if (context.packageManager.hasSystemFeature("android.hardware.touchscreen"))
67+
"Tap to restart"
68+
else "Press ☰ to restart"
6469
}
6570
dialog.show()
6671
}

0 commit comments

Comments
 (0)