diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/branding/annotations/CustomBrandingCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/branding/icon/annotations/CustomBrandingCompatibility.kt similarity index 81% rename from src/main/kotlin/app/revanced/patches/youtube/layout/branding/annotations/CustomBrandingCompatibility.kt rename to src/main/kotlin/app/revanced/patches/youtube/layout/branding/icon/annotations/CustomBrandingCompatibility.kt index bc427cbb7..7c276f0a9 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/branding/annotations/CustomBrandingCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/branding/icon/annotations/CustomBrandingCompatibility.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.layout.branding.annotations +package app.revanced.patches.youtube.layout.branding.icon.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/branding/patch/CustomBrandingPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/branding/icon/patch/CustomBrandingPatch.kt similarity index 80% rename from src/main/kotlin/app/revanced/patches/youtube/layout/branding/patch/CustomBrandingPatch.kt rename to src/main/kotlin/app/revanced/patches/youtube/layout/branding/icon/patch/CustomBrandingPatch.kt index 33ae280d0..65392ad8c 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/branding/patch/CustomBrandingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/branding/icon/patch/CustomBrandingPatch.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.youtube.layout.branding.patch +package app.revanced.patches.youtube.layout.branding.icon.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name @@ -10,7 +10,7 @@ import app.revanced.patcher.patch.implementation.ResourcePatch import app.revanced.patcher.patch.implementation.misc.PatchResult import app.revanced.patcher.patch.implementation.misc.PatchResultError import app.revanced.patcher.patch.implementation.misc.PatchResultSuccess -import app.revanced.patches.youtube.layout.branding.annotations.CustomBrandingCompatibility +import app.revanced.patches.youtube.layout.branding.icon.annotations.CustomBrandingCompatibility import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch import java.nio.file.Files @@ -35,18 +35,18 @@ class CustomBrandingPatch : ResourcePatch() { ) mapOf( - "mipmap-xxxhdpi" to 192, - "mipmap-xxhdpi" to 144, - "mipmap-xhdpi" to 96, - "mipmap-hdpi" to 72, - "mipmap-mdpi" to 48 + "xxxhdpi" to 192, + "xxhdpi" to 144, + "xhdpi" to 96, + "hdpi" to 72, + "mdpi" to 48 ).forEach { (iconDirectory, size) -> iconNames.forEach iconLoop@{ iconName -> val iconFile = this.javaClass.classLoader.getResourceAsStream("branding/$size/$iconName.png") ?: return PatchResultError("The icon $iconName can not be found.") Files.write( - resDirectory.resolve(iconDirectory).resolve("$iconName.png").toPath(), iconFile.readAllBytes() + resDirectory.resolve("mipmap-$iconDirectory").resolve("$iconName.png").toPath(), iconFile.readAllBytes() ) } } diff --git a/src/main/resources/branding/48/adaptiveproduct_youtube_background_color_108.png b/src/main/resources/branding/48/adaptiveproduct_youtube_background_color_108.png new file mode 100644 index 000000000..2a60fcbf2 Binary files /dev/null and b/src/main/resources/branding/48/adaptiveproduct_youtube_background_color_108.png differ diff --git a/src/main/resources/branding/48/adaptiveproduct_youtube_foreground_color_108.png b/src/main/resources/branding/48/adaptiveproduct_youtube_foreground_color_108.png new file mode 100644 index 000000000..18abb25b4 Binary files /dev/null and b/src/main/resources/branding/48/adaptiveproduct_youtube_foreground_color_108.png differ diff --git a/src/main/resources/branding/48/ic_launcher.png b/src/main/resources/branding/48/ic_launcher.png new file mode 100644 index 000000000..bbf74a39a Binary files /dev/null and b/src/main/resources/branding/48/ic_launcher.png differ diff --git a/src/main/resources/branding/48/ic_launcher_round.png b/src/main/resources/branding/48/ic_launcher_round.png new file mode 100644 index 000000000..f1ae5bb43 Binary files /dev/null and b/src/main/resources/branding/48/ic_launcher_round.png differ