mirror of
https://github.com/revanced/revanced-patches
synced 2024-12-03 20:42:57 +01:00
refactor: Name and comment variable properly
This commit is contained in:
parent
28f6ac150e
commit
45b6a08980
@ -25,12 +25,12 @@ object SpoofClientPatch : BaseSpoofClientPatch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun Set<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext) {
|
override fun Set<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext) {
|
||||||
// Use a random user agent.
|
// Use a random number as the platform in the user agent string.
|
||||||
val randomName = (0..100000).random()
|
val platformName = (0..100000).random()
|
||||||
|
|
||||||
first().mutableMethod.addInstructions(
|
first().mutableMethod.addInstructions(
|
||||||
1,
|
1,
|
||||||
"const-string v3, \"$randomName\"",
|
"const-string v3, \"$platformName\"",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user