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

55 lines
2 KiB
TypeScript
Raw Normal View History

2026-09-03 10:05:34 +00:00
// Module ID: 17740
// Function ID: 17741
2026-07-20 16:05:17 +00:00
// Name: handleAppStateChanged
2026-09-03 10:05:34 +00:00
// Dependencies: [1215, 7167, 673, 3, 10, 706, 4554, 17739, 7230, 4325, 9, 695, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-09-03 10:05:34 +00:00
// Module 17740 (handleAppStateChanged)
2026-08-24 06:08:38 +00:00
import timestampDefault from "timestamp" /* 3 */;
import isTracingDefault from "isTracing" /* 10 */;
2026-09-02 09:53:35 +00:00
import dispatcherDefault from "dispatcher" /* 706 */;
2026-09-01 10:26:29 +00:00
import setSystemTheme from "setSystemTheme" /* 4325 */;
import createRTCConnection from "createRTCConnection" /* 4554 */;
2026-09-03 10:05:34 +00:00
import getDeviceMetadata from "getDeviceMetadata" /* 7230 */;
2026-09-02 09:53:35 +00:00
import closure_3 from "fetchFingerprint" /* 1215 */;
2026-09-03 10:05:34 +00:00
import closure_4 from "getState" /* 7167 */;
2026-09-02 09:53:35 +00:00
import ME from "ME" /* 673 */;
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) {
2026-09-03 10:05:34 +00:00
let tmp2Result = tmp2(17739);
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) {
2026-09-02 09:53:35 +00:00
tmp2(695).track(constants.APP_BACKGROUND, {});
const tmp2Result1 = tmp2(695);
2026-07-20 16:05:17 +00:00
}
};