@mentra/bluetooth-sdk 3.3.0-dev.421 → 3.3.0-dev.422

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.
Files changed (33) hide show
  1. package/android/src/main/java/com/mentra/bluetoothsdk/BluetoothSdkModule.kt +0 -7
  2. package/android/src/main/java/com/mentra/bluetoothsdk/Bridge.kt +3 -17
  3. package/android/src/main/java/com/mentra/bluetoothsdk/GeneratedReleaseMetadata.kt +5 -5
  4. package/android/src/main/java/com/mentra/bluetoothsdk/MentraBluetoothSdk.kt +0 -11
  5. package/android/src/main/java/com/mentra/bluetoothsdk/services/Foreground.kt +0 -21
  6. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/MentraLive.kt +31 -213
  7. package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/SerializedGattCallback.kt +2 -13
  8. package/android/src/main/java/com/mentra/bluetoothsdk/utils/MessageChunkReassembler.java +6 -41
  9. package/build/BluetoothSdk.types.d.ts +0 -10
  10. package/build/BluetoothSdk.types.d.ts.map +1 -1
  11. package/build/BluetoothSdk.types.js.map +1 -1
  12. package/build/_private/BluetoothSdkModule.d.ts +0 -9
  13. package/build/_private/BluetoothSdkModule.d.ts.map +1 -1
  14. package/build/_private/BluetoothSdkModule.js +0 -2
  15. package/build/_private/BluetoothSdkModule.js.map +1 -1
  16. package/build/generated/releaseMetadata.js +5 -5
  17. package/build/generated/releaseMetadata.js.map +1 -1
  18. package/ios/Source/BluetoothSdkDefaults.swift +1 -1
  19. package/ios/Source/GeneratedReleaseMetadata.swift +5 -5
  20. package/package.json +2 -2
  21. package/src/BluetoothSdk.types.ts +0 -10
  22. package/src/_private/BluetoothSdkModule.ts +0 -13
  23. package/src/generated/releaseMetadata.ts +5 -5
  24. package/android/src/main/java/com/mentra/bluetoothsdk/debug/BleEvidenceLog.kt +0 -454
  25. package/android/src/test/java/com/mentra/bluetoothsdk/WifiScanEvidenceTest.kt +0 -117
  26. package/android/src/test/java/com/mentra/bluetoothsdk/debug/BleEvidenceLogTest.kt +0 -282
  27. package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/MentraLiveEvidenceTest.kt +0 -603
  28. package/android/src/test/java/com/mentra/bluetoothsdk/utils/MessageChunkReassemblerOriginTest.kt +0 -51
  29. package/build/_private/diagnosticRender.d.ts +0 -12
  30. package/build/_private/diagnosticRender.d.ts.map +0 -1
  31. package/build/_private/diagnosticRender.js +0 -27
  32. package/build/_private/diagnosticRender.js.map +0 -1
  33. package/src/_private/diagnosticRender.ts +0 -35
@@ -4,7 +4,6 @@ package com.mentra.bluetoothsdk
4
4
 
5
5
  import androidx.lifecycle.Lifecycle
6
6
  import androidx.lifecycle.LifecycleOwner
7
- import com.mentra.bluetoothsdk.debug.BleEvidenceLog
8
7
  import com.mentra.bluetoothsdk.debug.BleTraceLogger
9
8
  import com.mentra.bluetoothsdk.utils.DeviceTypes
10
9
  import com.mentra.bluetoothsdk.utils.audio.PcmStreamManager
@@ -633,12 +632,6 @@ class BluetoothSdkModule : Module() {
633
632
  deviceManager?.sendPhoneNotification(notification)
634
633
  }
635
634
 
636
- // Diagnostic correlation of committed UI state with native provenance ids. Accepts only
637
- // allowlisted surfaces and bounded integers; returns false for anything else.
638
- Function("reportDiagnosticRender") { surface: String, eventIds: List<String>, value: Int? ->
639
- BleEvidenceLog.uiRender(surface, eventIds, value)
640
- }
641
-
642
635
  // MARK: - WiFi Commands
643
636
 
644
637
  SdkCoroutineFunction("requestWifiScan") { -> requireSdk().requestWifiScan().map { it.toMap() } }
@@ -9,7 +9,6 @@ package com.mentra.bluetoothsdk
9
9
 
10
10
  import android.util.Base64
11
11
  import android.util.Log
12
- import com.mentra.bluetoothsdk.debug.BleEvidenceLog
13
12
  import com.mentra.bluetoothsdk.debug.BleTraceLogger
14
13
  import java.util.HashMap
15
14
  import java.util.UUID
@@ -249,18 +248,13 @@ public class Bridge private constructor() {
249
248
  sendTypedMessage("speaking_status", body as Map<String, Any>)
250
249
  }
251
250
 
252
- /**
253
- * Send battery status. [eventId] is the opaque native provenance id of the decoded
254
- * notification (see BleEvidenceLog); it is diagnostic only.
255
- */
251
+ /** Send battery status */
256
252
  @JvmStatic
257
- @JvmOverloads
258
- fun sendBatteryStatus(level: Int, charging: Boolean, eventId: String? = null) {
253
+ fun sendBatteryStatus(level: Int, charging: Boolean) {
259
254
  val body = HashMap<String, Any>()
260
255
  body["level"] = level
261
256
  body["charging"] = charging
262
257
  body["timestamp"] = System.currentTimeMillis()
263
- if (eventId != null) body["eventId"] = eventId
264
258
  sendTypedMessage("battery_status", body as Map<String, Any>)
265
259
  }
266
260
 
@@ -702,12 +696,10 @@ public class Bridge private constructor() {
702
696
 
703
697
  /** Send WiFi scan results */
704
698
  @JvmStatic
705
- @JvmOverloads
706
699
  fun updateWifiScanResults(
707
700
  networks: List<Map<String, Any>>,
708
701
  scanComplete: Boolean,
709
- scanId: String? = null,
710
- eventId: String? = null
702
+ scanId: String? = null
711
703
  ) {
712
704
  // Only chunks echoing the active scanId claimed at request time may mutate
713
705
  // the store; foreign chunks are still forwarded to the SDK sink, which
@@ -745,9 +737,6 @@ public class Bridge private constructor() {
745
737
  if (scanId != null) {
746
738
  body["scanId"] = scanId
747
739
  }
748
- if (eventId != null) {
749
- body["eventId"] = eventId
750
- }
751
740
  sendTypedMessage("wifi_scan_result", body)
752
741
  }
753
742
 
@@ -941,9 +930,6 @@ public class Bridge private constructor() {
941
930
 
942
931
  try {
943
932
  val sinks = getEventSinks()
944
- (mutableBody["eventId"] as? String)?.let {
945
- BleEvidenceLog.bridgeDispatch(it, type, sinks.size)
946
- }
947
933
  if (sinks.isEmpty()) {
948
934
  Log.w(
949
935
  TAG,
@@ -3,9 +3,9 @@ package com.mentra.bluetoothsdk
3
3
  /** Generated by release CI. Do not edit in a release checkout. */
4
4
  internal object GeneratedReleaseMetadata {
5
5
  const val FAMILY_BASE_VERSION: String = "3.3.0"
6
- const val RELEASE_IDENTITY: String = "3.3.0-dev.421"
7
- const val RELEASE_SET_ID: String = "mentra-3.3.0-dev.421"
8
- const val SOURCE_COMMIT: String = "0b80a3c5c01206548775f1d149dae7150bf4c7ea"
9
- const val OTA_MANIFEST_URL: String = "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.3.0/mentra-live-ota-3.3.0-dev.421.json"
10
- const val OTA_MANIFEST_SHA256: String = "b62d3567ba6482cca927c0a2425157473bc089c22aeb24197a89729e518a5243"
6
+ const val RELEASE_IDENTITY: String = "3.3.0-dev.422"
7
+ const val RELEASE_SET_ID: String = "mentra-3.3.0-dev.422"
8
+ const val SOURCE_COMMIT: String = "c127f9513040deb147b1254a80324b2cb514fe06"
9
+ const val OTA_MANIFEST_URL: String = "https://artifactscdn.mentraglass.com/Mentra-Community/MentraOS/releases/mentra-builds-v3.3.0/mentra-live-ota-3.3.0-dev.422.json"
10
+ const val OTA_MANIFEST_SHA256: String = "cb98f34ef348f0cbb7812d19338021c9509c77a501d0468130258cedad7fa3df"
11
11
  }
@@ -8,7 +8,6 @@ import android.content.Context
8
8
  import android.os.Bundle
9
9
  import android.os.Handler
10
10
  import android.os.Looper
11
- import com.mentra.bluetoothsdk.debug.BleEvidenceLog
12
11
  import com.mentra.bluetoothsdk.streaming.StreamSessionState
13
12
  import com.mentra.bluetoothsdk.utils.ControllerTypes
14
13
  import com.mentra.bluetoothsdk.utils.PhoneAudioMonitor
@@ -886,8 +885,6 @@ class MentraBluetoothSdk private constructor(
886
885
  if (existing != null) {
887
886
  // Join the in-flight scan instead of failing with request_in_flight;
888
887
  // the scan screen auto-starts a scan on mount and can be pushed twice.
889
- // A joined caller did not start a scan; its results belong to the older request.
890
- BleEvidenceLog.scanRequest(existing.scanId, fresh = false)
891
888
  try {
892
889
  return existing.pending.await(WIFI_SCAN_TIMEOUT_MS)
893
890
  } finally {
@@ -899,7 +896,6 @@ class MentraBluetoothSdk private constructor(
899
896
  // out, so a delayed chunk from an older, abandoned scan can no longer
900
897
  // mutate it.
901
898
  Bridge.claimWifiScanResults(request.scanId)
902
- BleEvidenceLog.scanRequest(request.scanId, fresh = true)
903
899
  deviceManager.requestWifiScan(request.scanId)
904
900
  // The glasses wait up to 15s for scan-results broadcasts before sending
905
901
  // scan_complete, so give them longer than that before falling back.
@@ -914,14 +910,9 @@ class MentraBluetoothSdk private constructor(
914
910
  val fallbackResults = synchronized(oneShotLock) { request.latestResults }
915
911
  if (fallbackResults.isNotEmpty()) {
916
912
  // Resolve so callers joined on the same scan get the fallback too.
917
- // Partial results never count as a completed scan.
918
- BleEvidenceLog.scanTerminal(request.scanId, "timeout_partial", fallbackResults.size)
919
913
  pending.resolve(fallbackResults)
920
914
  return fallbackResults
921
915
  }
922
- BleEvidenceLog.scanTerminal(request.scanId, "timeout_empty", 0)
923
- } else {
924
- BleEvidenceLog.scanTerminal(request.scanId, "error", 0)
925
916
  }
926
917
  // Fail joined callers immediately instead of letting them run out their
927
918
  // own timeout.
@@ -2308,7 +2299,6 @@ class MentraBluetoothSdk private constructor(
2308
2299
  pendingWifiScan = null
2309
2300
  }
2310
2301
  }
2311
- BleEvidenceLog.scanTerminal(request.scanId, "legacy_uncorrelated", results.size)
2312
2302
  request.pending.resolve(results)
2313
2303
  }
2314
2304
 
@@ -2338,7 +2328,6 @@ class MentraBluetoothSdk private constructor(
2338
2328
  pendingWifiScan = null
2339
2329
  }
2340
2330
  }
2341
- BleEvidenceLog.scanTerminal(scanId, "complete", accumulated.size)
2342
2331
  request.pending.resolve(accumulated)
2343
2332
  }
2344
2333
 
@@ -9,18 +9,13 @@ import android.content.pm.PackageManager
9
9
  import android.content.pm.ServiceInfo
10
10
  import android.location.LocationManager
11
11
  import android.os.Build
12
- import android.os.Handler
13
12
  import android.os.IBinder
14
- import android.os.Looper
15
13
  import androidx.core.app.NotificationCompat
16
14
  import androidx.core.content.ContextCompat
17
15
  import com.mentra.bluetoothsdk.Bridge
18
16
  import com.mentra.bluetoothsdk.DeviceManager
19
17
  import com.mentra.bluetoothsdk.DeviceStore
20
- import com.mentra.bluetoothsdk.debug.BleEvidenceLog
21
18
  import com.mentra.bluetoothsdk.debug.BleTraceLogger
22
- import java.io.FileDescriptor
23
- import java.io.PrintWriter
24
19
 
25
20
  class ForegroundService : Service() {
26
21
  companion object {
@@ -341,20 +336,4 @@ class ForegroundService : Service() {
341
336
  }
342
337
 
343
338
  override fun onBind(intent: Intent?): IBinder? = null
344
-
345
- /**
346
- * Read-only BLE provenance snapshot for device tests:
347
- * `adb shell dumpsys activity service <package>/com.mentra.bluetoothsdk.services.ForegroundService
348
- * mentra-ble-evidence afterSeq=<n> [targetSha256=<hex>]`. Android only lets callers holding
349
- * DUMP (shell/system) reach this. Every other dump request keeps the default behavior.
350
- */
351
- override fun dump(fd: FileDescriptor?, writer: PrintWriter?, args: Array<out String>?) {
352
- val line = BleEvidenceLog.dump(args, Handler(Looper.getMainLooper()))
353
- if (line == null) {
354
- super.dump(fd, writer, args)
355
- return
356
- }
357
- writer?.println(line)
358
- writer?.flush()
359
- }
360
339
  }