@onekeyfe/react-native-perf-stats 3.0.25 → 3.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/android/src/main/java/com/margelo/nitro/reactnativeperfstats/ReactNativePerfStats.kt
CHANGED
|
@@ -284,8 +284,12 @@ private object Sampler {
|
|
|
284
284
|
|
|
285
285
|
// ---- Overlay ----------------------------------------------------------
|
|
286
286
|
//
|
|
287
|
-
// Attaches a TextView via WindowManager.addView
|
|
288
|
-
// TYPE_APPLICATION_ABOVE_SUB_PANEL (
|
|
287
|
+
// Attaches a TextView via WindowManager.addView at z=1005, the AOSP slot
|
|
288
|
+
// `TYPE_APPLICATION_ABOVE_SUB_PANEL` (FIRST_SUB_WINDOW + 5). The named
|
|
289
|
+
// constant is `@hide` in the public SDK, so we use the literal value
|
|
290
|
+
// directly — `WINDOW_TYPE_ABOVE_SUB_PANEL` below — to keep this file
|
|
291
|
+
// compilable against the public SDK while preserving the original z-order
|
|
292
|
+
// intent. This sits above:
|
|
289
293
|
// - The activity's main window (TYPE_APPLICATION = 2)
|
|
290
294
|
// - PANEL / SUB_PANEL (1000 / 1002)
|
|
291
295
|
// - ATTACHED_DIALOG used by RN's Modal (1003)
|
|
@@ -300,6 +304,11 @@ private object Sampler {
|
|
|
300
304
|
// React tree mounts would arrive too late and currentActivity would stay
|
|
301
305
|
// null indefinitely.
|
|
302
306
|
|
|
307
|
+
// FIRST_SUB_WINDOW (1000) + 5; the public SDK hides the named constant
|
|
308
|
+
// `TYPE_APPLICATION_ABOVE_SUB_PANEL` even though the value is honoured at
|
|
309
|
+
// runtime. See the block comment above for the z-order rationale.
|
|
310
|
+
private const val WINDOW_TYPE_ABOVE_SUB_PANEL = 1005
|
|
311
|
+
|
|
303
312
|
internal object Overlay : Application.ActivityLifecycleCallbacks {
|
|
304
313
|
private val mainHandler = Handler(Looper.getMainLooper())
|
|
305
314
|
|
|
@@ -392,7 +401,7 @@ internal object Overlay : Application.ActivityLifecycleCallbacks {
|
|
|
392
401
|
val params = WindowManager.LayoutParams(
|
|
393
402
|
WindowManager.LayoutParams.WRAP_CONTENT,
|
|
394
403
|
WindowManager.LayoutParams.WRAP_CONTENT,
|
|
395
|
-
|
|
404
|
+
WINDOW_TYPE_ABOVE_SUB_PANEL,
|
|
396
405
|
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
|
|
397
406
|
or WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
|
|
398
407
|
or WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
|