2026-09-11 10:30:06 +00:00
|
|
|
// Module ID: 10072
|
|
|
|
|
// Function ID: 10073
|
2026-09-10 05:38:07 +00:00
|
|
|
// Name: MobileVoiceOverlayStore
|
2026-09-05 10:56:28 +00:00
|
|
|
// Dependencies: [1074, 1242, 1115, 1608, 504, 573, 2]
|
2026-07-29 08:29:29 +00:00
|
|
|
// Exports: isMobileOverlaySupported
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-09-11 10:30:06 +00:00
|
|
|
// Module 10072 (MobileVoiceOverlayStore)
|
2026-09-05 10:56:28 +00:00
|
|
|
import initializeDefault from "initialize" /* 504 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import DispatcherDefault from "Dispatcher" /* 573 */;
|
|
|
|
|
import Constants from "Constants" /* 1074 */;
|
|
|
|
|
import PlatformUtils from "PlatformUtils" /* 1115 */;
|
|
|
|
|
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1242 */;
|
|
|
|
|
import MetaQuestUtils from "MetaQuestUtils" /* 1608 */;
|
|
|
|
|
import size from "module_2" /* 2 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
const AnalyticEvents = Constants.AnalyticEvents;
|
|
|
|
|
let enabled = false;
|
2026-08-24 06:08:38 +00:00
|
|
|
const DeviceSettingsStore = initializeDefault.DeviceSettingsStore;
|
2026-07-29 08:29:29 +00:00
|
|
|
class MobileVoiceOverlayStore extends DeviceSettingsStore {
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
const prototype = MobileVoiceOverlayStore.prototype;
|
|
|
|
|
prototype["getUserAgnosticState"] = function getUserAgnosticState() {
|
2026-09-10 05:38:07 +00:00
|
|
|
return { enabled };
|
2026-07-29 08:29:29 +00:00
|
|
|
};
|
|
|
|
|
prototype["initialize"] = function initialize(enabled) {
|
|
|
|
|
let flag;
|
|
|
|
|
if (enabled != null) {
|
|
|
|
|
flag = enabled.enabled;
|
|
|
|
|
}
|
|
|
|
|
if (flag == null) {
|
|
|
|
|
flag = false;
|
|
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
enabled = flag;
|
2026-07-29 08:29:29 +00:00
|
|
|
};
|
|
|
|
|
prototype["getEnabled"] = function getEnabled() {
|
2026-09-10 05:38:07 +00:00
|
|
|
let isAndroidResult = PlatformUtils.isAndroid();
|
2026-07-20 16:05:17 +00:00
|
|
|
if (isAndroidResult) {
|
2026-09-10 05:38:07 +00:00
|
|
|
isAndroidResult = !MetaQuestUtils.isMetaQuest();
|
|
|
|
|
const tmpResult = MetaQuestUtils;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
if (isAndroidResult) {
|
2026-09-10 05:38:07 +00:00
|
|
|
isAndroidResult = enabled;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
return isAndroidResult;
|
|
|
|
|
};
|
|
|
|
|
MobileVoiceOverlayStore.displayName = "MobileVoiceOverlayStore";
|
|
|
|
|
MobileVoiceOverlayStore.persistKey = "MobileVoiceOverlayStore";
|
2026-09-10 05:38:07 +00:00
|
|
|
const mobileVoiceOverlayStore = new MobileVoiceOverlayStore(DispatcherDefault, {
|
2026-07-20 16:05:17 +00:00
|
|
|
MOBILE_VOICE_OVERLAY_STATE_CHANGED: function handleMobileVoiceOverlayStateChanged(enabled) {
|
2026-09-10 05:38:07 +00:00
|
|
|
AnalyticsUtilsDefault.track(AnalyticEvents.MOBILE_OVERLAY_TOGGLED, { enabled: enabled.enabled });
|
2026-07-20 16:05:17 +00:00
|
|
|
enabled = enabled.enabled;
|
|
|
|
|
}
|
|
|
|
|
});
|
2026-09-10 05:38:07 +00:00
|
|
|
const result = size.fileFinishedImporting("stores/native/MobileVoiceOverlayStore.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
export default mobileVoiceOverlayStore;
|
|
|
|
|
export const isMobileOverlaySupported = function isMobileOverlaySupported() {
|
2026-09-10 05:38:07 +00:00
|
|
|
let isAndroidResult = PlatformUtils.isAndroid();
|
2026-07-29 08:29:29 +00:00
|
|
|
if (isAndroidResult) {
|
2026-09-10 05:38:07 +00:00
|
|
|
isAndroidResult = !MetaQuestUtils.isMetaQuest();
|
|
|
|
|
const tmpResult = MetaQuestUtils;
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
return isAndroidResult;
|
|
|
|
|
};
|