This commit is contained in:
Nuckyz 2025-05-10 12:39:36 +03:00 committed by GitHub
commit 4a21cba4b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 31 additions and 0 deletions

View file

@ -872,6 +872,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;
}

View file

@ -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)
}

View file

@ -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)
}
}