decord/source/modules/core/native/handleAppStateChanged.tsx

55 lines
2 KiB
TypeScript
Raw Normal View History

// Module ID: 17903
// Function ID: 17904
2026-07-20 16:05:17 +00:00
// Name: handleAppStateChanged
// Dependencies: [502, 1895, 1074, 3, 10, 573, 4583, 17902, 7475, 4408, 9, 1242, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 17903 (handleAppStateChanged)
2026-08-24 06:08:38 +00:00
import timestampDefault from "timestamp" /* 3 */;
import isTracingDefault from "isTracing" /* 10 */;
import dispatcherDefault from "dispatcher" /* 573 */;
import setSystemTheme from "setSystemTheme" /* 4408 */;
import createRTCConnection from "createRTCConnection" /* 4583 */;
import getDeviceMetadata from "getDeviceMetadata" /* 7475 */;
import closure_3 from "fetchFingerprint" /* 502 */;
import closure_4 from "getState" /* 1895 */;
import ME from "ME" /* 1074 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-29 08:29:29 +00:00
({ AnalyticEvents: c5, AppStates: closure_6 } = ME);
2026-08-24 06:08:38 +00:00
let closure_7 = new timestampDefault("index.native.tsx");
const tmp3 = new timestampDefault("index.native.tsx");
let result = require("set").fileFinishedImporting("modules/core/native/handleAppStateChanged.tsx");
2026-07-20 16:05:17 +00:00
export default function handleAppStateChanged(state) {
state = state.getState();
2026-08-24 06:08:38 +00:00
let obj = isTracingDefault;
2026-07-23 10:11:24 +00:00
obj.markAndLog(closure_7, "\u{1F3C3}", "AppState changing from " + state + " to " + state);
2026-07-20 16:05:17 +00:00
obj = { type: "APP_STATE_UPDATE", state };
2026-08-24 06:08:38 +00:00
dispatcherDefault.dispatch(obj);
2026-07-29 08:29:29 +00:00
let isAuthenticatedResult = state === constants2.BACKGROUND && state === tmp6.ACTIVE;
2026-07-20 16:05:17 +00:00
if (isAuthenticatedResult) {
isAuthenticatedResult = authenticated.isAuthenticated();
}
if (isAuthenticatedResult) {
2026-08-24 06:08:38 +00:00
isAuthenticatedResult = createRTCConnection.default.isDisconnected();
const _default = createRTCConnection.default;
2026-07-20 16:05:17 +00:00
}
if (isAuthenticatedResult) {
let tmp2Result = tmp2(17902);
2026-07-29 08:29:29 +00:00
tmp2Result.deferUpdate();
2026-07-20 16:05:17 +00:00
}
if (state === constants2.ACTIVE) {
2026-08-24 06:08:38 +00:00
getDeviceMetadata.trackAppOpened("launcher");
const obj5 = getDeviceMetadata;
const result = setSystemTheme.setSystemThemeIfNeeded();
const obj6 = setSystemTheme;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp2Result = tmp2(9);
tmp2Result.appStateChanged(state);
if (tmp8) {
tmp2(1242).track(constants.APP_BACKGROUND, {});
const tmp2Result1 = tmp2(1242);
2026-07-20 16:05:17 +00:00
}
};