Compare commits

12 Commits

Author SHA1 Message Date
乌堆小透明
1b6d6dd64d New translations strings.xml (Chinese Traditional)
[ci skip] New translations from Crowdin
2022-04-03 09:48:21 +08:00
乌堆小透明
4197a3f9cf New translations strings.xml (Chinese Traditional)
[ci skip] New translations from Crowdin
2022-04-03 08:36:54 +08:00
乌堆小透明
409b6f23f1 New translations strings.xml (Spanish)
[ci skip] New translations from Crowdin
2022-04-03 02:49:07 +08:00
乌堆小透明
7955eb5d61 New translations strings.xml (Turkish)
[ci skip] New translations from Crowdin
2022-04-03 02:48:54 +08:00
乌堆小透明
fde524365e Merge branch 'main' into l10n_main 2022-04-03 00:05:50 +08:00
乌堆小透明
54a52695e2 New translations strings.xml (Spanish)
[ci skip] New translations from Crowdin
2022-04-03 00:04:25 +08:00
乌堆小透明
77f9f2ef7e New translations strings.xml (Russian)
[ci skip] New translations from Crowdin
2022-04-03 00:04:12 +08:00
乌堆小透明
c08589b99b New translations strings.xml (Chinese Simplified)
[ci skip] New translations from Crowdin
2022-04-03 00:04:08 +08:00
乌堆小透明
c8896104d8 New translations strings.xml (Romanian)
[ci skip] New translations from Crowdin
2022-04-03 00:04:03 +08:00
乌堆小透明
9c6a02d616 New translations strings.xml (Romanian)
[ci skip] New translations from Crowdin
2022-04-02 23:10:48 +08:00
乌堆小透明
7fdd191b25 New translations strings.xml (Chinese Traditional)
[ci skip] New translations from Crowdin
2022-04-02 23:05:16 +08:00
乌堆小透明
5d9453f828 New translations strings.xml (Spanish)
[ci skip] New translations from Crowdin
2022-04-02 23:05:15 +08:00
10 changed files with 4 additions and 171 deletions

View File

@@ -12,8 +12,8 @@ android {
applicationId = "com.lt2333.simplicitytools"
minSdk = 31
targetSdk = 32
versionCode = 59
versionName = "1.5.8"
versionCode = 58
versionName = "1.5.7"
}
buildTypes {

View File

@@ -195,8 +195,7 @@ class SettingsActivity : MIUIActivity() {
"killall com.android.updater",
"killall com.miui.mediaeditor",
"killall com.miui.screenshot",
"killall com.milink.service",
"killall com.xiaomi.misubscreenui",
"killall com.milink.service"
)
ShellUtils.execCommand(command, true)
dismiss()
@@ -1606,16 +1605,6 @@ class SettingsActivity : MIUIActivity() {
)
)
add(LineV())
add(TitleTextV(resId = R.string.rear_display))
add(
TextSummaryWithSwitchV(
TextSummaryV(
textId = R.string.show_weather_main_switch,
),
SwitchV("rear_show_weather")
)
)
add(LineV())
add(TitleTextV(resId = R.string.remove_ad))
add(
TextSummaryWithSwitchV(

View File

@@ -24,7 +24,6 @@ class XposedEntry : EasyXposedInit() {
ThemeManager, // 主题壁纸
ScreenShot, // 截屏
Cast, //投屏
RearDisplay, //背屏
)
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam?) {

View File

@@ -1,19 +0,0 @@
package com.lt2333.simplicitytools.hook.app
import com.lt2333.simplicitytools.hook.app.cast.RearDisplayWeather
import com.lt2333.simplicitytools.util.xposed.base.AppRegister
import de.robv.android.xposed.XposedBridge
import de.robv.android.xposed.callbacks.XC_LoadPackage
object RearDisplay: AppRegister() {
override val packageName: String = "com.xiaomi.misubscreenui"
override val processName: List<String> = emptyList()
override val logTag: String = "Simplicitytools"
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
XposedBridge.log("Simplicitytools: 成功 Hook "+javaClass.simpleName)
autoInitHooks(lpparam,
RearDisplayWeather, //背屏显示天气
)
}
}

View File

@@ -1,131 +0,0 @@
package com.lt2333.simplicitytools.hook.app.cast
import android.annotation.SuppressLint
import android.graphics.Typeface
import android.util.TypedValue
import android.view.Gravity
import android.view.View
import android.view.ViewGroup
import android.widget.RelativeLayout
import android.widget.TextView
import cn.fkj233.ui.activity.dp2px
import com.github.kyuubiran.ezxhelper.utils.findMethod
import com.github.kyuubiran.ezxhelper.utils.hookMethod
import com.lt2333.simplicitytools.util.hasEnable
import com.lt2333.simplicitytools.util.xposed.base.HookRegister
import com.lt2333.simplicitytools.view.WeatherView
object RearDisplayWeather : HookRegister() {
@SuppressLint("ResourceType")
override fun init() {
hasEnable("rear_show_weather") {
findMethod("com.xiaomi.misubscreenui.light.aod.view.VerticalClockView") {
name == "onFinishInflate"
}.hookMethod {
before {
val viewGroup = it.thisObject as ViewGroup
val context = viewGroup.context
//获取原组件
val gradientLayoutID =
context.resources.getIdentifier(
"gradient_layout",
"id",
context.packageName
)
val gradientLayout: ViewGroup = viewGroup.findViewById(gradientLayoutID)
val dateID =
context.resources.getIdentifier("date", "id", context.packageName)
val date: TextView = viewGroup.findViewById(dateID)
//创建天气组件
val mWeatherView = WeatherView(context, false).apply {
gravity = Gravity.END
setTextAppearance(
context.resources.getIdentifier(
"Sub_Screen_Aod_date_s",
"style",
context.packageName
)
)
typeface = Typeface.create("mipro-medium", Typeface.NORMAL)
setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14f)
}
gradientLayout.addView(mWeatherView, (gradientLayout.indexOfChild(date) + 1))
}
}
findMethod("com.xiaomi.misubscreenui.light.aod.view.HorizontalClockView") {
name == "onFinishInflate"
}.hookMethod {
before {
val viewGroup = it.thisObject as ViewGroup
val context = viewGroup.context
//获取原组件
val gradientLayoutID =
context.resources.getIdentifier(
"gradient_layout",
"id",
context.packageName
)
val gradientLayout: RelativeLayout = viewGroup.findViewById(gradientLayoutID)
val dateID =
context.resources.getIdentifier("date", "id", context.packageName)
val date: TextView = viewGroup.findViewById(dateID)
val dateParentLayout: ViewGroup = date.parent as ViewGroup
//创建天气组件
val mWeatherView = WeatherView(context, false).apply {
id = View.generateViewId()
gravity = Gravity.CENTER
maxLines = 1
setTextAppearance(
context.resources.getIdentifier(
"Sub_Screen_Aod_date_s_horizontal",
"style",
context.packageName
)
)
typeface = Typeface.create("mipro-medium", 0)
layoutParams = RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.WRAP_CONTENT, dp2px(context, 30f)
).also {
it.addRule(RelativeLayout.END_OF, dateID)
it.marginStart = dp2px(context, 2f)
it.marginEnd = dp2px(context, 2f)
}
}
dateParentLayout.addView(
mWeatherView,
(dateParentLayout.indexOfChild(date) + 1)
)
//电池位置
val batteryID =
context.resources.getIdentifier(
"battery_container",
"id",
context.packageName
)
val battery: ViewGroup = viewGroup.findViewById(batteryID)
battery.layoutParams = RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.WRAP_CONTENT, dp2px(context, 30f)
).also {
it.addRule(RelativeLayout.END_OF, mWeatherView.id)
}
}
}
}
}
}

View File

@@ -209,5 +209,4 @@
<string name="UsePreSig_summary">Yüklerken her zaman önceden yüklenmiş uygulamaların imzalarını kullanın.\nBu son derece <b>tehlikelidir</b>.\nYalnızca gerçekten gerektiğinde etkinleştirin!</string>
<string name="enhancedMode">Gelişmiş Mod</string>
<string name="enhancedMode_summary">Uygulamada bazı doğrulamaları geç</string>
<string name="rear_display">Arka Ekran (11Ultra</string>
</resources>

View File

@@ -208,5 +208,4 @@
<string name="UsePreSig_summary">安装时总是使用已安装应用的签名。\n不是一般的<b>危险</b>\n仅在绝对需要时启用</string>
<string name="enhancedMode">增强模式</string>
<string name="enhancedMode_summary">可以解决一些APP内部的完整性校验一般不需要开启</string>
<string name="rear_display">背屏 (11Ultra)</string>
</resources>

View File

@@ -208,5 +208,4 @@
<string name="UsePreSig_summary">安裝時始終使用已安裝應用的簽名\n這非常<b>危險</b>\n僅在真正需要時啟用</string>
<string name="enhancedMode">增強模式</string>
<string name="enhancedMode_summary">可以解決一些應用內部的完整性較驗,一般不需要開啟</string>
<string name="rear_display">後螢幕11Ultra</string>
</resources>

View File

@@ -12,6 +12,5 @@
<item>com.android.thememanager</item>
<item>com.miui.screenshot</item>
<item>com.milink.service</item>
<item>com.xiaomi.misubscreenui</item>
</string-array>
</resources>

View File

@@ -212,5 +212,4 @@
<string name="UsePreSig_summary">Always use signatures from already installed apps when installing.\nThis is extremely <b>dangerous</b>.\nOnly enable when really needed!</string>
<string name="enhancedMode">Enhanced Mode</string>
<string name="enhancedMode_summary">Pass some validation in the application</string>
<string name="rear_display">Rear Display (11Ultra)</string>
</resources>