-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
优化移动网络类型显示逻辑 && 优化通知中心天气点击逻辑 (#1014)
- 暂时移除对于 OS1 安装新版桌面的解锁布局 HOOK - 优化跳转天气应用后自动关闭通知中心 - 优化大 5G 反色逻辑 - 修复移动网络活动指示器在部分情况显示多余 padding 的问题 Co-authored-by: 铃柒柒 <[email protected]>
- Loading branch information
1 parent
3331797
commit 96c263d
Showing
12 changed files
with
324 additions
and
272 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
32 changes: 27 additions & 5 deletions
32
app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/Dependency.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,47 @@ | ||
package com.sevtinge.hyperceiler.module.hook.systemui | ||
|
||
import com.github.kyuubiran.ezxhelper.* | ||
import com.sevtinge.hyperceiler.module.hook.systemui.statusbar.model.MobileTypeSingle2Hook.findClass | ||
import com.sevtinge.hyperceiler.utils.* | ||
|
||
import de.robv.android.xposed.XposedHelpers.* | ||
|
||
@Suppress("MemberVisibilityCanBePrivate") | ||
object Dependency { | ||
private const val DEPENDENCY = "com.android.systemui.Dependency" | ||
val sDependency by lazy { | ||
findClass(DEPENDENCY, EzXHelper.classLoader).getStaticObjectField("sDependency") | ||
|
||
private val dependencyClz by lazy { | ||
findClass(DEPENDENCY, EzXHelper.classLoader) | ||
} | ||
val mMiuiLegacyDependency : Any? | ||
|
||
/* ========================== only for HyperOS2 ========================== */ | ||
@JvmStatic | ||
@get:JvmName(name = "getDependency") | ||
val sDependency: Any? | ||
get() = dependencyClz.getStaticObjectField("sDependency") | ||
|
||
@JvmStatic | ||
@get:JvmName(name = "getMiuiLegacyDependency") | ||
val mMiuiLegacyDependency: Any? | ||
get() = sDependency?.getObjectField("mMiuiLegacyDependency") | ||
val mDependencies : Map<*, *>? | ||
|
||
@JvmStatic | ||
@get:JvmName(name = "getDependencies") | ||
val mDependencies: Map<*, *>? | ||
get() = sDependency?.getObjectField("mDependencies") as Map<*, *>? | ||
|
||
@JvmStatic | ||
fun getDependencyInner(depClz: Class<*>): Any? { | ||
return sDependency?.callMethod("getDependencyInner", depClz) | ||
} | ||
|
||
@JvmStatic | ||
fun getDependencyInner(depClzName: String): Any? { | ||
return getDependencyInner(findClass(depClzName, EzXHelper.classLoader)) | ||
} | ||
|
||
/* ========================== only for HyperOS1 ========================== */ | ||
@JvmStatic | ||
fun get(depClz: Class<*>): Any? { | ||
return dependencyClz.callStaticMethod("get", depClz) | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
app/src/main/java/com/sevtinge/hyperceiler/module/hook/systemui/InterfacesImplManager.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.sevtinge.hyperceiler.module.hook.systemui | ||
|
||
import com.github.kyuubiran.ezxhelper.* | ||
import com.sevtinge.hyperceiler.utils.* | ||
import de.robv.android.xposed.XposedHelpers.* | ||
|
||
/** | ||
* only for HyperOS2 | ||
*/ | ||
object InterfacesImplManager { | ||
private const val IMPL_MANAGER = "com.miui.systemui.interfacesmanager.InterfacesImplManager" | ||
|
||
const val I_ACTIVITY_STARTER = "com.android.systemui.plugins.ActivityStarter" | ||
|
||
@JvmStatic | ||
@get:JvmName(name = "getClassContainer") | ||
val sClassContainer by lazy { | ||
managerClz.getStaticObjectFieldAs<Map<Class<*>, Any>>("sClassContainer") | ||
} | ||
|
||
private val managerClz by lazy { | ||
findClass(IMPL_MANAGER, EzXHelper.classLoader) | ||
} | ||
|
||
@JvmStatic | ||
fun registerImpl(clz: Class<*>, obj: Any) { | ||
managerClz.callStaticMethod("registerImpl", clz, obj) | ||
} | ||
} |
Oops, something went wrong.