-
Notifications
You must be signed in to change notification settings - Fork 47
feat(YouTube Music): add support version 6.20.51
#57
Conversation
* Downgrade minSdk to 21 * fix(Player components): `Hide audio video switch toggle` causes a crash on 6.20 * fix(Player components): Play button turns black on Android 5.x if `Restore old player background` is disabled
app/src/main/java/app/revanced/integrations/music/patches/player/PlayerPatch.java
Show resolved
Hide resolved
app/src/main/java/app/revanced/integrations/music/utils/ExtendedUtils.java
Show resolved
Hide resolved
Unfortunately I don't have an Android 5 device so I haven't been able to test the refectored commits Can you test this? |
…Landroid/content/ContentProviderClient;
There was one problem
Apparently, if the minSdk is before 24, the compiler makes this try-with-resources statement uses Apart from this it works perfectly. Thank you. |
This comment was marked as resolved.
This comment was marked as resolved.
There was one other problem Can you restore
|
app/src/main/java/app/revanced/integrations/shared/patches/GmsCoreSupport.java
Outdated
Show resolved
Hide resolved
app/src/main/java/app/revanced/integrations/music/utils/ExtendedUtils.java
Outdated
Show resolved
Hide resolved
Please test the suggestion on Android 5.0 |
Co-authored-by: inotia00 <108592928+inotia00@users.noreply.github.com>
I noticed that you also changed some YouTube code to compatible with SDK 21 The minSdkVersion has been upgraded to 24, so there should be no warnings when using new APIs in YouTube class |
For classes related to the SpoofStreamingData patch, compatibility for Android 6.0 should be maintained to ensure operation on YouTube 17.34.36 No SDK check is required for other classes |
I see. As you said above, it would require too many unnecessary changes I bookmarked the commit ref in my browser. |
Instead of using The SDK version check has been used not only by YouTube Music but also by YouTube, so it is valid to apply the change to YouTube's class as well |
Integrations for inotia00/revanced-patches#81
Downgrade minSdk to 21
Rewrote code that uses unsupported APIs.
Most of the changes are just wrapping the existing code in if statements, so you can easily revert back the changes when you drop 6.20.51 again.
For files related to YouTube or Reddit, the only change is adding the
@TargetApi(26)
annotation to suppress warnings.Because both YouTube 18.29.38 and Reddit 2023.12.0 are minSdk=26.
Hide audio video switch toggle
causes a crash on 6.20Added a new method that uses
setVisibility(View.INVISIBLE)
inPlayerPatch
for 6.20By the way, View.INVISIBLE also works for the latest YT Music. Perhaps just replacing the
viewGroup.removeView(view)
in existing method might be enough?Fix play button turns black on Android 5.x
Android 5.x have a different design for play button.
This difference causes a black play button if new background is applied by
Restore old player background
.Android5.x_old_backround.png
Android5.x_new_background_black_play_button.png
v6.20.51 have a old background originally, but if
Restore old player background
patch is applied, new background is forced by default.So disable the functionality of this patch on Android 5.x.