@24i/smartapps-bigscreen-rnv-build-engine 0.18.2-alpha.2830 → 0.18.2-alpha.2831

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.
@@ -31,7 +31,7 @@ class BridgeFromJavaScript(
31
31
  handler.post(block)
32
32
  }
33
33
 
34
- private fun <T> runBlocking(logName: String? = null, block: () -> T): T? {
34
+ private fun <T> runBlocking(logName: String? = null, timeoutMs: Long = 100L, block: () -> T): T? {
35
35
  val latch = CountDownLatch(1)
36
36
  var result: T? = null
37
37
  handler.post {
@@ -39,11 +39,11 @@ class BridgeFromJavaScript(
39
39
  latch.countDown()
40
40
  }
41
41
  try {
42
- latch.await(100L, TimeUnit.MILLISECONDS)
43
- Log.v(LOG_TAG, "$logName $result")
42
+ val success = latch.await(timeoutMs, TimeUnit.MILLISECONDS)
43
+ Log.v(LOG_TAG, if (success) "$logName $result" else "$logName TIMEOUT")
44
44
  } catch (e: InterruptedException) {
45
45
  result = null
46
- Log.v(LOG_TAG, "$logName TIMEOUT")
46
+ Log.v(LOG_TAG, "$logName INTERRUPT")
47
47
  }
48
48
  return result
49
49
  }
@@ -303,7 +303,7 @@ class BridgeFromJavaScript(
303
303
  * Bridge JS 2 Android to get the device information
304
304
  */
305
305
  @JavascriptInterface
306
- fun bridgeJavaScriptToAndroid_GetDeviceInfo(): String? = runBlocking("bridgeJavaScriptToAndroid_GetDeviceInfo") {
306
+ fun bridgeJavaScriptToAndroid_GetDeviceInfo(): String? = runBlocking("bridgeJavaScriptToAndroid_GetDeviceInfo", 300L) {
307
307
  viewModel.detectDeviceInfo().toString()
308
308
  }
309
309
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@24i/smartapps-bigscreen-rnv-build-engine",
3
- "version": "0.18.2-alpha.2830",
3
+ "version": "0.18.2-alpha.2831",
4
4
  "description": "Package with build engine for SmartApps BIGscreen projects...",
5
5
  "main": "dist/src/index.js",
6
6
  "scripts": {