2026-08-24 06:08:38 +00:00
|
|
|
// Module ID: 8757
|
|
|
|
|
// Function ID: 8758
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: NativeModules
|
2026-08-24 06:08:38 +00:00
|
|
|
// Dependencies: [17, 500, 8758, 4358, 644, 705, 2]
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
// Module 8757 (NativeModules)
|
|
|
|
|
import enforcingDefault from "enforcing" /* 8758 */;
|
|
|
|
|
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
|
|
|
|
|
import set from "set" /* 500 */;
|
|
|
|
|
import keys from "keys" /* 644 */;
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
const NativeModules = get_ActivityIndicator.NativeModules;
|
2026-07-23 10:11:24 +00:00
|
|
|
if (set.isAndroid()) {
|
2026-08-24 06:08:38 +00:00
|
|
|
let DCDDeviceThermalStateManager = enforcingDefault;
|
2026-07-20 16:05:17 +00:00
|
|
|
} else {
|
|
|
|
|
DCDDeviceThermalStateManager = NativeModules.DCDDeviceThermalStateManager;
|
|
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
const nativeEventEmitter = new get_ActivityIndicator.NativeEventEmitter(DCDDeviceThermalStateManager);
|
2026-07-23 10:11:24 +00:00
|
|
|
let closure_5 = keys.create((arg0) => {
|
|
|
|
|
const _require = arg0;
|
2026-07-29 08:29:29 +00:00
|
|
|
let thermalState = dependencyMap;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (obj.isAndroid()) {
|
2026-07-29 08:29:29 +00:00
|
|
|
if (tmpResult.getSystemVersionMajor() >= 29) {
|
2026-08-24 06:08:38 +00:00
|
|
|
thermalState = enforcingDefault.getThermalState();
|
2026-07-29 08:29:29 +00:00
|
|
|
let resolved = Promise.resolve(thermalState);
|
2026-08-24 06:08:38 +00:00
|
|
|
const obj3 = enforcingDefault;
|
2026-07-20 16:05:17 +00:00
|
|
|
} else {
|
|
|
|
|
resolved = Promise.resolve(undefined);
|
|
|
|
|
}
|
2026-08-24 06:08:38 +00:00
|
|
|
tmpResult = _require(4358);
|
2026-07-20 16:05:17 +00:00
|
|
|
} else {
|
|
|
|
|
const DCDDeviceThermalStateManager = NativeModules.DCDDeviceThermalStateManager;
|
2026-07-29 08:29:29 +00:00
|
|
|
const thermalState1 = DCDDeviceThermalStateManager.getThermalState();
|
|
|
|
|
thermalState1.then(function updateThermalState(arg0) {
|
|
|
|
|
const callback = arg0;
|
2026-08-24 06:08:38 +00:00
|
|
|
callback(closure_1_2[5]).batchUpdates(() => state((rawThermalState) => {
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp = rawThermalState;
|
|
|
|
|
if (rawThermalState.rawThermalState !== closure_0) {
|
|
|
|
|
const obj = { rawThermalState: null };
|
|
|
|
|
obj[0] = tmp2;
|
|
|
|
|
tmp = obj;
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
}));
|
|
|
|
|
});
|
2026-07-20 16:05:17 +00:00
|
|
|
nativeEventEmitter.addListener("DeviceThermalStateDidChange", (state) => {
|
2026-07-29 08:29:29 +00:00
|
|
|
state = state.state;
|
2026-08-24 06:08:38 +00:00
|
|
|
callback(closure_1_2[5]).batchUpdates(() => state((rawThermalState) => {
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp = rawThermalState;
|
|
|
|
|
if (rawThermalState.rawThermalState !== closure_0) {
|
|
|
|
|
const obj = { rawThermalState: null };
|
|
|
|
|
obj[0] = tmp2;
|
|
|
|
|
tmp = obj;
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
}));
|
2026-07-20 16:05:17 +00:00
|
|
|
});
|
2026-08-15 05:55:55 +00:00
|
|
|
return { rawThermalState: "r" };
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
});
|
2026-07-23 10:11:24 +00:00
|
|
|
const result = set.fileFinishedImporting("modules/device/ThermalUtils.native.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
getRawThermalState() {
|
|
|
|
|
return lib.getState().rawThermalState;
|
|
|
|
|
},
|
|
|
|
|
useRawThermalState() {
|
|
|
|
|
return lib((rawThermalState) => rawThermalState.rawThermalState);
|
|
|
|
|
},
|
|
|
|
|
addListener(arg0) {
|
|
|
|
|
return { remove: lib.subscribe(arg0) };
|
|
|
|
|
}
|
|
|
|
|
};
|