automatically infer type comparator
This commit is contained in:
parent
93301e7f76
commit
2d568e0127
68 changed files with 92 additions and 92 deletions
|
|
@ -9,7 +9,7 @@ internal val BytecodePatchContext.userStateSwitchMethod by gettingFirstMethodDec
|
|||
}
|
||||
|
||||
internal val BytecodePatchContext.cb11ConstructorMethod by gettingFirstMethodDeclaratively {
|
||||
definingClass { endsWith("CB11Details;") }
|
||||
definingClass("CB11Details;")
|
||||
parameterTypes(
|
||||
"Ljava/lang/String;",
|
||||
"Ljava/lang/String;",
|
||||
|
|
@ -26,5 +26,5 @@ internal val BytecodePatchContext.cb11ConstructorMethod by gettingFirstMethodDec
|
|||
|
||||
internal val BytecodePatchContext.getBottomBarMethod by gettingFirstMethodDeclaratively {
|
||||
name("getBottomBar")
|
||||
definingClass { endsWith("HomeMenu;") }
|
||||
definingClass("HomeMenu;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val BytecodePatchContext.launchCustomTabMethodMatch by composingFirstMethod {
|
||||
definingClass { endsWith("CustomTabsArticleLauncher;") }
|
||||
definingClass("CustomTabsArticleLauncher;")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||
opcodes(
|
||||
Opcode.IPUT_OBJECT,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ internal val startActivityInitHook = extensionHook(
|
|||
},
|
||||
) {
|
||||
name("onCreate")
|
||||
definingClass { endsWith("/StartActivity;") }
|
||||
definingClass("/StartActivity;")
|
||||
opcodes(
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT,
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.magazinesActivityOnCreateMethod by gettingFirstMethodDeclaratively {
|
||||
name("onCreate")
|
||||
definingClass { endsWith("/StartActivity;") }
|
||||
definingClass("/StartActivity;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ internal val homeActivityInitHook = extensionHook(
|
|||
},
|
||||
) {
|
||||
name("onCreate")
|
||||
definingClass { endsWith("/HomeActivity;") }
|
||||
definingClass("/HomeActivity;")
|
||||
opcodes(
|
||||
Opcode.CONST_STRING,
|
||||
Opcode.INVOKE_STATIC,
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.homeActivityOnCreateMethod by gettingFirstMethodDeclaratively {
|
||||
name("onCreate")
|
||||
definingClass { endsWith("/HomeActivity;") }
|
||||
definingClass("/HomeActivity;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,6 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.onApplicationCreateMethodMatch by composingFirstMethod {
|
||||
name("onCreate")
|
||||
definingClass { endsWith("RecorderApplication;") }
|
||||
definingClass("RecorderApplication;")
|
||||
instructions("com.google.android.feature.PIXEL_2017_EXPERIENCE"())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.primaryAdsMethod by gettingFirstMethodDeclaratively {
|
||||
name("isAdsDisabled")
|
||||
definingClass { endsWith("PreferencesHelper;") }
|
||||
definingClass("PreferencesHelper;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
import app.revanced.patcher.returnType
|
||||
|
||||
internal val BytecodePatchContext.checkProMethod by gettingFirstMethodDeclaratively {
|
||||
definingClass { endsWith("IPSPurchaseRepository;") }
|
||||
definingClass("IPSPurchaseRepository;")
|
||||
returnType("Z")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||
|
||||
internal val BytecodePatchContext.isDeviceBootloaderOpenMethod by gettingFirstMethodDeclaratively {
|
||||
name("isDeviceBootloaderOpen")
|
||||
definingClass { endsWith("/DeviceIntegrityCheckProviderImpl;") }
|
||||
definingClass("/DeviceIntegrityCheckProviderImpl;")
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
returnType("Ljava/lang/Object;")
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.isDeviceRootedMethod by gettingFirstMethodDeclaratively {
|
||||
name("isDeviceRooted")
|
||||
definingClass { endsWith("/DeviceIntegrityCheckProviderImpl;") }
|
||||
definingClass("/DeviceIntegrityCheckProviderImpl;")
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
returnType("Z")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||
|
||||
internal val BytecodePatchContext.spoofSignatureMethod by gettingFirstMethodDeclaratively {
|
||||
name("getPubKey")
|
||||
definingClass { endsWith("/SL2Step1Task;") }
|
||||
definingClass("/SL2Step1Task;")
|
||||
accessFlags(AccessFlags.PRIVATE)
|
||||
returnType("L")
|
||||
parameterTypes("L")
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.getLibertyInitMethod by gettingFirstMethodDeclaratively {
|
||||
name("init")
|
||||
definingClass { endsWith("/Liberty;") }
|
||||
definingClass("/Liberty;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ internal val BytecodePatchContext.admobHelperShouldShowAdsMethod by gettingFirst
|
|||
|
||||
internal val BytecodePatchContext.filmFragmentShowAdsMethod by gettingFirstMethodDeclaratively {
|
||||
name("showAds")
|
||||
definingClass { endsWith("/FilmFragment;") }
|
||||
definingClass("/FilmFragment;")
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.memberExtensionShowAdsMethod by gettingFirstMethodDeclaratively {
|
||||
name("showAds")
|
||||
definingClass { endsWith("/AMemberExtensionKt;") }
|
||||
definingClass("/AMemberExtensionKt;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.getCanChangeAppIconMethod by gettingFirstMethodDeclaratively {
|
||||
name("getCanChangeAppIcon")
|
||||
definingClass { endsWith("SettingsAppIconFragment;") }
|
||||
definingClass("SettingsAppIconFragment;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ internal val BytecodePatchContext.historyMenuItemOfflineTabMethodMatch by compos
|
|||
}
|
||||
|
||||
internal val BytecodePatchContext.searchActionViewMethod by gettingFirstMethodDeclaratively {
|
||||
definingClass { endsWith("/SearchActionProvider;") }
|
||||
definingClass("/SearchActionProvider;")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returnType("Landroid/view/View;")
|
||||
parameterTypes()
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.musicActivityOnCreateMethod by gettingFirstMethodDeclaratively {
|
||||
name("onCreate")
|
||||
definingClass { endsWith("/MusicActivity;") }
|
||||
definingClass("/MusicActivity;")
|
||||
returnType("V")
|
||||
parameterTypes("Landroid/os/Bundle;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import app.revanced.patcher.returnType
|
|||
|
||||
internal val BytecodePatchContext.googleApiActivityMethod by gettingFirstMethodDeclaratively {
|
||||
name("onCreate")
|
||||
definingClass { endsWith("GoogleApiActivity;") }
|
||||
definingClass("GoogleApiActivity;")
|
||||
returnType("V")
|
||||
parameterTypes("Landroid/os/Bundle;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||
|
||||
internal val BytecodePatchContext.isPremiumUseCaseImplMethod by gettingFirstMethodDeclaratively {
|
||||
name("doWork")
|
||||
definingClass { endsWith("IsPremiumUseCaseImpl;") }
|
||||
definingClass("IsPremiumUseCaseImpl;")
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.mainActivityNavigateToNativePremiumUpsellMethod by gettingFirstMethodDeclaratively {
|
||||
name("navigateToNativePremiumUpsell")
|
||||
definingClass { endsWith("MainActivity;") }
|
||||
definingClass("MainActivity;")
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.FINAL)
|
||||
returnType("V")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ val sharedExtensionPatch = sharedExtensionPatch(
|
|||
extensionName = "nothingx",
|
||||
extensionHook {
|
||||
name("onCreate")
|
||||
definingClass { contains("BaseApplication") }
|
||||
definingClass("BaseApplication")
|
||||
},
|
||||
)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import app.revanced.patcher.returnType
|
|||
*/
|
||||
internal val BytecodePatchContext.applicationOnCreateMethod by gettingFirstMethodDeclaratively {
|
||||
name("onCreate")
|
||||
definingClass { endsWith("BaseApplication;") }
|
||||
definingClass("BaseApplication;")
|
||||
returnType("V")
|
||||
parameterTypes()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||
|
||||
internal val BytecodePatchContext.isDeviceRootedMethod by gettingFirstMethodDeclaratively {
|
||||
name("isDeviceRooted")
|
||||
definingClass { endsWith("/RootChecker;") }
|
||||
definingClass("/RootChecker;")
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
returnType("Z")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,5 +12,5 @@ internal val BytecodePatchContext.getIsAdSupportedMethod by gettingFirstMethodDe
|
|||
|
||||
internal val BytecodePatchContext.requestAudioAdMethod by gettingFirstMethodDeclaratively {
|
||||
name("requestAudioAdFromAdSDK")
|
||||
definingClass { endsWith("ContentServiceOpsImpl;") }
|
||||
definingClass("ContentServiceOpsImpl;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.getSkipLimitBehaviorMethod by gettingFirstMethodDeclaratively {
|
||||
name("getSkipLimitBehavior")
|
||||
definingClass { endsWith("UserData;") }
|
||||
definingClass("UserData;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,5 +10,5 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||
internal val BytecodePatchContext.isPlusUnlockedMethod by gettingFirstMethodDeclaratively("genius") {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returnType("Z")
|
||||
definingClass { endsWith("/User;") }
|
||||
definingClass("/User;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import app.revanced.patcher.returnType
|
|||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val BytecodePatchContext.shouldShowAdsMethod by gettingFirstMethodDeclaratively {
|
||||
definingClass { endsWith("AdUtils;") }
|
||||
definingClass("AdUtils;")
|
||||
name("shouldShowAds")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returnType("Z")
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import app.revanced.patcher.returnType
|
|||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val BytecodePatchContext.showReminderMethod by gettingFirstMethodDeclaratively {
|
||||
definingClass { endsWith("AdsNotify;") }
|
||||
definingClass("AdsNotify;")
|
||||
name("show")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
|
||||
returnType("V")
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.hideCommentAdsMethod by gettingFirstMethodDeclaratively {
|
||||
name("invokeSuspend")
|
||||
definingClass { contains("LoadAdsCombinedCall") }
|
||||
definingClass("LoadAdsCombinedCall")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import app.revanced.patcher.returnType
|
|||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val BytecodePatchContext.adPostMethod by gettingFirstMethodDeclaratively("children") {
|
||||
definingClass { endsWith("Listing;") }
|
||||
definingClass("Listing;")
|
||||
returnType("V")
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,5 +11,5 @@ internal val BytecodePatchContext.buildUserAgentMethod by gettingFirstMethodDecl
|
|||
|
||||
internal val BytecodePatchContext.getClientIdMethod by gettingFirstMethodDeclaratively {
|
||||
name("getClientId")
|
||||
definingClass { endsWith("Credentials;") }
|
||||
definingClass("Credentials;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,5 +22,5 @@ internal val BytecodePatchContext.detectPiracyMethod by gettingFirstMethodDeclar
|
|||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.RETURN_VOID,
|
||||
)
|
||||
definingClass { endsWith("ProcessLifeCyleListener;") }
|
||||
definingClass("ProcessLifeCyleListener;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.getClientIdMethod by gettingFirstMethodDeclaratively {
|
||||
name("getClientId")
|
||||
definingClass { endsWith("Credentials;") }
|
||||
definingClass("Credentials;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.mainActivityOnCreateMethod by gettingFirstMethodDeclaratively {
|
||||
name("onCreate")
|
||||
definingClass { endsWith("MainActivity;") }
|
||||
definingClass("MainActivity;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val BytecodePatchContext.customImageViewLoadMethod by gettingFirstMethodDeclaratively {
|
||||
definingClass { endsWith("CustomImageView;") }
|
||||
definingClass("CustomImageView;")
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
parameterTypes("Ljava/lang/String;", "Z", "Z", "I", "I")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import app.revanced.patcher.returnType
|
|||
|
||||
internal val BytecodePatchContext.disableScreenshotPopupMethod by gettingFirstMethodDeclaratively {
|
||||
name("invoke")
|
||||
definingClass { endsWith($$"$ScreenshotTakenBannerKt$lambda-1$1;") }
|
||||
definingClass("$ScreenshotTakenBannerKt$lambda-1$1;")
|
||||
returnType("V")
|
||||
parameterTypes("Landroidx/compose/runtime/", "I")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@ import app.revanced.patcher.returnType
|
|||
|
||||
internal val BytecodePatchContext.hasPremiumIconAccessMethod by gettingFirstMethodDeclaratively {
|
||||
name("isPremiumSubscriber")
|
||||
definingClass { endsWith("MyAccount;") }
|
||||
definingClass("MyAccount;")
|
||||
returnType("Z")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@ import app.revanced.patcher.immutableClassDef
|
|||
import app.revanced.patcher.patch.BytecodePatchContext
|
||||
|
||||
internal val BytecodePatchContext.shareLinkFormatterMethod by gettingFirstMethodDeclaratively {
|
||||
definingClass { startsWith("Lcom/reddit/sharing/") }
|
||||
definingClass("Lcom/reddit/sharing/")
|
||||
custom { immutableClassDef.sourceFile == "UrlUtil.kt" }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import app.revanced.patcher.returnType
|
|||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val BytecodePatchContext.rootDetectionMethod by gettingFirstMethodDeclaratively {
|
||||
definingClass { endsWith("/DeviceIntegrityCheck;") }
|
||||
definingClass("/DeviceIntegrityCheck;")
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
returnType("V")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val BytecodePatchContext.canScrollVerticallyMethodMatch by composingFirstMethod {
|
||||
definingClass { endsWith("SwipeRefreshLayout;") }
|
||||
definingClass("SwipeRefreshLayout;")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val BytecodePatchContext.lithoFilterInitMethod by gettingFirstMethodDeclaratively {
|
||||
definingClass { endsWith("/LithoFilterPatch;") }
|
||||
definingClass("/LithoFilterPatch;")
|
||||
accessFlags(AccessFlags.STATIC, AccessFlags.CONSTRUCTOR)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,17 +9,17 @@ import com.android.tools.smali.dexlib2.iface.ClassDef
|
|||
context(_: BytecodePatchContext)
|
||||
internal fun ClassDef.getGetCompressionQualityMethod() = firstMethodDeclaratively {
|
||||
name("getCompressionQuality")
|
||||
definingClass { endsWith("/MediaUploadParameters;") }
|
||||
definingClass("/MediaUploadParameters;")
|
||||
}
|
||||
|
||||
context(_: BytecodePatchContext)
|
||||
internal fun ClassDef.getGetMaxDurationMethod() = firstMethodDeclaratively {
|
||||
name("getMaxDuration")
|
||||
definingClass { endsWith("/MediaUploadParameters;") }
|
||||
definingClass("/MediaUploadParameters;")
|
||||
}
|
||||
|
||||
context(_: BytecodePatchContext)
|
||||
internal fun ClassDef.getGetMaxSizeMethod() = firstMethodDeclaratively {
|
||||
name("getMaxSize")
|
||||
definingClass { endsWith("/MediaUploadParameters;") }
|
||||
definingClass("/MediaUploadParameters;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,5 +6,5 @@ import app.revanced.patches.shared.misc.extension.extensionHook
|
|||
|
||||
internal val applicationOnCreateHook = extensionHook {
|
||||
name("onCreate")
|
||||
definingClass { endsWith("/StravaApplication;") }
|
||||
definingClass("/StravaApplication;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.logInGetUsePasswordMethod by gettingFirstMethodDeclaratively {
|
||||
name("getUsePassword")
|
||||
definingClass { endsWith("/RequestOtpLogInNetworkResponse;") }
|
||||
definingClass("/RequestOtpLogInNetworkResponse;")
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.emailChangeGetUsePasswordMethod by gettingFirstMethodDeclaratively {
|
||||
name("getUsePassword")
|
||||
definingClass { endsWith("/RequestEmailChangeWithOtpOrPasswordResponse;") }
|
||||
definingClass("/RequestEmailChangeWithOtpOrPasswordResponse;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.getSubscribedMethod by gettingFirstMethodDeclaratively {
|
||||
name("getSubscribed")
|
||||
definingClass { endsWith("/SubscriptionDetailResponse;") }
|
||||
definingClass("/SubscriptionDetailResponse;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ import com.android.tools.smali.dexlib2.Opcode
|
|||
|
||||
internal val BytecodePatchContext.getModulesMethodMatch by composingFirstMethod {
|
||||
name("getModules")
|
||||
definingClass { endsWith("/GenericLayoutEntry;") }
|
||||
definingClass("/GenericLayoutEntry;")
|
||||
opcodes(Opcode.IGET_OBJECT)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.checkLockedThemesMethod by gettingFirstMethodDeclaratively {
|
||||
name("isLockedTheme")
|
||||
definingClass { endsWith("Theme;") }
|
||||
definingClass("Theme;")
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.setThemeMethod by gettingFirstMethodDeclaratively {
|
||||
name("lambda\$updateUserBtn\$1")
|
||||
definingClass { endsWith("ThemePreviewActivity;") }
|
||||
definingClass("ThemePreviewActivity;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
internal val BytecodePatchContext.onClearDisplayEventMethod by gettingFirstMethodDeclaratively {
|
||||
// Internally the feature is called "Clear mode".
|
||||
name("onClearModeEvent")
|
||||
definingClass { endsWith("/ClearModePanelComponent;") }
|
||||
definingClass("/ClearModePanelComponent;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,19 +11,19 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||
|
||||
internal val BytecodePatchContext.aclCommonShareMethod by gettingFirstMethodDeclaratively {
|
||||
name("getCode")
|
||||
definingClass { endsWith("/ACLCommonShare;") }
|
||||
definingClass("/ACLCommonShare;")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returnType("I")
|
||||
}
|
||||
internal val BytecodePatchContext.aclCommonShare2Method by gettingFirstMethodDeclaratively {
|
||||
name("getShowType")
|
||||
definingClass { endsWith("/ACLCommonShare;") }
|
||||
definingClass("/ACLCommonShare;")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returnType("I")
|
||||
}
|
||||
internal val BytecodePatchContext.aclCommonShare3Method by gettingFirstMethodDeclaratively {
|
||||
name("getTranscode")
|
||||
definingClass { endsWith("/ACLCommonShare;") }
|
||||
definingClass("/ACLCommonShare;")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returnType("I")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||
|
||||
internal val BytecodePatchContext.getSpeedMethod by gettingFirstMethodDeclaratively {
|
||||
name("onFeedSpeedSelectedEvent")
|
||||
definingClass { endsWith("/BaseListFragmentPanel;") }
|
||||
definingClass("/BaseListFragmentPanel;")
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.setSpeedMethod by gettingFirstMethodDeclaratively("enterFrom") {
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.mandatoryLoginServiceMethod by gettingFirstMethodDeclaratively {
|
||||
name("enableForcedLogin")
|
||||
definingClass { endsWith("/MandatoryLoginService;") }
|
||||
definingClass("/MandatoryLoginService;")
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.mandatoryLoginService2Method by gettingFirstMethodDeclaratively {
|
||||
name("shouldShowForcedLogin")
|
||||
definingClass { endsWith("/MandatoryLoginService;") }
|
||||
definingClass("/MandatoryLoginService;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.addSettingsEntryMethod by gettingFirstMethodDeclaratively {
|
||||
name("initUnitManger")
|
||||
definingClass { endsWith("/SettingNewVersionFragment;") }
|
||||
definingClass("/SettingNewVersionFragment;")
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.adPersonalizationActivityOnCreateMethod by gettingFirstMethodDeclaratively {
|
||||
name("onCreate")
|
||||
definingClass { endsWith("/AdPersonalizationActivity;") }
|
||||
definingClass("/AdPersonalizationActivity;")
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.settingsEntryMethod by gettingFirstImmutableMethodDeclaratively(
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val BytecodePatchContext.getEnterFromMethod by gettingFirstImmutableMethodDeclaratively {
|
||||
definingClass { endsWith("/BaseListFragmentPanel;") }
|
||||
definingClass("/BaseListFragmentPanel;")
|
||||
returnType("Ljava/lang/String;")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
parameterTypes("Z")
|
||||
|
|
@ -22,5 +22,5 @@ internal val BytecodePatchContext.getEnterFromMethod by gettingFirstImmutableMet
|
|||
}
|
||||
|
||||
internal val BytecodePatchContext.onRenderFirstFrameMethod by gettingFirstMethodDeclaratively("method_enable_viewpager_preload_duration") {
|
||||
definingClass { endsWith("/BaseListFragmentPanel;") }
|
||||
definingClass("/BaseListFragmentPanel;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.isVIPEPMethod by gettingFirstMethodDeclaratively {
|
||||
name("isVIPEP")
|
||||
definingClass { endsWith("RemoteUser;") }
|
||||
definingClass("RemoteUser;")
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.isVIPMethod by gettingFirstMethodDeclaratively {
|
||||
name("isVIP")
|
||||
definingClass { endsWith("RemoteUser;") }
|
||||
definingClass("RemoteUser;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||
|
||||
internal val BytecodePatchContext.brightnessMethod by gettingFirstMethodDeclaratively {
|
||||
name("run")
|
||||
definingClass { contains("/ScreenPlugin$") }
|
||||
definingClass("/ScreenPlugin$")
|
||||
accessFlags(AccessFlags.PUBLIC)
|
||||
returnType("V")
|
||||
parameterTypes()
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
|||
// This is the constructor of the PostsResponse class.
|
||||
// The same applies here as with the TimelineConstructorMethod.
|
||||
internal val BytecodePatchContext.postsResponseConstructorMethod by gettingFirstMethodDeclaratively {
|
||||
definingClass { endsWith("/PostsResponse;") }
|
||||
definingClass("/PostsResponse;")
|
||||
accessFlags(AccessFlags.CONSTRUCTOR, AccessFlags.PUBLIC)
|
||||
custom { parameters.size == 4 }
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@ internal val BytecodePatchContext.postsResponseConstructorMethod by gettingFirst
|
|||
// It receives the List<TimelineObject> as an argument with a @Json annotation, so this should be the first time
|
||||
// that the List<TimelineObject> is exposed in non-library code.
|
||||
internal val BytecodePatchContext.timelineConstructorMethod by gettingFirstMethodDeclaratively("timelineObjectsList") {
|
||||
definingClass { endsWith("/Timeline;") }
|
||||
definingClass("/Timeline;")
|
||||
custom { parameters[0].type == "Ljava/util/List;" }
|
||||
}
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ internal val BytecodePatchContext.timelineConstructorMethod by gettingFirstMetho
|
|||
// Looking for
|
||||
// if ("BLOCKED_OBJECT_DUMMY".equals(elementType)) iterator.remove();
|
||||
internal val BytecodePatchContext.timelineFilterExtensionMethodMatch by composingFirstMethod("BLOCKED_OBJECT_DUMMY") {
|
||||
definingClass { endsWith("/TimelineFilterPatch;") }
|
||||
definingClass("/TimelineFilterPatch;")
|
||||
opcodes(
|
||||
Opcode.CONST_STRING, // "BLOCKED_OBJECT_DUMMY"
|
||||
Opcode.INVOKE_VIRTUAL, // HashSet.add(^)
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.audioAdsPresenterPlayMethod by gettingFirstMethodDeclaratively {
|
||||
name("playAd")
|
||||
definingClass { endsWith("AudioAdsPlayerPresenter;") }
|
||||
definingClass("AudioAdsPlayerPresenter;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,21 +5,21 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.checkAdEligibilityLambdaMethod by gettingFirstMethodDeclaratively {
|
||||
name("shouldRequestAd")
|
||||
definingClass { endsWith("/AdEligibilityFetcher;") }
|
||||
definingClass("/AdEligibilityFetcher;")
|
||||
returnType("Lio/reactivex/Single;")
|
||||
parameterTypes("L")
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.contentConfigShowAdsMethod by gettingFirstMethodDeclaratively {
|
||||
name("getShowAds")
|
||||
definingClass { endsWith("/ContentConfigData;") }
|
||||
definingClass("/ContentConfigData;")
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.getReadyToShowAdMethod by gettingFirstMethodDeclaratively {
|
||||
name("getReadyToShowAdOrAbort")
|
||||
definingClass { endsWith("/StreamDisplayAdsPresenter;") }
|
||||
definingClass("/StreamDisplayAdsPresenter;")
|
||||
returnType("Ltv/twitch/android/core/mvp/presenter/StateAndAction;")
|
||||
parameterTypes("L", "L")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,15 +9,15 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||
|
||||
internal val BytecodePatchContext.chatUtilCreateDeletedSpanMethod by gettingFirstMethodDeclaratively {
|
||||
name("createDeletedSpanFromChatMessageSpan")
|
||||
definingClass { endsWith("ChatUtil\$Companion;") }
|
||||
definingClass("ChatUtil\$Companion;")
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.deletedMessageClickableSpanCtorMethod by gettingFirstMethodDeclaratively {
|
||||
definingClass { endsWith("DeletedMessageClickableSpan;") }
|
||||
definingClass("DeletedMessageClickableSpan;")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.setHasModAccessMethod by gettingFirstMethodDeclaratively {
|
||||
name("setHasModAccess")
|
||||
definingClass { endsWith("DeletedMessageClickableSpan;") }
|
||||
definingClass("DeletedMessageClickableSpan;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.communityPointsButtonViewDelegateMethod by gettingFirstMethodDeclaratively {
|
||||
name("showClaimAvailable")
|
||||
definingClass { endsWith("CommunityPointsButtonViewDelegate;") }
|
||||
definingClass("CommunityPointsButtonViewDelegate;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,15 +7,15 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.isDebugConfigEnabledMethod by gettingFirstMethodDeclaratively {
|
||||
name("isDebugConfigEnabled")
|
||||
definingClass { endsWith("/BuildConfigUtil;") }
|
||||
definingClass("/BuildConfigUtil;")
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.isOmVerificationEnabledMethod by gettingFirstMethodDeclaratively {
|
||||
name("isOmVerificationEnabled")
|
||||
definingClass { endsWith("/BuildConfigUtil;") }
|
||||
definingClass("/BuildConfigUtil;")
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.shouldShowDebugOptionsMethod by gettingFirstMethodDeclaratively {
|
||||
name("shouldShowDebugOptions")
|
||||
definingClass { endsWith("/BuildConfigUtil;") }
|
||||
definingClass("/BuildConfigUtil;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||
|
||||
internal val BytecodePatchContext.menuGroupsOnClickMethod by gettingFirstMethodDeclaratively {
|
||||
name { contains("render") }
|
||||
definingClass { endsWith("/SettingsMenuViewDelegate;") }
|
||||
definingClass("/SettingsMenuViewDelegate;")
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.STATIC, AccessFlags.FINAL)
|
||||
returnType("V")
|
||||
parameterTypes("L", "L", "L")
|
||||
|
|
@ -19,10 +19,10 @@ internal val BytecodePatchContext.menuGroupsUpdatedMethod by gettingFirstMethodD
|
|||
|
||||
internal val BytecodePatchContext.settingsActivityOnCreateMethod by gettingFirstMethodDeclaratively {
|
||||
name("onCreate")
|
||||
definingClass { endsWith("/SettingsActivity;") }
|
||||
definingClass("/SettingsActivity;")
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.settingsMenuItemEnumMethod by gettingFirstMethodDeclaratively {
|
||||
name("<clinit>")
|
||||
definingClass { endsWith("/SettingsMenuItem;") }
|
||||
definingClass("/SettingsMenuItem;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ import app.revanced.patcher.patch.BytecodePatchContext
|
|||
|
||||
internal val BytecodePatchContext.promoCodeUnlockMethod by gettingFirstMethodDeclaratively {
|
||||
name("isValid")
|
||||
definingClass { endsWith("PromoTokenVerification;") }
|
||||
definingClass("PromoTokenVerification;")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ internal val BytecodePatchContext.disableFastForwardLegacyMethodMatch by composi
|
|||
}
|
||||
|
||||
internal val BytecodePatchContext.disableFastForwardGestureMethodMatch by composingFirstMethod {
|
||||
definingClass { endsWith("/NextGenWatchLayout;") }
|
||||
definingClass("/NextGenWatchLayout;")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ internal val BytecodePatchContext.storyboardRendererDecoderRecommendedLevelMetho
|
|||
}
|
||||
|
||||
internal val BytecodePatchContext.subtitleTrackMethod by gettingFirstMethodDeclaratively("DISABLE_CAPTIONS_OPTION") {
|
||||
definingClass { endsWith("/SubtitleTrack;") }
|
||||
definingClass("/SubtitleTrack;")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returnType("Z")
|
||||
parameterTypes()
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||
|
||||
internal val BytecodePatchContext.mediaRouteButtonMethod by gettingFirstMethodDeclaratively {
|
||||
name("setVisibility")
|
||||
definingClass { endsWith("/MediaRouteButton;") }
|
||||
definingClass("/MediaRouteButton;")
|
||||
parameterTypes("I")
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||
|
||||
internal val BytecodePatchContext.setFullScreenBackgroundColorMethod by gettingFirstMethodDeclaratively {
|
||||
name("onLayout")
|
||||
definingClass { endsWith("/YouTubePlayerViewNotForReflection;") }
|
||||
definingClass("/YouTubePlayerViewNotForReflection;")
|
||||
returnType("V")
|
||||
accessFlags(AccessFlags.PROTECTED, AccessFlags.FINAL)
|
||||
parameterTypes("Z", "I", "I", "I", "I")
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ val playerTypeHookPatch = bytecodePatch(
|
|||
|
||||
apply {
|
||||
firstMethodDeclaratively {
|
||||
definingClass { endsWith("/YouTubePlayerOverlaysLayout;") }
|
||||
definingClass("/YouTubePlayerOverlaysLayout;")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returnType("V")
|
||||
parameterTypes(playerTypeEnumMethod.immutableClassDef.type)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
|||
|
||||
internal val BytecodePatchContext.licenseActivityOnCreateMethod by gettingFirstMethodDeclaratively {
|
||||
name("onCreate")
|
||||
definingClass { endsWith("/LicenseActivity;") }
|
||||
definingClass("/LicenseActivity;")
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returnType("V")
|
||||
parameterTypes("Landroid/os/Bundle;")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue