()
| 71 | if (typeof orig !== 'function') return; |
| 72 | const telemetryEnabled = !!g['__NS_DEV_TELEMETRY__'] || !!verbose; |
| 73 | function __ns_getTelemetry() { |
| 74 | if (!telemetryEnabled) return null as any; |
| 75 | try { |
| 76 | if (!g['__NS_TELEMETRY__']) { |
| 77 | g['__NS_TELEMETRY__'] = {}; |
| 78 | } |
| 79 | const root = g['__NS_TELEMETRY__']; |
| 80 | if (!root.androidInit) { |
| 81 | root.androidInit = { calls: 0, fallbackSuccess: 0, nullDefers: 0, duplicates: 0, resolvedBy: { nativeScriptApp: 0, applicationHolder: 0, activityThread: 0 } }; |
| 82 | } |
| 83 | return root.androidInit; |
| 84 | } catch { |
| 85 | return null as any; |
| 86 | } |
| 87 | } |
| 88 | function __ns_tryResolveAndroidApp() { |
| 89 | try { |
| 90 | if (g.com?.tns?.NativeScriptApplication?.getInstance) { |
no outgoing calls
no test coverage detected