@mentra/engine 0.1.0-dev.1 → 3.1.0-beta.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -29
- package/build/bluetooth-sdk/debug.d.ts +2 -0
- package/build/bluetooth-sdk/debug.d.ts.map +1 -0
- package/build/bluetooth-sdk/debug.js +2 -0
- package/build/bluetooth-sdk/debug.js.map +1 -0
- package/build/bluetooth-sdk/index.d.ts +3 -0
- package/build/bluetooth-sdk/index.d.ts.map +1 -0
- package/build/bluetooth-sdk/index.js +3 -0
- package/build/bluetooth-sdk/index.js.map +1 -0
- package/build/bluetooth-sdk/ota-transport.d.ts +2 -0
- package/build/bluetooth-sdk/ota-transport.d.ts.map +1 -0
- package/build/bluetooth-sdk/ota-transport.js +2 -0
- package/build/bluetooth-sdk/ota-transport.js.map +1 -0
- package/build/bluetooth-sdk/photo-receiver.d.ts +3 -0
- package/build/bluetooth-sdk/photo-receiver.d.ts.map +1 -0
- package/build/bluetooth-sdk/photo-receiver.js +3 -0
- package/build/bluetooth-sdk/photo-receiver.js.map +1 -0
- package/build/bluetooth-sdk/react.d.ts +2 -0
- package/build/bluetooth-sdk/react.d.ts.map +1 -0
- package/build/bluetooth-sdk/react.js +2 -0
- package/build/bluetooth-sdk/react.js.map +1 -0
- package/build/bluetooth-sdk/types.d.ts +2 -0
- package/build/bluetooth-sdk/types.d.ts.map +1 -0
- package/build/bluetooth-sdk/types.js +2 -0
- package/build/bluetooth-sdk/types.js.map +1 -0
- package/build/engine.d.ts +18 -15
- package/build/engine.d.ts.map +1 -1
- package/build/engine.js +2 -2
- package/build/engine.js.map +1 -1
- package/build/facades/display.d.ts +1 -1
- package/build/facades/display.d.ts.map +1 -1
- package/build/facades/display.js +1 -1
- package/build/facades/display.js.map +1 -1
- package/build/facades/glasses.d.ts +3 -13
- package/build/facades/glasses.d.ts.map +1 -1
- package/build/facades/glasses.js +3 -3
- package/build/facades/glasses.js.map +1 -1
- package/build/facades/ota.d.ts +16 -22
- package/build/facades/ota.d.ts.map +1 -1
- package/build/facades/ota.js +13 -9
- package/build/facades/ota.js.map +1 -1
- package/build/facades/pairing.d.ts +8 -5
- package/build/facades/pairing.d.ts.map +1 -1
- package/build/facades/pairing.js +83 -9
- package/build/facades/pairing.js.map +1 -1
- package/build/facades/speech.d.ts +7 -6
- package/build/facades/speech.d.ts.map +1 -1
- package/build/facades/speech.js +1 -1
- package/build/facades/speech.js.map +1 -1
- package/build/generated/releaseMetadata.d.ts +12 -0
- package/build/generated/releaseMetadata.d.ts.map +1 -0
- package/build/generated/releaseMetadata.js +10 -0
- package/build/generated/releaseMetadata.js.map +1 -0
- package/build/index.d.ts +7 -8
- package/build/index.d.ts.map +1 -1
- package/build/index.js +4 -5
- package/build/index.js.map +1 -1
- package/build/react/MentraLiveOtaFlow.d.ts +8 -2
- package/build/react/MentraLiveOtaFlow.d.ts.map +1 -1
- package/build/react/MentraLiveOtaFlow.js +256 -354
- package/build/react/MentraLiveOtaFlow.js.map +1 -1
- package/build/react/index.d.ts +1 -0
- package/build/react/index.d.ts.map +1 -1
- package/build/react/index.js +1 -0
- package/build/react/index.js.map +1 -1
- package/build/react/useMentraLiveOta.d.ts +84 -0
- package/build/react/useMentraLiveOta.d.ts.map +1 -0
- package/build/react/useMentraLiveOta.js +627 -0
- package/build/react/useMentraLiveOta.js.map +1 -0
- package/build/services/AppRegistry.d.ts +8 -0
- package/build/services/AppRegistry.d.ts.map +1 -1
- package/build/services/AppRegistry.js +15 -0
- package/build/services/AppRegistry.js.map +1 -1
- package/build/services/BlobStore.d.ts +2 -0
- package/build/services/BlobStore.d.ts.map +1 -1
- package/build/services/BlobStore.js +63 -10
- package/build/services/BlobStore.js.map +1 -1
- package/build/services/DisplayProcessor.d.ts +3 -3
- package/build/services/DisplayProcessor.js +3 -3
- package/build/services/DisplayProcessor.js.map +1 -1
- package/build/services/GlassesStatusProjection.d.ts +15 -2
- package/build/services/GlassesStatusProjection.d.ts.map +1 -1
- package/build/services/GlassesStatusProjection.js +3 -3
- package/build/services/GlassesStatusProjection.js.map +1 -1
- package/build/services/HotspotOtaTransport.d.ts.map +1 -1
- package/build/services/HotspotOtaTransport.js +8 -7
- package/build/services/HotspotOtaTransport.js.map +1 -1
- package/build/services/LocalDisplayManager.d.ts +2 -3
- package/build/services/LocalDisplayManager.d.ts.map +1 -1
- package/build/services/LocalDisplayManager.js +2 -3
- package/build/services/LocalDisplayManager.js.map +1 -1
- package/build/services/OtaAutoChain.d.ts +9 -2
- package/build/services/OtaAutoChain.d.ts.map +1 -1
- package/build/services/OtaAutoChain.js +10 -2
- package/build/services/OtaAutoChain.js.map +1 -1
- package/build/services/OtaInstallCoordinator.d.ts +26 -3
- package/build/services/OtaInstallCoordinator.d.ts.map +1 -1
- package/build/services/OtaInstallCoordinator.js +38 -13
- package/build/services/OtaInstallCoordinator.js.map +1 -1
- package/build/services/OtaService.d.ts.map +1 -1
- package/build/services/OtaService.js +1 -1
- package/build/services/OtaService.js.map +1 -1
- package/build/services/OtaUpdateCheckService.d.ts +4 -1
- package/build/services/OtaUpdateCheckService.d.ts.map +1 -1
- package/build/services/OtaUpdateCheckService.js +33 -21
- package/build/services/OtaUpdateCheckService.js.map +1 -1
- package/build/services/PhonePhotoCoordinator.js +1 -1
- package/build/services/PhonePhotoCoordinator.js.map +1 -1
- package/build/services/PhoneStreamCoordinator.d.ts.map +1 -1
- package/build/services/PhoneStreamCoordinator.js +9 -6
- package/build/services/PhoneStreamCoordinator.js.map +1 -1
- package/build/services/StreamLifecycleController.d.ts +3 -3
- package/build/services/StreamLifecycleController.js +3 -3
- package/build/services/StreamLifecycleController.js.map +1 -1
- package/build/services/asg/localNetworkTransport.d.ts.map +1 -1
- package/build/services/asg/localNetworkTransport.js +13 -12
- package/build/services/asg/localNetworkTransport.js.map +1 -1
- package/build/services/glassesClockSync.d.ts.map +1 -1
- package/build/services/glassesClockSync.js +5 -1
- package/build/services/glassesClockSync.js.map +1 -1
- package/build/services/otaDisplayState.d.ts +1 -1
- package/build/services/otaDisplayState.d.ts.map +1 -1
- package/build/services/otaDisplayState.js.map +1 -1
- package/build/services/otaInstallPolicy.d.ts +5 -1
- package/build/services/otaInstallPolicy.d.ts.map +1 -1
- package/build/services/otaInstallPolicy.js +4 -0
- package/build/services/otaInstallPolicy.js.map +1 -1
- package/build/services/otaLegacyMapping.d.ts +1 -1
- package/build/services/otaLegacyMapping.d.ts.map +1 -1
- package/build/services/otaLegacyMapping.js.map +1 -1
- package/build/services/otaManifestPolicy.d.ts +14 -0
- package/build/services/otaManifestPolicy.d.ts.map +1 -0
- package/build/services/otaManifestPolicy.js +19 -0
- package/build/services/otaManifestPolicy.js.map +1 -0
- package/build/services/otaManifestUrl.d.ts +2 -1
- package/build/services/otaManifestUrl.d.ts.map +1 -1
- package/build/services/otaManifestUrl.js +24 -32
- package/build/services/otaManifestUrl.js.map +1 -1
- package/build/services/otaReleaseVersion.d.ts +10 -0
- package/build/services/otaReleaseVersion.d.ts.map +1 -0
- package/build/services/otaReleaseVersion.js +14 -0
- package/build/services/otaReleaseVersion.js.map +1 -0
- package/build/stores/appVisibility.d.ts +3 -0
- package/build/stores/appVisibility.d.ts.map +1 -0
- package/build/stores/appVisibility.js +3 -0
- package/build/stores/appVisibility.js.map +1 -0
- package/build/stores/apps.d.ts.map +1 -1
- package/build/stores/apps.js +7 -1
- package/build/stores/apps.js.map +1 -1
- package/build/stores/core.d.ts +3 -3
- package/build/stores/core.d.ts.map +1 -1
- package/build/stores/core.js.map +1 -1
- package/build/stores/glasses.d.ts +10 -4
- package/build/stores/glasses.d.ts.map +1 -1
- package/build/stores/glasses.js.map +1 -1
- package/build/stores/settings.js +3 -3
- package/build/stores/settings.js.map +1 -1
- package/build/types/applet.d.ts +1 -1
- package/build/types/applet.js +1 -1
- package/build/types/applet.js.map +1 -1
- package/build/types/capabilities/even-realities-g1.d.ts.map +1 -1
- package/build/types/capabilities/even-realities-g1.js +2 -0
- package/build/types/capabilities/even-realities-g1.js.map +1 -1
- package/build/types/capabilities/even-realities-g2.d.ts.map +1 -1
- package/build/types/capabilities/even-realities-g2.js +2 -0
- package/build/types/capabilities/even-realities-g2.js.map +1 -1
- package/build/types/capabilities/mentra-display.d.ts.map +1 -1
- package/build/types/capabilities/mentra-display.js +2 -0
- package/build/types/capabilities/mentra-display.js.map +1 -1
- package/build/types/capabilities/mentra-live.d.ts.map +1 -1
- package/build/types/capabilities/mentra-live.js +2 -0
- package/build/types/capabilities/mentra-live.js.map +1 -1
- package/build/types/capabilities/nimo.d.ts +9 -0
- package/build/types/capabilities/nimo.d.ts.map +1 -0
- package/build/types/capabilities/nimo.js +57 -0
- package/build/types/capabilities/nimo.js.map +1 -0
- package/build/types/capabilities/none.d.ts.map +1 -1
- package/build/types/capabilities/none.js +2 -0
- package/build/types/capabilities/none.js.map +1 -1
- package/build/types/capabilities/simulated-glasses.d.ts.map +1 -1
- package/build/types/capabilities/simulated-glasses.js +2 -0
- package/build/types/capabilities/simulated-glasses.js.map +1 -1
- package/build/types/capabilities/vuzix-z100.d.ts.map +1 -1
- package/build/types/capabilities/vuzix-z100.js +2 -0
- package/build/types/capabilities/vuzix-z100.js.map +1 -1
- package/build/types/enums.d.ts +3 -26
- package/build/types/enums.d.ts.map +1 -1
- package/build/types/enums.js +2 -27
- package/build/types/enums.js.map +1 -1
- package/build/types/hardware.d.ts +6 -15
- package/build/types/hardware.d.ts.map +1 -1
- package/build/types/hardware.js +4 -4
- package/build/types/hardware.js.map +1 -1
- package/build/types/index.d.ts +3 -7
- package/build/types/index.d.ts.map +1 -1
- package/build/types/index.js +3 -7
- package/build/types/index.js.map +1 -1
- package/build/utils/display/composer/ColumnComposer.d.ts +1 -1
- package/build/utils/display/composer/ColumnComposer.js +1 -1
- package/build/utils/display/composer/ColumnComposer.js.map +1 -1
- package/package.json +47 -22
- package/src/bluetooth-sdk/debug.ts +1 -0
- package/src/bluetooth-sdk/index.ts +2 -0
- package/src/bluetooth-sdk/ota-transport.ts +1 -0
- package/src/bluetooth-sdk/photo-receiver.ts +2 -0
- package/src/bluetooth-sdk/react.ts +1 -0
- package/src/bluetooth-sdk/types.ts +1 -0
- package/src/engine.ts +2 -2
- package/src/facades/display.ts +1 -1
- package/src/facades/glasses.ts +4 -4
- package/src/facades/ota.ts +23 -10
- package/src/facades/pairing.ts +92 -16
- package/src/facades/speech.ts +21 -7
- package/src/generated/releaseMetadata.ts +20 -0
- package/src/index.ts +16 -11
- package/src/react/MentraLiveOtaFlow.tsx +378 -480
- package/src/react/index.ts +14 -0
- package/src/react/useMentraLiveOta.ts +793 -0
- package/src/services/AppRegistry.ts +16 -0
- package/src/services/BlobStore.ts +57 -10
- package/src/services/DisplayProcessor.ts +3 -3
- package/src/services/GlassesStatusProjection.ts +7 -6
- package/src/services/HotspotOtaTransport.ts +8 -7
- package/src/services/LocalDisplayManager.ts +2 -3
- package/src/services/OtaAutoChain.ts +26 -2
- package/src/services/OtaInstallCoordinator.ts +40 -13
- package/src/services/OtaService.ts +1 -2
- package/src/services/OtaUpdateCheckService.ts +45 -27
- package/src/services/PhonePhotoCoordinator.ts +1 -1
- package/src/services/PhoneStreamCoordinator.ts +10 -6
- package/src/services/StreamLifecycleController.ts +3 -3
- package/src/services/asg/localNetworkTransport.ts +20 -19
- package/src/services/glassesClockSync.ts +5 -1
- package/src/services/otaDisplayState.ts +1 -1
- package/src/services/otaInstallPolicy.ts +5 -1
- package/src/services/otaLegacyMapping.ts +1 -1
- package/src/services/otaManifestPolicy.ts +42 -0
- package/src/services/otaManifestUrl.ts +27 -36
- package/src/services/otaReleaseVersion.ts +22 -0
- package/src/stores/appVisibility.ts +3 -0
- package/src/stores/apps.ts +7 -1
- package/src/stores/core.ts +4 -4
- package/src/stores/glasses.ts +13 -6
- package/src/stores/settings.ts +3 -3
- package/src/types/applet.ts +1 -1
- package/src/types/capabilities/even-realities-g1.ts +3 -0
- package/src/types/capabilities/even-realities-g2.ts +3 -0
- package/src/types/capabilities/mentra-display.ts +3 -0
- package/src/types/capabilities/mentra-live.ts +3 -0
- package/src/types/capabilities/nimo.ts +59 -0
- package/src/types/capabilities/none.ts +3 -0
- package/src/types/capabilities/simulated-glasses.ts +3 -0
- package/src/types/capabilities/vuzix-z100.ts +3 -0
- package/src/types/enums.ts +2 -27
- package/src/types/hardware.ts +7 -15
- package/src/types/index.ts +3 -6
- package/src/utils/display/composer/ColumnComposer.ts +1 -1
- package/build/devtools.d.ts +0 -11
- package/build/devtools.d.ts.map +0 -1
- package/build/devtools.js +0 -13
- package/build/devtools.js.map +0 -1
- package/build/internal.d.ts +0 -67
- package/build/internal.d.ts.map +0 -1
- package/build/internal.js +0 -90
- package/build/internal.js.map +0 -1
- package/src/devtools.ts +0 -13
- package/src/internal.ts +0 -160
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
* state written mid-pass queues a follow-up pass — the same way a setState
|
|
18
18
|
* during React effects scheduled a re-render after the current effect batch.
|
|
19
19
|
*/
|
|
20
|
-
import BluetoothSdk from "@mentra/bluetooth-sdk
|
|
20
|
+
import BluetoothSdk from "@mentra/bluetooth-sdk";
|
|
21
21
|
import GlobalEventEmitter from "../utils/GlobalEventEmitter";
|
|
22
22
|
import { isGlassesConnected, useGlassesStore } from "../stores/glasses";
|
|
23
23
|
import { resolveOtaManifestUrl } from "./otaManifestUrl";
|
|
24
24
|
import { hotspotOtaTransport } from "./HotspotOtaTransport";
|
|
25
25
|
import { deriveDisplayState } from "./otaDisplayState";
|
|
26
|
-
import { BES_CONTINUE_LOCKOUT_MS, DOWNLOAD_STUCK_TIMEOUT_MS, GLOBAL_OTA_TIMEOUT_MS, LEGACY_APK_COMPLETION_SETTLE_MS, LEGACY_BES_CONTINUE_LOCKOUT_MS, LEGACY_DOWNLOAD_STUCK_TIMEOUT_MS, LEGACY_GLOBAL_OTA_TIMEOUT_MS, LEGACY_MTK_INSTALL_TIMEOUT_MS, LEGACY_MTK_SIM_CAP_PERCENT, LEGACY_MTK_SIM_FLOOR_PERCENT, LEGACY_MTK_SIM_TICK_MS, LEGACY_MTK_STALL_DETECT_MS, LEGACY_MTK_STALL_ZONE_MAX_PERCENT, LEGACY_MTK_STALL_ZONE_MIN_PERCENT, LEGACY_PING_INTERVAL_MS, LEGACY_PROGRESS_TIMEOUT_MS, LEGACY_RETRY_INTERVAL_MS, MAX_RETRIES, MTK_INSTALL_TIMEOUT_MS, OtaProgressMessages, PING_INTERVAL_MS, PROGRESS_TIMEOUT_MS, QUERY_REPLY_TIMEOUT_MS, RETRY_INTERVAL_MS, isLegacyShapedOtaSession, isLegacyShapedOtaStatus, selectOtaProtocolProfile, } from "./otaInstallPolicy";
|
|
26
|
+
import { BES_CONTINUE_LOCKOUT_MS, BES_RESTART_TIMEOUT_MS, DOWNLOAD_STUCK_TIMEOUT_MS, GLOBAL_OTA_TIMEOUT_MS, LEGACY_APK_COMPLETION_SETTLE_MS, LEGACY_BES_CONTINUE_LOCKOUT_MS, LEGACY_BES_RESTART_TIMEOUT_MS, LEGACY_DOWNLOAD_STUCK_TIMEOUT_MS, LEGACY_GLOBAL_OTA_TIMEOUT_MS, LEGACY_MTK_INSTALL_TIMEOUT_MS, LEGACY_MTK_SIM_CAP_PERCENT, LEGACY_MTK_SIM_FLOOR_PERCENT, LEGACY_MTK_SIM_TICK_MS, LEGACY_MTK_STALL_DETECT_MS, LEGACY_MTK_STALL_ZONE_MAX_PERCENT, LEGACY_MTK_STALL_ZONE_MIN_PERCENT, LEGACY_PING_INTERVAL_MS, LEGACY_PROGRESS_TIMEOUT_MS, LEGACY_RETRY_INTERVAL_MS, MAX_RETRIES, MTK_INSTALL_TIMEOUT_MS, OtaProgressMessages, PING_INTERVAL_MS, PROGRESS_TIMEOUT_MS, QUERY_REPLY_TIMEOUT_MS, RETRY_INTERVAL_MS, isLegacyShapedOtaSession, isLegacyShapedOtaStatus, selectOtaProtocolProfile, } from "./otaInstallPolicy";
|
|
27
27
|
function isTerminalForWatchdog(d) {
|
|
28
28
|
return d === "complete" || d === "failed" || d === "restarting";
|
|
29
29
|
}
|
|
@@ -156,6 +156,7 @@ class OtaInstallCoordinator {
|
|
|
156
156
|
pingInterval = null;
|
|
157
157
|
queryReplyTimeout = null;
|
|
158
158
|
continueLockoutTimer = null;
|
|
159
|
+
restartRecoveryTimeout = null;
|
|
159
160
|
legacyApkSettleTimer = null;
|
|
160
161
|
mtkStallDetectTimer = null;
|
|
161
162
|
mtkSimTickTimer = null;
|
|
@@ -306,7 +307,7 @@ class OtaInstallCoordinator {
|
|
|
306
307
|
void this.sendOtaStartWithWatchdogs();
|
|
307
308
|
}
|
|
308
309
|
else {
|
|
309
|
-
void BluetoothSdk.
|
|
310
|
+
void BluetoothSdk.queryOtaStatus().catch(() => { });
|
|
310
311
|
this.armQueryReplyFallback("retry");
|
|
311
312
|
}
|
|
312
313
|
}
|
|
@@ -349,16 +350,17 @@ class OtaInstallCoordinator {
|
|
|
349
350
|
* stays in the screen): clear the selected update, and after an APK step
|
|
350
351
|
* clear the stale build number so the next check re-reads version_info.
|
|
351
352
|
*/
|
|
352
|
-
finish() {
|
|
353
|
+
async finish() {
|
|
353
354
|
if (this.otaStartOwnership?.outcome !== "pending") {
|
|
354
355
|
this.otaStartOwnership = null;
|
|
355
356
|
}
|
|
356
357
|
useGlassesStore.getState().setOtaUpdateAvailable(null);
|
|
357
358
|
if (this.apkStepSeen) {
|
|
358
|
-
BluetoothSdk.updateGlasses({ buildNumber: "" });
|
|
359
359
|
useGlassesStore.getState().setGlassesInfo({ buildNumber: "" });
|
|
360
360
|
}
|
|
361
|
-
|
|
361
|
+
// The post-install check needs internet again. Do not let callers leave the
|
|
362
|
+
// terminal screen while Android still owns the no-internet hotspot route.
|
|
363
|
+
await this.teardownHotspotTransport();
|
|
362
364
|
}
|
|
363
365
|
/**
|
|
364
366
|
* Abandon an interrupted session (the super-mode skip): terminal cleanup
|
|
@@ -366,8 +368,8 @@ class OtaInstallCoordinator {
|
|
|
366
368
|
* deriveDisplayState doesn't resurrect the stale install when the host
|
|
367
369
|
* navigates away and back through /ota routes.
|
|
368
370
|
*/
|
|
369
|
-
discard() {
|
|
370
|
-
this.finish();
|
|
371
|
+
async discard() {
|
|
372
|
+
await this.finish();
|
|
371
373
|
const store = useGlassesStore.getState();
|
|
372
374
|
store.setOtaStatus(null);
|
|
373
375
|
store.setOtaProgress(null);
|
|
@@ -403,6 +405,7 @@ class OtaInstallCoordinator {
|
|
|
403
405
|
versionChangePhase: this.deriveVersionChangePhase(connected),
|
|
404
406
|
hotspotPhase: this.hotspotPhase,
|
|
405
407
|
hotspotArtifactPercent: this.hotspotArtifactPercent,
|
|
408
|
+
transport: this.selectedTransport,
|
|
406
409
|
};
|
|
407
410
|
}
|
|
408
411
|
/**
|
|
@@ -848,12 +851,24 @@ class OtaInstallCoordinator {
|
|
|
848
851
|
// (15s unified, 35s for legacy-shaped sessions — WP 8C-f).
|
|
849
852
|
if (displayStateChanged && displayState === "restarting") {
|
|
850
853
|
this.clearContinueLockoutTimer();
|
|
854
|
+
this.clearRestartRecoveryTimeout();
|
|
851
855
|
const lockoutMs = legacySession ? LEGACY_BES_CONTINUE_LOCKOUT_MS : BES_CONTINUE_LOCKOUT_MS;
|
|
856
|
+
const restartTimeoutMs = legacySession ? LEGACY_BES_RESTART_TIMEOUT_MS : BES_RESTART_TIMEOUT_MS;
|
|
852
857
|
this.setContinueButtonDisabled(true);
|
|
853
858
|
this.continueLockoutTimer = setTimeout(() => {
|
|
854
859
|
this.continueLockoutTimer = null;
|
|
855
860
|
this.setContinueButtonDisabled(false);
|
|
856
861
|
}, lockoutMs);
|
|
862
|
+
this.restartRecoveryTimeout = setTimeout(() => {
|
|
863
|
+
this.restartRecoveryTimeout = null;
|
|
864
|
+
if (this.computeDisplayStateNow() !== "restarting")
|
|
865
|
+
return;
|
|
866
|
+
console.log(`[OTA_PROGRESS] watchdog: glasses did not finish restarting in ${restartTimeoutMs}ms`);
|
|
867
|
+
this.setErrorMsg(OtaProgressMessages.restartTimeout);
|
|
868
|
+
}, restartTimeoutMs);
|
|
869
|
+
}
|
|
870
|
+
else if (displayStateChanged) {
|
|
871
|
+
this.clearRestartRecoveryTimeout();
|
|
857
872
|
}
|
|
858
873
|
// Legacy MTK install stall simulation (WP 8C-e): display-only. The simulation
|
|
859
874
|
// timers only ever touch the projected snapshot percent — they never feed back
|
|
@@ -908,7 +923,7 @@ class OtaInstallCoordinator {
|
|
|
908
923
|
if (this.otaStartOwnership?.outcome === "pending") {
|
|
909
924
|
void this.sendOtaStartWithWatchdogs();
|
|
910
925
|
}
|
|
911
|
-
void BluetoothSdk.
|
|
926
|
+
void BluetoothSdk.queryOtaStatus().catch(() => { });
|
|
912
927
|
this.armQueryReplyFallback("reconnect");
|
|
913
928
|
return true;
|
|
914
929
|
}
|
|
@@ -946,7 +961,7 @@ class OtaInstallCoordinator {
|
|
|
946
961
|
if (noSessionYet) {
|
|
947
962
|
if (!isIdleStatus && this.otaStartOwnership?.outcome === "acknowledged") {
|
|
948
963
|
console.log("[OTA_PROGRESS] initial mount, acknowledged session has no cached status — reconciling");
|
|
949
|
-
void BluetoothSdk.
|
|
964
|
+
void BluetoothSdk.queryOtaStatus().catch(() => { });
|
|
950
965
|
this.armQueryReplyFallback("initial-mount");
|
|
951
966
|
return;
|
|
952
967
|
}
|
|
@@ -961,7 +976,7 @@ class OtaInstallCoordinator {
|
|
|
961
976
|
}
|
|
962
977
|
else {
|
|
963
978
|
console.log("[OTA_PROGRESS] initial mount, session exists, sending ota_query_status");
|
|
964
|
-
void BluetoothSdk.
|
|
979
|
+
void BluetoothSdk.queryOtaStatus().catch(() => { });
|
|
965
980
|
this.armQueryReplyFallback("initial-mount");
|
|
966
981
|
}
|
|
967
982
|
}
|
|
@@ -988,7 +1003,7 @@ class OtaInstallCoordinator {
|
|
|
988
1003
|
this.clearProgressTimeout();
|
|
989
1004
|
this.onFirstActivity();
|
|
990
1005
|
this.onFirstNonZeroProgress();
|
|
991
|
-
void BluetoothSdk.
|
|
1006
|
+
void BluetoothSdk.queryOtaStatus().catch(() => { });
|
|
992
1007
|
useGlassesStore.getState().setMtkUpdatedThisSession(true);
|
|
993
1008
|
};
|
|
994
1009
|
// --- legacy (< 37) compatibility, ported from progress-legacy.tsx (WP 8C) ---
|
|
@@ -1148,7 +1163,7 @@ class OtaInstallCoordinator {
|
|
|
1148
1163
|
const s = useGlassesStore.getState().otaStatus;
|
|
1149
1164
|
if (s?.stepType === "apk" && s.phase === "install" && s.status === "in_progress") {
|
|
1150
1165
|
this.apkInstallPollInFlight = true;
|
|
1151
|
-
void BluetoothSdk.
|
|
1166
|
+
void BluetoothSdk.queryOtaStatus()
|
|
1152
1167
|
.catch(() => { })
|
|
1153
1168
|
.finally(() => {
|
|
1154
1169
|
this.apkInstallPollInFlight = false;
|
|
@@ -1290,6 +1305,9 @@ class OtaInstallCoordinator {
|
|
|
1290
1305
|
otaVersionUrl = this.hotspotManifestUrl;
|
|
1291
1306
|
this.maybeArmStuckWatchdog();
|
|
1292
1307
|
}
|
|
1308
|
+
if (!otaVersionUrl) {
|
|
1309
|
+
throw new Error("OTA is disabled because this build has no immutable manifest pin");
|
|
1310
|
+
}
|
|
1293
1311
|
console.log(`[OTA_PROGRESS] sending ota_start with ${this.selectedTransport} manifest URL: ${otaVersionUrl}`);
|
|
1294
1312
|
nativeStartAttempted = true;
|
|
1295
1313
|
await BluetoothSdk.startOtaUpdate(otaVersionUrl);
|
|
@@ -1449,6 +1467,12 @@ class OtaInstallCoordinator {
|
|
|
1449
1467
|
this.continueLockoutTimer = null;
|
|
1450
1468
|
}
|
|
1451
1469
|
}
|
|
1470
|
+
clearRestartRecoveryTimeout() {
|
|
1471
|
+
if (this.restartRecoveryTimeout) {
|
|
1472
|
+
clearTimeout(this.restartRecoveryTimeout);
|
|
1473
|
+
this.restartRecoveryTimeout = null;
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1452
1476
|
clearLegacyApkSettleTimer() {
|
|
1453
1477
|
if (this.legacyApkSettleTimer) {
|
|
1454
1478
|
clearTimeout(this.legacyApkSettleTimer);
|
|
@@ -1484,6 +1508,7 @@ class OtaInstallCoordinator {
|
|
|
1484
1508
|
this.clearPingInterval();
|
|
1485
1509
|
this.clearLegacyApkSettleTimer();
|
|
1486
1510
|
this.clearMtkSimulationTimers();
|
|
1511
|
+
this.clearRestartRecoveryTimeout();
|
|
1487
1512
|
}
|
|
1488
1513
|
}
|
|
1489
1514
|
/** Singleton — one install session machine per app process (matches the single progress screen). */
|