feat(manifestpatcher): allow connecting over http (#2)

Co-authored-by: meqativ <meqativ@users.noreply.github.com>
This commit is contained in:
мекатів 2026-04-02 00:47:23 +03:00 • committed by GitHub
parent 8cf989a239
commit dcc33736a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -252,6 +252,8 @@ object ManifestPatcher {
extractNativeLibs ?: false
private var shouldAddMetadata =
addManagerMetadata ?: false
private var shouldAddCleartext = true
override fun attr(
ns: String?,
@ -269,6 +271,12 @@ object ManifestPatcher {
shouldAddExtractNativeLibs = false
if (name == DEBUGGABLE)
shouldAddDebuggable = false
if (name == "usesCleartextTraffic") {
shouldAddCleartext = false
super.attr(ns, name, 0x010104ec, TYPE_INT_BOOLEAN, 1)
return
}
super.attr(
ns,
name,
@ -425,7 +433,15 @@ object ManifestPatcher {
0
)
}
if (shouldAddCleartext) {
super.attr(
ANDROID_NAMESPACE,
"usesCleartextTraffic",
0x010104ec,
TYPE_INT_BOOLEAN,
1
)
}
super.end()
}
}