decord/stable/source/modules/systrace/native/installSystrace.tsx
github-actions 57c2214117 chore: update source for stable 347.12
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
2026-09-29 21:26:22 +00:00

80 lines
2.2 KiB
TypeScript

// Module ID: 14702
// Function ID: 14703
// Name: installSystrace
// Dependencies: [17, 1364, 14703, 2]
// Exports: installSystrace
// Module 14702 (installSystrace)
import _mod17 from "module_17" /* 17 */;
import NativeSystraceModule from "NativeSystraceModule" /* 14703 */;
import size from "module_2" /* 2 */;
const Systrace = _mod17.Systrace;
const result = size.fileFinishedImporting("modules/systrace/native/installSystrace.tsx");
export const installSystrace = function installSystrace() {
if (obj.isAndroid()) {
Systrace.isEnabled = () => {
const _default = NativeSystraceModule.default;
let flag;
if (_default != null) {
flag = _default.isEnabled();
}
if (flag == null) {
flag = false;
}
return flag;
};
Systrace.beginEvent = (fn) => {
const _default = NativeSystraceModule.default;
if (_default != null) {
let tmp2 = fn;
if (typeof fn !== "string") {
tmp2 = fn();
}
_default.beginEvent(tmp2);
}
};
Systrace.endEvent = () => {
const _default = NativeSystraceModule.default;
if (_default != null) {
_default.endEvent();
}
};
Systrace.beginAsyncEvent = (fn) => {
const _default = NativeSystraceModule.default;
let num;
if (_default != null) {
let tmp2 = fn;
if (typeof fn !== "string") {
tmp2 = fn();
}
num = _default.beginAsyncEvent(tmp2);
}
if (num == null) {
num = 0;
}
return num;
};
Systrace.endAsyncEvent = (fn, arg1) => {
const _default = NativeSystraceModule.default;
if (_default != null) {
let tmp2 = fn;
if (typeof fn !== "string") {
tmp2 = fn();
}
_default.endAsyncEvent(tmp2, arg1);
}
};
Systrace.counterEvent = (pending_js_to_native_queue, length) => {
const _default = NativeSystraceModule.default;
if (_default != null) {
let tmp2 = pending_js_to_native_queue;
if (typeof pending_js_to_native_queue !== "string") {
tmp2 = pending_js_to_native_queue();
}
_default.counterEvent(tmp2, length);
}
};
}
};