Files
orca/mobile/patches/@expo__dom-webview@55.0.5.patch
T

23 lines
979 B
Diff

diff --git a/android/src/main/java/expo/modules/webview/DomWebView.kt b/android/src/main/java/expo/modules/webview/DomWebView.kt
--- a/android/src/main/java/expo/modules/webview/DomWebView.kt
+++ b/android/src/main/java/expo/modules/webview/DomWebView.kt
@@ -4,6 +4,7 @@ package expo.modules.webview
import android.animation.ObjectAnimator
import android.annotation.SuppressLint
import android.content.Context
+import android.content.pm.ApplicationInfo
import android.graphics.Bitmap
import android.graphics.Color
@@ -45,7 +46,9 @@ internal class DomWebView(context: Context, appContext: AppContext) : ExpoView(c
// region Public methods
fun reload() {
- WebView.setWebContentsDebuggingEnabled(webviewDebuggingEnabled)
+ val isDebuggable =
+ context.applicationInfo.flags and ApplicationInfo.FLAG_DEBUGGABLE != 0
+ WebView.setWebContentsDebuggingEnabled(webviewDebuggingEnabled && isDebuggable)
source?.uri?.let {
if (it != webView.url) {