Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About
This patch is meant to replace the current branding patch for YouTube but also enable patching any apps icon.
Details
The idea is to ask the user for adaptive icons by default, and a fallback full icon. As it turns out there's like 10 ways to create an icon on Android. How the patch works is, it reads the manifest which references the icon. The reference can be a png file, an XML file, a drawable, mipmap and more. In the case of it being a mipmap and the reference pointing to an adaptive icon, the patch can be applied as it currently is on YouTube. In the other cases, the icon is replaced with fullIcon.The patch isn't done yet, and there's probably a couple considerations that haven't been made yet, but that'll be clear during the implementation. For example fullIcon is currently just one icon, but IIRC there can be a drawable icon for each density for example, so scenarios like this need to be covered by the patch.Now the user just has to provide a couple of icons for every pixel density and the patch will overwrite the usages accordingly. Much simpler approach
Todo