mirror of
https://github.com/stablyai/orca.git
synced 2026-09-30 08:03:12 +00:00
23 lines
1.0 KiB
Diff
23 lines
1.0 KiB
Diff
diff --git a/android/src/main/expo/modules/logbox/ExpoLogBoxWebViewWrapper.kt b/android/src/main/expo/modules/logbox/ExpoLogBoxWebViewWrapper.kt
|
|
--- a/android/src/main/expo/modules/logbox/ExpoLogBoxWebViewWrapper.kt
|
|
+++ b/android/src/main/expo/modules/logbox/ExpoLogBoxWebViewWrapper.kt
|
|
@@ -4,6 +4,7 @@
|
|
package expo.modules.logbox
|
|
|
|
import android.app.Activity
|
|
+import android.content.pm.ApplicationInfo
|
|
import android.graphics.Bitmap
|
|
import android.graphics.Color
|
|
import android.webkit.JavascriptInterface
|
|
@@ -24,7 +25,9 @@ class ExpoLogBoxWebViewWrapper(
|
|
val webView: WebView = WebView(context).apply {
|
|
setBackgroundColor(Color.BLACK)
|
|
settings.javaScriptEnabled = true
|
|
- setWebContentsDebuggingEnabled(true)
|
|
+ val isDebuggable =
|
|
+ context.applicationInfo.flags and ApplicationInfo.FLAG_DEBUGGABLE != 0
|
|
+ setWebContentsDebuggingEnabled(isDebuggable)
|
|
// This interface is defined by the Expo DOM Components WebView Wrapper
|
|
// and must always be the same as [add link]
|
|
addJavascriptInterface(
|