Skip to content

Commit

Permalink
WallpaperZoomNewArch: trigger reset when doze
Browse files Browse the repository at this point in the history
Signed-off-by: Art_Chen <[email protected]>
  • Loading branch information
Art-Chen committed Oct 27, 2024
1 parent ffdeb95 commit 7d05720
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package moe.chenxy.miuiextra.hooker.entity.home

import android.annotation.SuppressLint
import android.view.Display
import com.highcapable.yukihookapi.hook.entity.YukiBaseHooker
import com.highcapable.yukihookapi.hook.factory.method
import de.robv.android.xposed.XposedHelpers
Expand Down Expand Up @@ -118,6 +119,22 @@ object WallpaperZoomOptimizeOS1NewArch : YukiBaseHooker() {

}
}

method {
name = "onDisplayChange"
}.hook {
after {
val displayState = XposedHelpers.getIntField(this.instance, "mOldDisplayState")
if (displayState == Display.STATE_DOZE) {
// reset
mWallpaperElement?.apply {
if (currentZoom < 1f) {
XposedHelpers.callMethod(this, "updateElementProperty", 1f)
}
}
}
}
}
}
}
}

0 comments on commit 7d05720

Please sign in to comment.