mirror of
https://github.com/mihonapp/mihon.git
synced 2025-07-06 16:07:51 +02:00
@ -219,9 +219,9 @@ class App : Application(), DefaultLifecycleObserver, SingletonImageLoader.Factor
|
|||||||
try {
|
try {
|
||||||
// Override the value passed as X-Requested-With in WebView requests
|
// Override the value passed as X-Requested-With in WebView requests
|
||||||
val stackTrace = Looper.getMainLooper().thread.stackTrace
|
val stackTrace = Looper.getMainLooper().thread.stackTrace
|
||||||
val isChromiumCall = stackTrace.any {
|
val isChromiumCall = stackTrace.any { trace ->
|
||||||
it.className.startsWith("org.chromium.") &&
|
trace.className.equals("org.chromium.base.BuildInfo", ignoreCase = true) &&
|
||||||
it.methodName in setOf("getAll", "getPackageName", "<init>")
|
setOf("getAll", "getPackageName", "<init>").any { trace.methodName.equals(it, ignoreCase = true) }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isChromiumCall) return WebViewUtil.spoofedPackageName(applicationContext)
|
if (isChromiumCall) return WebViewUtil.spoofedPackageName(applicationContext)
|
||||||
|
Reference in New Issue
Block a user