You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: react-native-mcu-manager/android/src/main/java/uk/co/playerdata/reactnativemcumanager/ReactNativeMcuManagerModule.kt
+16-4Lines changed: 16 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -78,11 +78,23 @@ class ReactNativeMcuManagerModule() : Module() {
78
78
throw ex;
79
79
}
80
80
81
-
if (info.bootloader ==MCUBOOT) {
82
-
val mcuMgrResult = manager.bootloaderInfo(DefaultManager.BOOTLOADER_INFO_MCUBOOT_QUERY_MODE)
81
+
try {
82
+
if (info.bootloader ==MCUBOOT) {
83
+
val mcuMgrResult = manager.bootloaderInfo(DefaultManager.BOOTLOADER_INFO_MCUBOOT_QUERY_MODE)
84
+
85
+
info.mode = mcuMgrResult.mode
86
+
info.noDowngrade = mcuMgrResult.noDowngrade
87
+
}
88
+
} catch (ex:McuMgrErrorException) {
89
+
transport.release()
83
90
84
-
info.mode = mcuMgrResult.mode
85
-
info.noDowngrade = mcuMgrResult.noDowngrade
91
+
// For consistency with iOS, if the error code is 8 (MGMT_ERR_ENOTSUP), return null
0 commit comments