feat(YouTube - GmsCore support): Check for availability by adding a patch to add resources without needing to rely on a settings patch #2568
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 PR makes major changes that involve the settings patches. The original idea was to check for the availability of GmsCore in YouTube Music. This required adding strings to YouTube Music. However, because YouTube Music has no settings yet, and the settings patches merged strings, the settings patch had to change so that strings and other resources could be added to apps separately without relying on settings patches. With this change, a new patch called
AddResourcesPatch
has been introduced, which, as the name suggests, allows adding resources such as strings and arrays to any app. The existing settings and other patches have been refactored accordingly. Because there are a lot of changes, backwards compatibility in the public API can not be guaranteed anymore, which is why this PR introduces a breaking change that will bump the patches from v3 to v4. As two other PRs (#2440, #2541) are related to this one, it may be a good idea to push them to production in a single merge tomain
. This PR causes merge conflicts in the other two PRs, so reviewing them is a good time.Notable changes
Todo
The check for GmsCore has been added to YouTube Music, but it fails to open the download link to the browser. I suspect the hooked context is responsible for the issue, but I am unsure. The warning toasts for missing GmsCore is being shown successfully, indicating that the hook is being called properly. Surprisingly, the app does not crash or close gracefully regardless of the hook instructing it to.
RE