Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…iAPI into yuki-api
  • Loading branch information
Art-Chen committed May 19, 2024
2 parents 1d75c9c + 22118a6 commit 591b48f
Show file tree
Hide file tree
Showing 10 changed files with 390 additions and 175 deletions.
10 changes: 10 additions & 0 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'com.google.devtools.ksp' version '1.9.10-1.0.13'
id 'com.google.devtools.ksp' version '1.9.23-1.0.20'
}

android {
Expand Down Expand Up @@ -64,6 +64,5 @@ dependencies {
compileOnly("de.robv.android.xposed:api:82")
implementation 'com.highcapable.yukihookapi:api:1.2.0'
ksp 'com.highcapable.yukihookapi:ksp-xposed:1.2.0'
// implementation("com.highcapable.yukireflection:api:1.0.3")

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package moe.chenxy.miuiextra.hooker.entity

import android.util.Log
import android.view.View
import androidx.dynamicanimation.animation.SpringAnimation
import com.highcapable.yukihookapi.hook.entity.YukiBaseHooker
import com.highcapable.yukihookapi.hook.factory.method
Expand Down Expand Up @@ -51,11 +52,15 @@ object MiuiHomeHook : YukiBaseHooker() {
}.hook {
after {
mainPrefs.reload()
val view = this.args[0] as View
val id = this.args[1] as Int
val mode = mainPrefs.getString("miui_unlock_anim_enhance_menu", "0")?.toInt()
if (mode == 0) return@after

val springAnimation = this.result
if (this.args[2] == -1500.0f) {
var dumping = 0.78f
var response = 0.35f
var dumping = this.args[4]
var response = this.args[5]
when (mode) {
1 -> {
dumping = 0.68f
Expand All @@ -72,8 +77,8 @@ object MiuiHomeHook : YukiBaseHooker() {
dumping,
response
)

}
view.setTag(id, springAnimation)
this.result = springAnimation
}
}
Expand Down
Loading

0 comments on commit 591b48f

Please sign in to comment.