Skip to content

Commit

Permalink
HomeHandleAnim: optimize and add anim custom settings
Browse files Browse the repository at this point in the history
* Fix Blur not working as experted
* Add Animation customize feature
* support disable movement for home handle but keep anim
* a little power & performance optimize
* Workaround home handle can not hide when window hide

Signed-off-by: Art_Chen <[email protected]>
  • Loading branch information
Art-Chen committed May 19, 2024
1 parent 591b48f commit 717c647
Show file tree
Hide file tree
Showing 13 changed files with 472 additions and 106 deletions.
3 changes: 3 additions & 0 deletions .idea/deploymentTargetDropDown.xml

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

4 changes: 4 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
android:name=".view.activity.WallpaperZoomActivity"
android:exported="false"
android:parentActivityName=".view.activity.SettingsActivity" />
<activity
android:name=".view.activity.HomeHandleCustomActivity"
android:exported="false"
android:parentActivityName=".view.activity.SettingsActivity" />
<activity
android:name=".view.activity.SettingsActivity"
android:launchMode="singleTask"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import de.robv.android.xposed.XSharedPreferences
import de.robv.android.xposed.XposedHelpers
import moe.chenxy.miuiextra.BuildConfig
import moe.chenxy.miuiextra.hooker.entity.SystemHooker.toClass
import moe.chenxy.miuiextra.hooker.entity.framework.StartingWindowOptimize
import moe.chenxy.miuiextra.hooker.entity.framework.VibratorMapHooker

object SystemHooker : YukiBaseHooker() {
Expand All @@ -32,6 +33,7 @@ object SystemHooker : YukiBaseHooker() {
override fun onHook() {
// Vibrator Mapper
loadHooker(VibratorMapHooker)
loadHooker(StartingWindowOptimize)

// Hook for Wallpaper Scale Settings
"com.android.server.wm.WallpaperController".toClass().method {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package moe.chenxy.miuiextra.hooker.entity.framework

import android.util.Log
import com.highcapable.yukihookapi.hook.entity.YukiBaseHooker
import com.highcapable.yukihookapi.hook.factory.method

object StartingWindowOptimize :YukiBaseHooker() {
override fun onHook() {
"com.android.server.wm.ActivityRecord".toClass().method {
name = "getStartingWindowType"
paramCount = 7
}.hook {
after {
Log.i("Art_Chen", "Starting Window Type ${this.result}")
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ object VibratorMapHooker : YukiBaseHooker(){
XposedHelpers.callMethod(mPrebakedSegment, "getEffectId") as Int

if (mEffectMap.containsKey(effectId)) {
Log.i(
Log.v(
"Art_Chen",
"[Effect Vibrate Mapper] mapped $effectId to ${mEffectMap[effectId]}"
)
Expand Down
Loading

0 comments on commit 717c647

Please sign in to comment.