|
1 | 1 | package app.revanced.patches.reddit.customclients.syncforreddit.api
|
2 | 2 |
|
3 |
| -import app.revanced.util.exception |
4 | 3 | import app.revanced.patcher.data.BytecodeContext
|
5 | 4 | import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
6 | 5 | import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
7 | 6 | import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
8 | 7 | import app.revanced.patcher.fingerprint.MethodFingerprintResult
|
9 | 8 | import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
|
10 |
| -import app.revanced.patches.reddit.customclients.Constants.OAUTH_USER_AGENT |
11 | 9 | import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetAuthorizationStringFingerprint
|
12 | 10 | import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetBearerTokenFingerprint
|
13 | 11 | import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.ImgurImageAPIFingerprint
|
14 | 12 | import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.LoadBrowserURLFingerprint
|
15 | 13 | import app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.DisablePiracyDetectionPatch
|
| 14 | +import app.revanced.util.exception |
16 | 15 | import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
17 | 16 | import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
18 | 17 | import com.android.tools.smali.dexlib2.iface.reference.StringReference
|
@@ -76,18 +75,4 @@ object SpoofClientPatch : AbstractSpoofClientPatch(
|
76 | 75 | "const-string v1, \"https://api.imgur.com/3/image\""
|
77 | 76 | )
|
78 | 77 | }
|
79 |
| - |
80 |
| - override fun Set<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext) { |
81 |
| - first().let { result -> |
82 |
| - val insertIndex = result.scanResult.patternScanResult!!.startIndex |
83 |
| - |
84 |
| - result.mutableMethod.addInstructions( |
85 |
| - insertIndex, |
86 |
| - """ |
87 |
| - const-string v0, "$OAUTH_USER_AGENT" |
88 |
| - invoke-virtual {p1, v0}, Landroid/webkit/WebSettings;->setUserAgentString(Ljava/lang/String;)V |
89 |
| - """ |
90 |
| - ) |
91 |
| - } |
92 |
| - } |
93 | 78 | }
|
0 commit comments