decord/source/stores/native/MobileVoiceOverlayStore.tsx
github-actions a36fe4ec9c chore: update source for alpha 347.0
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-14 20:04:03 +00:00

64 lines
2.2 KiB
TypeScript

// Module ID: 10109
// Function ID: 10110
// Name: MobileVoiceOverlayStore
// Dependencies: [1074, 1240, 1363, 1608, 504, 573, 2]
// Exports: isMobileOverlaySupported
// Module 10109 (MobileVoiceOverlayStore)
import initializeDefault from "initialize" /* 504 */;
import DispatcherDefault from "Dispatcher" /* 573 */;
import Constants from "Constants" /* 1074 */;
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1240 */;
import PlatformUtils from "PlatformUtils" /* 1363 */;
import MetaQuestUtils from "MetaQuestUtils" /* 1608 */;
import size from "module_2" /* 2 */;
const AnalyticEvents = Constants.AnalyticEvents;
let enabled = false;
const DeviceSettingsStore = initializeDefault.DeviceSettingsStore;
class MobileVoiceOverlayStore extends DeviceSettingsStore {
}
const prototype = MobileVoiceOverlayStore.prototype;
prototype["getUserAgnosticState"] = function getUserAgnosticState() {
return { enabled };
};
prototype["initialize"] = function initialize(enabled) {
let flag;
if (enabled != null) {
flag = enabled.enabled;
}
if (flag == null) {
flag = false;
}
enabled = flag;
};
prototype["getEnabled"] = function getEnabled() {
let isAndroidResult = PlatformUtils.isAndroid();
if (isAndroidResult) {
isAndroidResult = !MetaQuestUtils.isMetaQuest();
const tmpResult = MetaQuestUtils;
}
if (isAndroidResult) {
isAndroidResult = enabled;
}
return isAndroidResult;
};
MobileVoiceOverlayStore.displayName = "MobileVoiceOverlayStore";
MobileVoiceOverlayStore.persistKey = "MobileVoiceOverlayStore";
const mobileVoiceOverlayStore = new MobileVoiceOverlayStore(DispatcherDefault, {
MOBILE_VOICE_OVERLAY_STATE_CHANGED: function handleMobileVoiceOverlayStateChanged(enabled) {
AnalyticsUtilsDefault.track(AnalyticEvents.MOBILE_OVERLAY_TOGGLED, { enabled: enabled.enabled });
enabled = enabled.enabled;
}
});
const result = size.fileFinishedImporting("stores/native/MobileVoiceOverlayStore.tsx");
export default mobileVoiceOverlayStore;
export const isMobileOverlaySupported = function isMobileOverlaySupported() {
let isAndroidResult = PlatformUtils.isAndroid();
if (isAndroidResult) {
isAndroidResult = !MetaQuestUtils.isMetaQuest();
const tmpResult = MetaQuestUtils;
}
return isAndroidResult;
};