mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-05-20 16:27:11 +02:00
feat(Spotify): Add Fix third party launchers widgets
patch (#4893)
Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
This commit is contained in:
parent
c6df02bc01
commit
23bfdc98fb
@ -876,6 +876,10 @@ public final class app/revanced/patches/spotify/misc/privacy/SanitizeSharingLink
|
||||
public static final fun getSanitizeSharingLinksPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/spotify/misc/widgets/FixThirdPartyLaunchersWidgetsKt {
|
||||
public static final fun getFixThirdPartyLaunchersWidgets ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/spotify/navbar/PremiumNavbarTabPatchKt {
|
||||
public static final fun getPremiumNavbarTabPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
|
||||
}
|
||||
|
@ -0,0 +1,10 @@
|
||||
package app.revanced.patches.spotify.misc.widgets
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.util.indexOfFirstInstruction
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val canBindAppWidgetPermissionFingerprint = fingerprint {
|
||||
strings("android.permission.BIND_APPWIDGET")
|
||||
opcodes(Opcode.AND_INT_LIT8)
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package app.revanced.patches.spotify.misc.widgets
|
||||
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Suppress("unused")
|
||||
val fixThirdPartyLaunchersWidgets = bytecodePatch(
|
||||
name = "Fix third party launchers widgets",
|
||||
description = "Fixes Spotify widgets not working in third party launchers, like Nova Launcher.",
|
||||
) {
|
||||
execute {
|
||||
// Only system app launchers are granted the BIND_APPWIDGET permission.
|
||||
// Override the method that checks for it to always return true, as this permission is not actually required
|
||||
// for the widgets to work.
|
||||
canBindAppWidgetPermissionFingerprint.method.returnEarly(true)
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user