feat(photoshopmix): Update to use new patch format
This commit is contained in:
parent
7de0b96bed
commit
ee71723e89
2 changed files with 12 additions and 33 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package app.revanced.patches.photoshopmix
|
||||
|
||||
import app.revanced.patcher.firstMethod
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
|
|
@ -11,12 +12,18 @@ val disableLoginPatch = bytecodePatch(
|
|||
) {
|
||||
compatibleWith("com.adobe.photoshopmix")
|
||||
|
||||
execute {
|
||||
disableLoginFingerprint.method.returnEarly(true)
|
||||
apply {
|
||||
var psMixFragment = "Lcom/adobe/photoshopmix/PSMixFragment;"
|
||||
var firstLoginMethod = firstMethod{ name == "isLoggedIn" && definingClass == "Lcom/adobe/acira/accreativecloudlibrary/CreativeCloudSource;" && returnType == "Z"}
|
||||
var libButtonClickedMethod = firstMethod{name=="ccLibButtonClickHandler" && definingClass==psMixFragment}
|
||||
var lightroomButtonClickedMethod = firstMethod{name=="lightroomButtonClickHandler" && definingClass==psMixFragment}
|
||||
var ccButtonClickedMethod = firstMethod{name=="ccButtonClickHandler" && definingClass==psMixFragment}
|
||||
|
||||
firstLoginMethod.returnEarly(true)
|
||||
|
||||
// Disables these buttons that cause the app to crash while not logged in
|
||||
libButtonClickedFingerprint.method.returnEarly()
|
||||
lightroomButtonClickedFingerprint.method.returnEarly()
|
||||
ccButtonClickedFingerprint.method.returnEarly()
|
||||
libButtonClickedMethod.returnEarly()
|
||||
lightroomButtonClickedMethod.returnEarly()
|
||||
ccButtonClickedMethod.returnEarly()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
package app.revanced.patches.photoshopmix
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
|
||||
internal val disableLoginFingerprint = fingerprint {
|
||||
custom { method, classDef ->
|
||||
classDef.endsWith("CreativeCloudSource;") && method.name == "isLoggedIn"
|
||||
}
|
||||
returns("Z")
|
||||
}
|
||||
|
||||
internal val libButtonClickedFingerprint = fingerprint {
|
||||
custom { method, classDef ->
|
||||
classDef.endsWith("PSMixFragment;") && method.name == "ccLibButtonClickHandler"
|
||||
}
|
||||
}
|
||||
|
||||
internal val lightroomButtonClickedFingerprint = fingerprint {
|
||||
custom { method, classDef ->
|
||||
classDef.endsWith("PSMixFragment;") && method.name == "lightroomButtonClickHandler"
|
||||
}
|
||||
}
|
||||
|
||||
internal val ccButtonClickedFingerprint = fingerprint {
|
||||
custom { method, classDef ->
|
||||
classDef.endsWith("PSMixFragment;") && method.name == "ccButtonClickHandler"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue