Repository navigation
Conversation
Contributor
Author
Screen_Recording_20261116_152443_One.UI.X.mp4 |
Owner
|
代码行数太多了,有7400行,不接受。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
内容
在 SystemUI > 快捷设置 下新增开关“快捷通知面板动画”(One UI 8.5 及以上显示)。开启后,为通知面板和快捷设置加入来自 ColorMotion 的动画:弹簧动效、逐条通知动效、模糊和边缘渐隐。
需要使用三星的分开式面板(左侧下拉通知,右侧下拉快捷设置)。合并式面板下这套动画不会生效。
来源与许可证
移植自 juccul 的 ColorMotion(https://github.com/juccul/ColorMotion),许可证为 GPL v3。按 GPL v3 第 13 条,可以与本项目的 AGPL v3 合并,合并后的整体仍以 AGPL v3 发布。
licenses/ColorMotion-GPL-3.0.txtTHIRD_PARTY_COLORMOTION.mdColorMotion 自带的 Audio Eraser 横幅过滤没有带入,因为 OneUIX 已经有了。
接入方式
hook/src/main/java/dev/colormotion:ColorMotion 源码,入口为Entry.install(classLoader)。仅当开关开启、且系统为 One UI 8.5 及以上并且是 Android 15 及以上时,才由QS.colorMotionAnimation()调用。hook/src/main/java/de/robv/android/xposed:一层很小的兼容代码,把 ColorMotion 使用的旧版钩子接口(before/after 回调)转换到 libxposed 上,这样移植的代码可以保持原样。cm-native-api和cm-native-bridge:仅用于编译的桩类,以及一个很小的类型化桥接模块。它用 D8 打包成assets/colormotion-native.dex,运行时用 SystemUI 的类加载器加载,会在构建hook之前自动构建。开关关闭时不会安装任何钩子。
一并包含的 bug 修复
测试中顺带修复了 ColorMotion 本身的一个 bug:先打开快捷设置,再打开通知面板时,顶部的时钟会被抬高,紧贴运营商名称,直到关闭面板才恢复。
原因:快捷设置收起时,
QsRows.snapHidden()会把 QS 的视图留在隐藏位置的位移上,而通知面板展开时没有把它复位。修复:当通知面板驱动标题时,用
releaseStaleQsHost()把这个位移复位为 0。同样的修复也已提交给 ColorMotion 上游(juccul/ColorMotion#1)。测试