feat(ManifestPatcher): disable ssl pinning

This commit is contained in:
Diamond 2023-01-06 18:28:52 -08:00
parent 4bb45b4ea7
commit 1fe633e742
No known key found for this signature in database
GPG key ID: DCBE5952BB3B6420

View file

@ -13,6 +13,7 @@ object ManifestPatcher {
private const val USES_CLEARTEXT_TRAFFIC = "usesCleartextTraffic"
private const val DEBUGGABLE = "debuggable"
private const val REQUEST_LEGACY_EXTERNAL_STORAGE = "requestLegacyExternalStorage"
private const val NETWORK_SECURITY_CONFIG = "networkSecurityConfig"
private const val LABEL = "label"
private const val PACKAGE = "package"
private const val COMPILE_SDK_VERSION = "compileSdkVersion"
@ -87,6 +88,7 @@ object ManifestPatcher {
private var addUseClearTextTraffic = true
override fun attr(ns: String?, name: String, resourceId: Int, type: Int, value: Any?) {
if (name == NETWORK_SECURITY_CONFIG) return
super.attr(ns, name, resourceId, type, value)
if (name == REQUEST_LEGACY_EXTERNAL_STORAGE) addLegacyStorage = false;
if (name == DEBUGGABLE) addDebuggable = false