refactor: cleanup MicroGResourcePatch.kt
This commit is contained in:
parent
125bfd294c
commit
e58b96a6f4
|
@ -34,16 +34,18 @@ class MicroGResourcePatch : ResourcePatch() {
|
|||
it.file.firstChild.appendChild(settingsElement)
|
||||
}
|
||||
|
||||
val settings_fragment = data.get("res/xml/settings_fragment.xml")
|
||||
val text = settings_fragment.readText()
|
||||
settings_fragment.writeText(
|
||||
text.replace("android:targetPackage=\"com.google.android.youtube", "android:targetPackage=\"$REVANCED_PACKAGE_NAME")
|
||||
val settingsFragment = data["res/xml/settings_fragment.xml"]
|
||||
settingsFragment.writeText(
|
||||
settingsFragment.readText().replace(
|
||||
"android:targetPackage=\"com.google.android.youtube",
|
||||
"android:targetPackage=\"$REVANCED_PACKAGE_NAME"
|
||||
)
|
||||
)
|
||||
|
||||
val manifest = data.get("AndroidManifest.xml").readText()
|
||||
|
||||
data.get("AndroidManifest.xml").writeText(
|
||||
manifest.replace(
|
||||
val manifest = data["AndroidManifest.xml"]
|
||||
manifest.writeText(
|
||||
manifest.readText()
|
||||
.replace(
|
||||
"package=\"com.google.android.youtube", "package=\"$REVANCED_PACKAGE_NAME"
|
||||
).replace(
|
||||
"android:label=\"@string/application_name", "android:label=\"$REVANCED_APP_NAME"
|
||||
|
|
Loading…
Reference in a new issue