mirror of
https://github.com/LittleTurtle2333/SimplicityTools.git
synced 2026-07-12 19:31:17 +08:00
修复模块吐垃圾
This commit is contained in:
@@ -56,8 +56,6 @@ public class CorePatch extends XposedHelper implements IXposedHookLoadPackage {
|
|||||||
// + " or newer for package " + apkPath
|
// + " or newer for package " + apkPath
|
||||||
findAndHookMethod("android.util.apk.ApkSignatureVerifier", loadPackageParam.classLoader, "getMinimumSignatureSchemeVersionForTargetSdk", int.class,
|
findAndHookMethod("android.util.apk.ApkSignatureVerifier", loadPackageParam.classLoader, "getMinimumSignatureSchemeVersionForTargetSdk", int.class,
|
||||||
new ReturnConstant(prefs, "corepatch", 0));
|
new ReturnConstant(prefs, "corepatch", 0));
|
||||||
findAndHookMethod("com.android.apksig.ApkVerifier", loadPackageParam.classLoader, "getMinimumSignatureSchemeVersionForTargetSdk", int.class,
|
|
||||||
new ReturnConstant(prefs, "corepatch", 0));
|
|
||||||
|
|
||||||
// Package " + packageName + " signatures do not match previously installed version; ignoring!"
|
// Package " + packageName + " signatures do not match previously installed version; ignoring!"
|
||||||
// public boolean checkCapability(String sha256String, @CertCapabilities int flags) {
|
// public boolean checkCapability(String sha256String, @CertCapabilities int flags) {
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ class StatusBarTimeCustomization : IXposedHookLoadPackage {
|
|||||||
Integer.TYPE,
|
Integer.TYPE,
|
||||||
object : XC_MethodHook() {
|
object : XC_MethodHook() {
|
||||||
override fun afterHookedMethod(param: MethodHookParam) {
|
override fun afterHookedMethod(param: MethodHookParam) {
|
||||||
|
try {
|
||||||
c = param.args[0] as Context
|
c = param.args[0] as Context
|
||||||
val textV = param.thisObject as TextView
|
val textV = param.thisObject as TextView
|
||||||
textV.isSingleLine = false
|
textV.isSingleLine = false
|
||||||
@@ -41,14 +42,20 @@ class StatusBarTimeCustomization : IXposedHookLoadPackage {
|
|||||||
if (XSPUtils.getBoolean("status_bar_time_double_line", false)) {
|
if (XSPUtils.getBoolean("status_bar_time_double_line", false)) {
|
||||||
str = "\n"
|
str = "\n"
|
||||||
var clock_double_line_size = 7F
|
var clock_double_line_size = 7F
|
||||||
if (XSPUtils.getInt("status_bar_clock_double_line_size",0) != 0 ){
|
if (XSPUtils.getInt("status_bar_clock_double_line_size", 0) != 0) {
|
||||||
clock_double_line_size = XSPUtils.getInt("status_bar_clock_double_line_size",0).toFloat()
|
clock_double_line_size =
|
||||||
|
XSPUtils.getInt("status_bar_clock_double_line_size", 0)
|
||||||
|
.toFloat()
|
||||||
}
|
}
|
||||||
textV.setTextSize(TypedValue.COMPLEX_UNIT_DIP,clock_double_line_size)
|
textV.setTextSize(
|
||||||
|
TypedValue.COMPLEX_UNIT_DIP,
|
||||||
|
clock_double_line_size
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
if (XSPUtils.getInt("status_bar_clock_size",0) != 0 ){
|
if (XSPUtils.getInt("status_bar_clock_size", 0) != 0) {
|
||||||
val clock_size = XSPUtils.getInt("status_bar_clock_size",0).toFloat()
|
val clock_size =
|
||||||
textV.setTextSize(TypedValue.COMPLEX_UNIT_DIP,clock_size)
|
XSPUtils.getInt("status_bar_clock_size", 0).toFloat()
|
||||||
|
textV.setTextSize(TypedValue.COMPLEX_UNIT_DIP, clock_size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,6 +76,9 @@ class StatusBarTimeCustomization : IXposedHookLoadPackage {
|
|||||||
1000 - System.currentTimeMillis() % 1000,
|
1000 - System.currentTimeMillis() % 1000,
|
||||||
1000
|
1000
|
||||||
)
|
)
|
||||||
|
|
||||||
|
} catch (e: java.lang.Exception) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -76,6 +86,7 @@ class StatusBarTimeCustomization : IXposedHookLoadPackage {
|
|||||||
object : XC_MethodHook() {
|
object : XC_MethodHook() {
|
||||||
@SuppressLint("SetTextI18n", "SimpleDateFormat")
|
@SuppressLint("SetTextI18n", "SimpleDateFormat")
|
||||||
override fun afterHookedMethod(param: MethodHookParam) {
|
override fun afterHookedMethod(param: MethodHookParam) {
|
||||||
|
try {
|
||||||
val textV = param.thisObject as TextView
|
val textV = param.thisObject as TextView
|
||||||
if (textV.resources.getResourceEntryName(textV.id) == "clock") {
|
if (textV.resources.getResourceEntryName(textV.id) == "clock") {
|
||||||
val t = Settings.System.getString(
|
val t = Settings.System.getString(
|
||||||
@@ -89,6 +100,9 @@ class StatusBarTimeCustomization : IXposedHookLoadPackage {
|
|||||||
t
|
t
|
||||||
) + getSecond()
|
) + getSecond()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} catch (e: Exception) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user