VirtualAPK
VirtualAPK copied to clipboard
MergeManifestsHooker为什么强制删除了allowBackup?
void rewrite(File xml) {
if (xml?.exists()) {
final Node manifest = new XmlParser().parse(xml)
manifest.application.each { application ->
[ 'icon', 'label', 'allowBackup', 'supportsRtl' ].each {
application.attributes().remove(new QName(MergeManifestsHooker.ANDROID_NAMESPACE, it))
}
}
xml.withPrintWriter('utf-8', { pw ->
XmlUtil.serialize(manifest, pw)
})
}
}
我的目的是指定android:allowBackup="false",因为通常认为allowBackup是有安全风险的配置项,且默认为true,需要手动关闭。但由于MergeManifestsHooker强制删除了allowBackup项,导致其无法关闭。
VA这么做是出于什么考虑?