decord/alpha/source/modules/device/DeviceState.tsx

39 lines
1.4 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 5283
// Function ID: 5284
2026-07-20 16:05:17 +00:00
// Name: DeviceState
2026-10-09 10:00:15 +00:00
// Dependencies: [5284, 2, 5285]
2026-07-20 16:05:17 +00:00
// Exports: logDeviceState
2026-10-09 10:00:15 +00:00
// Module 5283 (DeviceState)
import device_DeviceState from "device/DeviceState" /* 5284 */;
import constants_DeviceState from "constants/DeviceState" /* 5285 */;
import size from "module_2" /* 2 */;
2026-07-20 16:05:17 +00:00
const result = size.fileFinishedImporting("modules/device/DeviceState.tsx");
2026-08-24 06:08:38 +00:00
export const DeviceState = constants_DeviceState.DeviceState;
export const ThermalState = constants_DeviceState.ThermalState;
export const getDeviceState = device_DeviceState.getDeviceState;
2026-07-20 16:05:17 +00:00
export const logDeviceState = function logDeviceState(thermalState) {
if (null !== thermalState) {
const logger2 = device_DeviceState.logger;
2026-07-20 16:05:17 +00:00
logger2.info("Device State Information:");
const logger3 = device_DeviceState.logger;
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal;
logger3.info("- Thermal State: " + thermalState.thermalState);
const logger4 = device_DeviceState.logger;
2026-07-20 16:05:17 +00:00
const _HermesInternal2 = HermesInternal;
logger4.info("- Battery Level: " + 100 * thermalState.batteryLevel + "%");
const logger5 = device_DeviceState.logger;
2026-07-20 16:05:17 +00:00
let str6 = "Disabled";
2026-10-03 08:58:59 +00:00
const info = logger5.info;
2026-07-20 16:05:17 +00:00
if (thermalState.isLowPowerMode) {
str6 = "Enabled";
}
2026-10-03 08:58:59 +00:00
info(`- Low Power Mode: ${str6}`);
2026-07-20 16:05:17 +00:00
} else {
const logger = device_DeviceState.logger;
2026-07-20 16:05:17 +00:00
logger.info("Device state not available");
}
};