修复模块吐垃圾

This commit is contained in:
乌堆小透明
2022-03-01 23:40:33 +08:00
parent 840b4654e3
commit 963b76cda1
2 changed files with 55 additions and 43 deletions

View File

@@ -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) {

View File

@@ -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
@@ -42,12 +43,18 @@ class StatusBarTimeCustomization : IXposedHookLoadPackage {
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 =
XSPUtils.getInt("status_bar_clock_size", 0).toFloat()
textV.setTextSize(TypedValue.COMPLEX_UNIT_DIP, clock_size) 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) {
}
} }
}) })
} }