mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-01 15:14:34 +02:00
fix: splash icon not applying on Android 12+ devices
This commit is contained in:
parent
655e8630c4
commit
3b827a24e1
@ -1,7 +1,6 @@
|
|||||||
package app.revanced.util.resources
|
package app.revanced.util.resources
|
||||||
|
|
||||||
import app.revanced.patcher.data.ResourceContext
|
import app.revanced.patcher.data.ResourceContext
|
||||||
import org.w3c.dom.Element
|
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
import java.nio.file.StandardCopyOption
|
import java.nio.file.StandardCopyOption
|
||||||
|
|
||||||
@ -44,22 +43,9 @@ internal object IconHelper {
|
|||||||
iconName
|
iconName
|
||||||
)
|
)
|
||||||
|
|
||||||
this.xmlEditor["res/values-v31/styles.xml"].use { dom ->
|
this["res/values-v31/styles.xml"].writeText(
|
||||||
val applicationNode = dom
|
this["res/values-v31/styles.xml"].readText().replace("<item name=\"android:windowSplashScreenAnimatedIcon\">@drawable/avd_anim</item>", "")
|
||||||
.file
|
)
|
||||||
.getElementsByTagName("resources")
|
|
||||||
.item(0) as Element
|
|
||||||
|
|
||||||
applicationNode.getElementsByTagName("style").also { list ->
|
|
||||||
for (i in 0 until list.length) {
|
|
||||||
val element = list.item(i) as? Element ?: continue
|
|
||||||
if (element.getAttribute("name") == "Base.Theme.YouTube.Launcher") {
|
|
||||||
element.removeChild(element.firstChild)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun ResourceContext.customIconMusic(iconName: String) {
|
internal fun ResourceContext.customIconMusic(iconName: String) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user