mirror of
https://github.com/LittleTurtle2333/SimplicityTools.git
synced 2026-07-12 19:31:17 +08:00
8
app/proguard-rules.pro
vendored
8
app/proguard-rules.pro
vendored
@@ -23,14 +23,6 @@
|
|||||||
public void *(de.robv.android.xposed.callbacks.XC_LoadPackage$LoadPackageParam);
|
public void *(de.robv.android.xposed.callbacks.XC_LoadPackage$LoadPackageParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
-keep class * implements de.robv.android.xposed.IXposedHookInitPackageResources {
|
|
||||||
public void *(de.robv.android.xposed.callbacks.XC_InitPackageResources$InitPackageResourcesParam);
|
|
||||||
}
|
|
||||||
|
|
||||||
-keep class * implements de.robv.android.xposed.IXposedHookZygoteInit {
|
|
||||||
public void *(de.robv.android.xposed.IXposedHookZygoteInit$StartupParam);
|
|
||||||
}
|
|
||||||
|
|
||||||
-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
|
-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
|
||||||
public static void check*(...);
|
public static void check*(...);
|
||||||
public static void throw*(...);
|
public static void throw*(...);
|
||||||
|
|||||||
@@ -5,12 +5,11 @@
|
|||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:theme="@style/AppTheme"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true" >
|
android:supportsRtl="true"
|
||||||
|
android:theme="@style/AppTheme">
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.SettingsActivity"
|
android:name=".activity.SettingsActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import android.view.View
|
|||||||
import android.widget.Switch
|
import android.widget.Switch
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import cn.fkj233.ui.activity.MIUIActivity
|
import cn.fkj233.ui.activity.MIUIActivity
|
||||||
|
import cn.fkj233.ui.activity.OwnSP
|
||||||
import cn.fkj233.ui.activity.view.*
|
import cn.fkj233.ui.activity.view.*
|
||||||
import cn.fkj233.ui.dialog.MIUIDialog
|
import cn.fkj233.ui.dialog.MIUIDialog
|
||||||
import com.lt2333.simplicitytools.BuildConfig
|
import com.lt2333.simplicitytools.BuildConfig
|
||||||
@@ -206,7 +207,7 @@ class SettingsActivity : MIUIActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//关于页面
|
//关于页面
|
||||||
fun aboutItems(): ArrayList<BaseView> {
|
private fun aboutItems(): ArrayList<BaseView> {
|
||||||
return ArrayList<BaseView>().apply {
|
return ArrayList<BaseView>().apply {
|
||||||
add(
|
add(
|
||||||
AuthorV(
|
AuthorV(
|
||||||
@@ -436,6 +437,23 @@ class SettingsActivity : MIUIActivity() {
|
|||||||
SwitchV("remove_small_window_restrictions")
|
SwitchV("remove_small_window_restrictions")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
add(TextSummaryArrowV(TextSummaryV(textId = R.string.max_wallpaper_scale, onClickListener = {
|
||||||
|
MIUIDialog(activity).apply {
|
||||||
|
setTitle(R.string.max_wallpaper_scale)
|
||||||
|
setEditText("", "${activity.getString(R.string.def)}1.1, ${activity.getString(R.string.current)}${OwnSP.ownSP.getFloat("max_wallpaper_scale", 1.1f)}")
|
||||||
|
setLButton(textId = R.string.cancel) {
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
setRButton(textId = R.string.Done) {
|
||||||
|
OwnSP.ownSP.edit().run {
|
||||||
|
putFloat("max_wallpaper_scale", getEditText().toFloat())
|
||||||
|
apply()
|
||||||
|
}
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
show()
|
||||||
|
}
|
||||||
|
})))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -677,7 +695,12 @@ class SettingsActivity : MIUIActivity() {
|
|||||||
SwitchV("hide_battery_charging_icon")
|
SwitchV("hide_battery_charging_icon")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
add(TextWithSwitchV(TextV(resId = R.string.hide_gps_icon), SwitchV("hide_gps_icon")))
|
add(
|
||||||
|
TextWithSwitchV(
|
||||||
|
TextV(resId = R.string.hide_gps_icon),
|
||||||
|
SwitchV("hide_gps_icon")
|
||||||
|
)
|
||||||
|
)
|
||||||
add(
|
add(
|
||||||
TextWithSwitchV(
|
TextWithSwitchV(
|
||||||
TextV(resId = R.string.hide_bluetooth_icon),
|
TextV(resId = R.string.hide_bluetooth_icon),
|
||||||
@@ -732,7 +755,12 @@ class SettingsActivity : MIUIActivity() {
|
|||||||
SwitchV("hide_mobile_type_icon")
|
SwitchV("hide_mobile_type_icon")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
add(TextWithSwitchV(TextV(resId = R.string.hide_wifi_icon), SwitchV("hide_wifi_icon")))
|
add(
|
||||||
|
TextWithSwitchV(
|
||||||
|
TextV(resId = R.string.hide_wifi_icon),
|
||||||
|
SwitchV("hide_wifi_icon")
|
||||||
|
)
|
||||||
|
)
|
||||||
add(
|
add(
|
||||||
TextWithSwitchV(
|
TextWithSwitchV(
|
||||||
TextV(resId = R.string.hide_wifi_activity_icon),
|
TextV(resId = R.string.hide_wifi_activity_icon),
|
||||||
@@ -757,7 +785,12 @@ class SettingsActivity : MIUIActivity() {
|
|||||||
SwitchV("hide_hotspot_icon")
|
SwitchV("hide_hotspot_icon")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
add(TextWithSwitchV(TextV(resId = R.string.hide_vpn_icon), SwitchV("hide_vpn_icon")))
|
add(
|
||||||
|
TextWithSwitchV(
|
||||||
|
TextV(resId = R.string.hide_vpn_icon),
|
||||||
|
SwitchV("hide_vpn_icon")
|
||||||
|
)
|
||||||
|
)
|
||||||
add(
|
add(
|
||||||
TextWithSwitchV(
|
TextWithSwitchV(
|
||||||
TextV(resId = R.string.hide_airplane_icon),
|
TextV(resId = R.string.hide_airplane_icon),
|
||||||
@@ -894,7 +927,7 @@ class SettingsActivity : MIUIActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//其他页面
|
//其他页面
|
||||||
fun otherItems(): ArrayList<BaseView> {
|
private fun otherItems(): ArrayList<BaseView> {
|
||||||
return ArrayList<BaseView>().apply {
|
return ArrayList<BaseView>().apply {
|
||||||
add(TitleTextV(resId = R.string.scope_miuihome))
|
add(TitleTextV(resId = R.string.scope_miuihome))
|
||||||
add(
|
add(
|
||||||
@@ -941,7 +974,8 @@ class SettingsActivity : MIUIActivity() {
|
|||||||
intent.component = comp
|
intent.component = comp
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Toast.makeText(activity, "启动失败,可能是不支持", Toast.LENGTH_LONG).show()
|
Toast.makeText(activity, "启动失败,可能是不支持", Toast.LENGTH_LONG)
|
||||||
|
.show()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -15,41 +15,23 @@ class MainHook : IXposedHookLoadPackage {
|
|||||||
EzXHelperInit.setEzClassLoader(lpparam.classLoader)
|
EzXHelperInit.setEzClassLoader(lpparam.classLoader)
|
||||||
when (lpparam.packageName) {
|
when (lpparam.packageName) {
|
||||||
//Android
|
//Android
|
||||||
"android" -> {
|
"android" -> Android().handleLoadPackage(lpparam)
|
||||||
Android().handleLoadPackage(lpparam)
|
|
||||||
}
|
|
||||||
//系统界面
|
//系统界面
|
||||||
"com.android.systemui" -> {
|
"com.android.systemui" -> SystemUI().handleLoadPackage(lpparam)
|
||||||
SystemUI().handleLoadPackage(lpparam)
|
|
||||||
}
|
|
||||||
//电量与性能
|
//电量与性能
|
||||||
"com.miui.powerkeeper" -> {
|
"com.miui.powerkeeper" -> PowerKeeper().handleLoadPackage(lpparam)
|
||||||
PowerKeeper().handleLoadPackage(lpparam)
|
|
||||||
}
|
|
||||||
//桌面
|
//桌面
|
||||||
"com.miui.home" -> {
|
"com.miui.home" -> MiuiHome().handleLoadPackage(lpparam)
|
||||||
MiuiHome().handleLoadPackage(lpparam)
|
|
||||||
}
|
|
||||||
//手机管家
|
//手机管家
|
||||||
"com.miui.securitycenter" -> {
|
"com.miui.securitycenter" -> SecurityCenter().handleLoadPackage(lpparam)
|
||||||
SecurityCenter().handleLoadPackage(lpparam)
|
|
||||||
}
|
|
||||||
//相册编辑
|
//相册编辑
|
||||||
"com.miui.mediaeditor" -> {
|
"com.miui.mediaeditor" -> MediaEditor().handleLoadPackage(lpparam)
|
||||||
MediaEditor().handleLoadPackage(lpparam)
|
|
||||||
}
|
|
||||||
//系统更新
|
//系统更新
|
||||||
"com.android.updater" -> {
|
"com.android.updater" -> Updater().handleLoadPackage(lpparam)
|
||||||
Updater().handleLoadPackage(lpparam)
|
|
||||||
}
|
|
||||||
//设置
|
//设置
|
||||||
"com.android.settings" -> {
|
"com.android.settings" -> Settings().handleLoadPackage(lpparam)
|
||||||
Settings().handleLoadPackage(lpparam)
|
|
||||||
}
|
|
||||||
//主题壁纸
|
//主题壁纸
|
||||||
"com.android.thememanager" -> {
|
"com.android.thememanager" -> ThemeManager().handleLoadPackage(lpparam)
|
||||||
ThemeManager().handleLoadPackage(lpparam)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.lt2333.simplicitytools.hook.app
|
|||||||
|
|
||||||
import com.lt2333.simplicitytools.hook.app.android.DeleteOnPostNotification
|
import com.lt2333.simplicitytools.hook.app.android.DeleteOnPostNotification
|
||||||
import com.lt2333.simplicitytools.hook.app.android.DisableFlagSecure
|
import com.lt2333.simplicitytools.hook.app.android.DisableFlagSecure
|
||||||
|
import com.lt2333.simplicitytools.hook.app.android.MaxWallpaperScale
|
||||||
import com.lt2333.simplicitytools.hook.app.android.RemoveSmallWindowRestrictions
|
import com.lt2333.simplicitytools.hook.app.android.RemoveSmallWindowRestrictions
|
||||||
import com.lt2333.simplicitytools.hook.app.android.corepatch.CorePatch
|
import com.lt2333.simplicitytools.hook.app.android.corepatch.CorePatch
|
||||||
import de.robv.android.xposed.IXposedHookLoadPackage
|
import de.robv.android.xposed.IXposedHookLoadPackage
|
||||||
@@ -19,5 +20,7 @@ class Android : IXposedHookLoadPackage {
|
|||||||
DeleteOnPostNotification().handleLoadPackage(lpparam)
|
DeleteOnPostNotification().handleLoadPackage(lpparam)
|
||||||
//解除小窗限制
|
//解除小窗限制
|
||||||
RemoveSmallWindowRestrictions().handleLoadPackage(lpparam)
|
RemoveSmallWindowRestrictions().handleLoadPackage(lpparam)
|
||||||
|
//壁纸缩放比例
|
||||||
|
MaxWallpaperScale().handleLoadPackage(lpparam)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.lt2333.simplicitytools.hook.app.android
|
||||||
|
|
||||||
|
import android.app.Service
|
||||||
|
import android.icu.text.DisplayContext
|
||||||
|
import com.lt2333.simplicitytools.util.XSPUtils
|
||||||
|
import com.lt2333.simplicitytools.util.hookAfterMethod
|
||||||
|
import com.lt2333.simplicitytools.util.hookBeforeMethod
|
||||||
|
import com.lt2333.simplicitytools.util.setFloatField
|
||||||
|
import de.robv.android.xposed.IXposedHookLoadPackage
|
||||||
|
import de.robv.android.xposed.callbacks.XC_LoadPackage
|
||||||
|
|
||||||
|
class MaxWallpaperScale : IXposedHookLoadPackage {
|
||||||
|
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
|
||||||
|
val value = XSPUtils.getFloat("max_wallpaper_scale", 1.1f)
|
||||||
|
"com.android.server.wm.WallpaperController".hookAfterMethod(lpparam.classLoader, "WallpaperController", Service::class.java, DisplayContext::class.java
|
||||||
|
) {
|
||||||
|
it.thisObject.setFloatField("mMaxWallpaperScale", value)
|
||||||
|
}
|
||||||
|
"com.android.server.wm.WallpaperController".hookBeforeMethod(lpparam.classLoader, "zoomOutToScale", Float::class.java) {
|
||||||
|
it.thisObject.setFloatField("mMaxWallpaperScale", value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,46 +2,28 @@ package com.lt2333.simplicitytools.hook.app.securitycenter
|
|||||||
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import com.lt2333.simplicitytools.util.XSPUtils
|
import com.lt2333.simplicitytools.util.XSPUtils
|
||||||
|
import com.lt2333.simplicitytools.util.findClass
|
||||||
|
import com.lt2333.simplicitytools.util.hookBeforeMethod
|
||||||
import de.robv.android.xposed.IXposedHookLoadPackage
|
import de.robv.android.xposed.IXposedHookLoadPackage
|
||||||
import de.robv.android.xposed.XC_MethodHook
|
|
||||||
import de.robv.android.xposed.XposedHelpers
|
|
||||||
import de.robv.android.xposed.callbacks.XC_LoadPackage
|
import de.robv.android.xposed.callbacks.XC_LoadPackage
|
||||||
|
|
||||||
class LockOneHundred : IXposedHookLoadPackage {
|
class LockOneHundred : IXposedHookLoadPackage {
|
||||||
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
|
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
|
||||||
|
|
||||||
//防止点击重新检测
|
//防止点击重新检测
|
||||||
var classIfExists = XposedHelpers.findClassIfExists(
|
val mainContentFrameClass = "com.miui.securityscan.ui.main.MainContentFrame".findClass(lpparam.classLoader)
|
||||||
"com.miui.securityscan.ui.main.MainContentFrame",
|
mainContentFrameClass.hookBeforeMethod("onClick", View::class.java) {
|
||||||
lpparam.classLoader
|
|
||||||
)
|
|
||||||
XposedHelpers.findAndHookMethod(
|
|
||||||
classIfExists,
|
|
||||||
"onClick",
|
|
||||||
View::class.java,
|
|
||||||
object : XC_MethodHook() {
|
|
||||||
override fun beforeHookedMethod(param: MethodHookParam) {
|
|
||||||
if (XSPUtils.getBoolean("lock_one_hundred", false)) {
|
if (XSPUtils.getBoolean("lock_one_hundred", false)) {
|
||||||
param.result = null
|
it.result = null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
//锁定100分
|
//锁定100分
|
||||||
var classIfExists2 = XposedHelpers.findClassIfExists(
|
var scoreManagerClass = "com.miui.securityscan.scanner.ScoreManager".findClass(lpparam.classLoader)
|
||||||
"com.miui.securityscan.scanner.ScoreManager",
|
scoreManagerClass.hookBeforeMethod("B") {
|
||||||
lpparam.classLoader
|
|
||||||
)
|
|
||||||
XposedHelpers.findAndHookMethod(
|
|
||||||
classIfExists2,
|
|
||||||
"B",
|
|
||||||
object : XC_MethodHook() {
|
|
||||||
override fun beforeHookedMethod(param: MethodHookParam) {
|
|
||||||
if (XSPUtils.getBoolean("lock_one_hundred", false)) {
|
if (XSPUtils.getBoolean("lock_one_hundred", false)) {
|
||||||
param.result = 0
|
it.result = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,10 @@ import android.view.View
|
|||||||
import android.widget.LinearLayout
|
import android.widget.LinearLayout
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import cn.fkj233.ui.activity.dp2px
|
import cn.fkj233.ui.activity.dp2px
|
||||||
import com.lt2333.simplicitytools.util.*
|
import com.lt2333.simplicitytools.util.XSPUtils
|
||||||
|
import com.lt2333.simplicitytools.util.findClass
|
||||||
|
import com.lt2333.simplicitytools.util.hookAfterMethod
|
||||||
|
import com.lt2333.simplicitytools.util.hookBeforeMethod
|
||||||
import de.robv.android.xposed.IXposedHookLoadPackage
|
import de.robv.android.xposed.IXposedHookLoadPackage
|
||||||
import de.robv.android.xposed.callbacks.XC_LoadPackage
|
import de.robv.android.xposed.callbacks.XC_LoadPackage
|
||||||
import java.lang.reflect.Field
|
import java.lang.reflect.Field
|
||||||
@@ -36,6 +39,7 @@ class ShowBatteryTemperature: IXposedHookLoadPackage {
|
|||||||
val textView = view.findViewById<TextView>(currentTemperatureValue)
|
val textView = view.findViewById<TextView>(currentTemperatureValue)
|
||||||
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 36.399998f)
|
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 36.399998f)
|
||||||
textView.gravity = Gravity.NO_GRAVITY
|
textView.gravity = Gravity.NO_GRAVITY
|
||||||
|
textView.typeface = Typeface.create(null, 400, false)
|
||||||
textView.setPadding(0, 0, 0, 0)
|
textView.setPadding(0, 0, 0, 0)
|
||||||
textView.height = dp2px(context, 49.099983f)
|
textView.height = dp2px(context, 49.099983f)
|
||||||
textView.textAlignment = View.TEXT_ALIGNMENT_VIEW_START
|
textView.textAlignment = View.TEXT_ALIGNMENT_VIEW_START
|
||||||
@@ -48,7 +52,7 @@ class ShowBatteryTemperature: IXposedHookLoadPackage {
|
|||||||
tempView.setPadding(0, dp2px(context, 25f), 0, 0)
|
tempView.setPadding(0, dp2px(context, 25f), 0, 0)
|
||||||
tempView.text = "℃"
|
tempView.text = "℃"
|
||||||
tempView.setTextColor(Color.parseColor(if (isDarkMode) "#e6e6e6" else "#333333"))
|
tempView.setTextColor(Color.parseColor(if (isDarkMode) "#e6e6e6" else "#333333"))
|
||||||
tempView.typeface = Typeface.create(null, 500, false)
|
tempView.typeface = Typeface.create(null, 400, false)
|
||||||
tempView.textAlignment = View.TEXT_ALIGNMENT_VIEW_START
|
tempView.textAlignment = View.TEXT_ALIGNMENT_VIEW_START
|
||||||
val tempeValueContainer = context.resources.getIdentifier("tempe_value_container", "id", "com.miui.securitycenter")
|
val tempeValueContainer = context.resources.getIdentifier("tempe_value_container", "id", "com.miui.securitycenter")
|
||||||
val linearLayout = view.findViewById<LinearLayout>(tempeValueContainer)
|
val linearLayout = view.findViewById<LinearLayout>(tempeValueContainer)
|
||||||
|
|||||||
@@ -2,51 +2,37 @@ package com.lt2333.simplicitytools.hook.app.securitycenter
|
|||||||
|
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import com.lt2333.simplicitytools.util.XSPUtils
|
import com.lt2333.simplicitytools.util.XSPUtils
|
||||||
|
import com.lt2333.simplicitytools.util.findClass
|
||||||
|
import com.lt2333.simplicitytools.util.hookBeforeMethod
|
||||||
import de.robv.android.xposed.IXposedHookLoadPackage
|
import de.robv.android.xposed.IXposedHookLoadPackage
|
||||||
import de.robv.android.xposed.XC_MethodHook
|
|
||||||
import de.robv.android.xposed.XposedHelpers
|
|
||||||
import de.robv.android.xposed.callbacks.XC_LoadPackage
|
import de.robv.android.xposed.callbacks.XC_LoadPackage
|
||||||
|
|
||||||
class SkipWaitingTime : IXposedHookLoadPackage {
|
class SkipWaitingTime : IXposedHookLoadPackage {
|
||||||
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
|
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
|
||||||
|
|
||||||
var classIfExists = XposedHelpers.findClassIfExists(
|
val textViewClass = "android.widget.TextView".findClass(lpparam.classLoader)
|
||||||
"android.widget.TextView",
|
textViewClass.hookBeforeMethod(
|
||||||
lpparam.classLoader
|
|
||||||
)
|
|
||||||
XposedHelpers.findAndHookMethod(
|
|
||||||
classIfExists,
|
|
||||||
"setText",
|
"setText",
|
||||||
CharSequence::class.java,
|
CharSequence::class.java,
|
||||||
TextView.BufferType::class.java,
|
TextView.BufferType::class.java,
|
||||||
Boolean::class.java,
|
Boolean::class.java,
|
||||||
Int::class.java,
|
Int::class.java
|
||||||
object : XC_MethodHook() {
|
|
||||||
override fun beforeHookedMethod(param: MethodHookParam) {
|
|
||||||
if (XSPUtils.getBoolean("skip_waiting_time", false)) {
|
|
||||||
if (param.args.isNotEmpty() && param.args[0]?.toString()
|
|
||||||
?.startsWith("确定(") == true
|
|
||||||
) {
|
) {
|
||||||
param.args[0] = "确定"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
val classIfExists2 = XposedHelpers.findClassIfExists(
|
|
||||||
"android.widget.TextView",
|
|
||||||
lpparam.classLoader
|
|
||||||
)
|
|
||||||
XposedHelpers.findAndHookMethod(
|
|
||||||
classIfExists2,
|
|
||||||
"setEnabled",
|
|
||||||
Boolean::class.java,
|
|
||||||
object : XC_MethodHook() {
|
|
||||||
override fun beforeHookedMethod(param: MethodHookParam) {
|
|
||||||
if (XSPUtils.getBoolean("skip_waiting_time", false)) {
|
if (XSPUtils.getBoolean("skip_waiting_time", false)) {
|
||||||
param.args[0] = true
|
if (it.args.isNotEmpty() && it.args[0]?.toString()?.startsWith("确定(") == true
|
||||||
|
) {
|
||||||
|
it.args[0] = "确定"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
textViewClass.hookBeforeMethod(
|
||||||
|
"setEnabled",
|
||||||
|
Boolean::class.java
|
||||||
|
) {
|
||||||
|
if (XSPUtils.getBoolean("skip_waiting_time", false)) {
|
||||||
|
it.args[0] = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,71 +3,32 @@ package com.lt2333.simplicitytools.hook.app.settings
|
|||||||
import android.app.NotificationChannel
|
import android.app.NotificationChannel
|
||||||
import com.lt2333.simplicitytools.util.*
|
import com.lt2333.simplicitytools.util.*
|
||||||
import de.robv.android.xposed.IXposedHookLoadPackage
|
import de.robv.android.xposed.IXposedHookLoadPackage
|
||||||
import de.robv.android.xposed.XC_MethodHook
|
|
||||||
import de.robv.android.xposed.XposedHelpers
|
import de.robv.android.xposed.XposedHelpers
|
||||||
import de.robv.android.xposed.callbacks.XC_LoadPackage
|
import de.robv.android.xposed.callbacks.XC_LoadPackage
|
||||||
|
|
||||||
class ShowNotificationImportance : IXposedHookLoadPackage {
|
class ShowNotificationImportance : IXposedHookLoadPackage {
|
||||||
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
|
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
|
||||||
val channelNotificationSettingsClass = XposedHelpers.findClass(
|
val channelNotificationSettingsClass = "com.android.settings.notification.ChannelNotificationSettings".findClass(lpparam.classLoader)
|
||||||
"com.android.settings.notification.ChannelNotificationSettings",
|
channelNotificationSettingsClass.hookBeforeMethod("removeDefaultPrefs") {
|
||||||
lpparam.classLoader
|
if (!XSPUtils.getBoolean("show_notification_importance", false)) return@hookBeforeMethod
|
||||||
)
|
val importance = it.thisObject.callMethod("findPreference", "importance") ?: return@hookBeforeMethod
|
||||||
|
val mChannel = it.thisObject.getObjectField("mChannel") as NotificationChannel
|
||||||
channelNotificationSettingsClass.hookMethod("removeDefaultPrefs",
|
val index = importance.callMethod("findSpinnerIndexOfValue", mChannel.importance.toString()) as Int
|
||||||
object : XC_MethodHook() {
|
if (index < 0) return@hookBeforeMethod
|
||||||
override fun beforeHookedMethod(param: MethodHookParam) {
|
|
||||||
if (!XSPUtils.getBoolean("show_notification_importance", false)) return
|
|
||||||
|
|
||||||
val importance =
|
|
||||||
param.thisObject.callMethod("findPreference", "importance") ?: return
|
|
||||||
val mChannel =
|
|
||||||
param.thisObject.getObjectField("mChannel") as NotificationChannel
|
|
||||||
val index = importance.callMethod(
|
|
||||||
"findSpinnerIndexOfValue",
|
|
||||||
mChannel.importance.toString()
|
|
||||||
) as Int
|
|
||||||
if (index < 0) return
|
|
||||||
|
|
||||||
importance.callMethod("setValueIndex", index)
|
importance.callMethod("setValueIndex", index)
|
||||||
|
XposedHelpers.setAdditionalInstanceField(importance, "channelNotificationSettings", it.thisObject)
|
||||||
XposedHelpers.setAdditionalInstanceField(
|
it.result = null
|
||||||
importance,
|
|
||||||
"channelNotificationSettings",
|
|
||||||
param.thisObject
|
|
||||||
)
|
|
||||||
|
|
||||||
param.result = null
|
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
val dropDownPreferenceClass = XposedHelpers.findClass(
|
val dropDownPreferenceClass = XposedHelpers.findClass("androidx.preference.Preference", lpparam.classLoader)
|
||||||
"androidx.preference.Preference",
|
dropDownPreferenceClass.hookAfterMethod("callChangeListener", Any::class.java) {
|
||||||
lpparam.classLoader
|
val channelNotificationSettings = XposedHelpers.getAdditionalInstanceField(it.thisObject, "channelNotificationSettings") ?: return@hookAfterMethod
|
||||||
)
|
val mChannel = channelNotificationSettings.getObjectField("mChannel") as NotificationChannel
|
||||||
|
mChannel.callMethod("setImportance", (it.args[0] as String).toInt())
|
||||||
dropDownPreferenceClass.hookMethod("callChangeListener",
|
val mBackend = channelNotificationSettings.getObjectField("mBackend") ?: return@hookAfterMethod
|
||||||
Any::class.java, object : XC_MethodHook() {
|
|
||||||
override fun afterHookedMethod(param: MethodHookParam) {
|
|
||||||
val channelNotificationSettings = XposedHelpers.getAdditionalInstanceField(
|
|
||||||
param.thisObject,
|
|
||||||
"channelNotificationSettings"
|
|
||||||
) ?: return@afterHookedMethod
|
|
||||||
|
|
||||||
val mChannel = XposedHelpers.getObjectField(
|
|
||||||
channelNotificationSettings,
|
|
||||||
"mChannel"
|
|
||||||
) as NotificationChannel
|
|
||||||
|
|
||||||
mChannel.callMethod(
|
|
||||||
"setImportance", (param.args[0] as String).toInt()
|
|
||||||
)
|
|
||||||
|
|
||||||
val mBackend = channelNotificationSettings.getObjectField("mBackend") ?: return
|
|
||||||
val mPkg = channelNotificationSettings.getObjectField("mPkg") as String
|
val mPkg = channelNotificationSettings.getObjectField("mPkg") as String
|
||||||
val mUid = channelNotificationSettings.getIntField("mUid")
|
val mUid = channelNotificationSettings.getIntField("mUid")
|
||||||
mBackend.callMethod("updateChannel", mPkg, mUid, mChannel)
|
mBackend.callMethod("updateChannel", mPkg, mUid, mChannel)
|
||||||
}
|
}
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,25 +2,19 @@ package com.lt2333.simplicitytools.hook.app.systemui
|
|||||||
|
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import com.lt2333.simplicitytools.util.XSPUtils
|
import com.lt2333.simplicitytools.util.XSPUtils
|
||||||
|
import com.lt2333.simplicitytools.util.findClass
|
||||||
|
import com.lt2333.simplicitytools.util.hookAfterMethod
|
||||||
import de.robv.android.xposed.IXposedHookLoadPackage
|
import de.robv.android.xposed.IXposedHookLoadPackage
|
||||||
import de.robv.android.xposed.XC_MethodHook
|
|
||||||
import de.robv.android.xposed.XposedHelpers
|
|
||||||
import de.robv.android.xposed.callbacks.XC_LoadPackage
|
import de.robv.android.xposed.callbacks.XC_LoadPackage
|
||||||
|
|
||||||
class HideNetworkSpeedSplitter : IXposedHookLoadPackage {
|
class HideNetworkSpeedSplitter : IXposedHookLoadPackage {
|
||||||
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
|
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
|
||||||
val classIfExists = XposedHelpers.findClassIfExists(
|
val networkSpeedSplitterClass = "com.android.systemui.statusbar.views.NetworkSpeedSplitter".findClass(lpparam.classLoader)
|
||||||
"com.android.systemui.statusbar.views.NetworkSpeedSplitter",
|
networkSpeedSplitterClass.hookAfterMethod("init") {
|
||||||
lpparam.classLoader
|
|
||||||
)
|
|
||||||
|
|
||||||
XposedHelpers.findAndHookMethod(classIfExists, "init", object : XC_MethodHook() {
|
|
||||||
override fun afterHookedMethod(param: MethodHookParam) {
|
|
||||||
if (XSPUtils.getBoolean("hide_network_speed_splitter", false)) {
|
if (XSPUtils.getBoolean("hide_network_speed_splitter", false)) {
|
||||||
val textView = param.thisObject as TextView
|
val textView = it.thisObject as TextView
|
||||||
textView.text = " "
|
textView.text = " "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,24 +20,15 @@ class NotificationWeather : IXposedHookLoadPackage {
|
|||||||
"com.android.systemui.qs.MiuiNotificationHeaderView".hookAfterMethod(lpparam.classLoader, "onFinishInflate") {
|
"com.android.systemui.qs.MiuiNotificationHeaderView".hookAfterMethod(lpparam.classLoader, "onFinishInflate") {
|
||||||
val viewGroup = it.thisObject as ViewGroup
|
val viewGroup = it.thisObject as ViewGroup
|
||||||
val context = viewGroup.context
|
val context = viewGroup.context
|
||||||
val layoutParam = loadClass("androidx.constraintlayout.widget.ConstraintLayout\$LayoutParams")
|
val layoutParam = loadClass("androidx.constraintlayout.widget.ConstraintLayout\$LayoutParams").getConstructor(Int::class.java, Int::class.java).newInstance(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT) as ViewGroup.MarginLayoutParams
|
||||||
.getConstructor(Int::class.java, Int::class.java).newInstance(
|
|
||||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
|
||||||
ViewGroup.LayoutParams.WRAP_CONTENT
|
|
||||||
) as ViewGroup.MarginLayoutParams
|
|
||||||
layoutParam.setObjectField("bottomToTop", context.resources.getIdentifier("date_time", "id", context.packageName))
|
layoutParam.setObjectField("bottomToTop", context.resources.getIdentifier("date_time", "id", context.packageName))
|
||||||
layoutParam.setObjectField("startToEnd", context.resources.getIdentifier("big_time", "id", context.packageName))
|
layoutParam.setObjectField("startToEnd", context.resources.getIdentifier("big_time", "id", context.packageName))
|
||||||
|
layoutParam.marginStart = context.resources.getDimensionPixelSize(context.resources.getIdentifier("notification_panel_time_date_space", "dimen", context.packageName))
|
||||||
layoutParam.marginStart = context.resources.getDimensionPixelSize(
|
|
||||||
context.resources.getIdentifier("notification_panel_time_date_space", "dimen", context.packageName)
|
|
||||||
)
|
|
||||||
|
|
||||||
mWeatherView = WeatherView(context, isDisplayCity).apply {
|
mWeatherView = WeatherView(context, isDisplayCity).apply {
|
||||||
setTextAppearance(context.resources.getIdentifier("TextAppearance.QSControl.Date", "style", context.packageName))
|
setTextAppearance(context.resources.getIdentifier("TextAppearance.QSControl.Date", "style", context.packageName))
|
||||||
layoutParams = layoutParam
|
layoutParams = layoutParam
|
||||||
}
|
}
|
||||||
viewGroup.addView(mWeatherView)
|
viewGroup.addView(mWeatherView)
|
||||||
|
|
||||||
(mWeatherView as WeatherView).setOnClickListener {
|
(mWeatherView as WeatherView).setOnClickListener {
|
||||||
try {
|
try {
|
||||||
val intent = Intent().apply {
|
val intent = Intent().apply {
|
||||||
|
|||||||
@@ -2,27 +2,22 @@ package com.lt2333.simplicitytools.hook.app.systemui
|
|||||||
|
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
|
import com.lt2333.simplicitytools.util.findClass
|
||||||
|
import com.lt2333.simplicitytools.util.hookAfterMethod
|
||||||
import de.robv.android.xposed.IXposedHookLoadPackage
|
import de.robv.android.xposed.IXposedHookLoadPackage
|
||||||
import de.robv.android.xposed.XC_MethodHook
|
|
||||||
import de.robv.android.xposed.XposedHelpers
|
|
||||||
import de.robv.android.xposed.callbacks.XC_LoadPackage
|
import de.robv.android.xposed.callbacks.XC_LoadPackage
|
||||||
|
|
||||||
class StatusBarCurrent :IXposedHookLoadPackage {
|
class StatusBarCurrent :IXposedHookLoadPackage {
|
||||||
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
|
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
|
||||||
val classIfExists = XposedHelpers.findClassIfExists(
|
val miuiPhoneStatusBarViewClass =
|
||||||
"com.android.systemui.statusbar.phone.MiuiPhoneStatusBarView",
|
"com.android.systemui.statusbar.phone.MiuiPhoneStatusBarView".findClass(lpparam.classLoader)
|
||||||
lpparam.classLoader
|
miuiPhoneStatusBarViewClass.hookAfterMethod("onFinishInflate") { param ->
|
||||||
)
|
|
||||||
XposedHelpers.findAndHookMethod(classIfExists, "onFinishInflate", object : XC_MethodHook() {
|
|
||||||
override fun afterHookedMethod(param: MethodHookParam) {
|
|
||||||
val viewGroup = param.thisObject as ViewGroup
|
val viewGroup = param.thisObject as ViewGroup
|
||||||
|
|
||||||
val textView = TextView(viewGroup.context).also {
|
val textView = TextView(viewGroup.context).also {
|
||||||
it.text = "Text"
|
it.text = "Text"
|
||||||
it.textSize = 14F
|
it.textSize = 14F
|
||||||
}
|
}
|
||||||
viewGroup.addView(textView)
|
viewGroup.addView(textView)
|
||||||
}
|
}
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,9 +11,10 @@ import android.widget.FrameLayout
|
|||||||
import android.widget.LinearLayout
|
import android.widget.LinearLayout
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
import com.lt2333.simplicitytools.util.XSPUtils
|
import com.lt2333.simplicitytools.util.XSPUtils
|
||||||
|
import com.lt2333.simplicitytools.util.findClass
|
||||||
|
import com.lt2333.simplicitytools.util.getObjectField
|
||||||
|
import com.lt2333.simplicitytools.util.hookAfterMethod
|
||||||
import de.robv.android.xposed.IXposedHookLoadPackage
|
import de.robv.android.xposed.IXposedHookLoadPackage
|
||||||
import de.robv.android.xposed.XC_MethodHook
|
|
||||||
import de.robv.android.xposed.XposedHelpers
|
|
||||||
import de.robv.android.xposed.callbacks.XC_LoadPackage
|
import de.robv.android.xposed.callbacks.XC_LoadPackage
|
||||||
|
|
||||||
class StatusBarLayout : IXposedHookLoadPackage {
|
class StatusBarLayout : IXposedHookLoadPackage {
|
||||||
@@ -31,50 +32,32 @@ class StatusBarLayout : IXposedHookLoadPackage {
|
|||||||
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
|
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
|
||||||
if (!XSPUtils.getBoolean("status_bar_time_center", false)) return
|
if (!XSPUtils.getBoolean("status_bar_time_center", false)) return
|
||||||
|
|
||||||
val classIfExists = XposedHelpers.findClassIfExists(
|
val collapsedStatusBarFragmentClass =
|
||||||
"com.android.systemui.statusbar.phone.CollapsedStatusBarFragment",
|
"com.android.systemui.statusbar.phone.CollapsedStatusBarFragment".findClass(lpparam.classLoader)
|
||||||
lpparam.classLoader
|
|
||||||
)
|
|
||||||
|
|
||||||
XposedHelpers.findAndHookMethod(
|
collapsedStatusBarFragmentClass.hookAfterMethod(
|
||||||
classIfExists,
|
|
||||||
"onViewCreated",
|
"onViewCreated",
|
||||||
View::class.java,
|
View::class.java,
|
||||||
Bundle::class.java,
|
Bundle::class.java
|
||||||
object : XC_MethodHook() {
|
) { param ->
|
||||||
@Throws(Throwable::class)
|
|
||||||
override fun afterHookedMethod(param: MethodHookParam) {
|
|
||||||
super.afterHookedMethod(param)
|
|
||||||
val MiuiPhoneStatusBarView: ViewGroup =
|
val MiuiPhoneStatusBarView: ViewGroup =
|
||||||
XposedHelpers.getObjectField(
|
param.thisObject.getObjectField("mStatusBar") as ViewGroup
|
||||||
param.thisObject,
|
|
||||||
"mStatusBar"
|
|
||||||
) as ViewGroup
|
|
||||||
val context: Context = MiuiPhoneStatusBarView.context
|
val context: Context = MiuiPhoneStatusBarView.context
|
||||||
val res: Resources = MiuiPhoneStatusBarView.resources
|
val res: Resources = MiuiPhoneStatusBarView.resources
|
||||||
val status_bar_ID: Int =
|
val status_bar_ID: Int = res.getIdentifier("status_bar", "id", "com.android.systemui")
|
||||||
res.getIdentifier("status_bar", "id", "com.android.systemui")
|
|
||||||
val status_bar_contents_ID: Int =
|
val status_bar_contents_ID: Int =
|
||||||
res.getIdentifier("status_bar_contents", "id", "com.android.systemui")
|
res.getIdentifier("status_bar_contents", "id", "com.android.systemui")
|
||||||
val system_icon_area_ID: Int =
|
val system_icon_area_ID: Int =
|
||||||
res.getIdentifier("system_icon_area", "id", "com.android.systemui")
|
res.getIdentifier("system_icon_area", "id", "com.android.systemui")
|
||||||
|
|
||||||
val clock_ID: Int = res.getIdentifier("clock", "id", "com.android.systemui")
|
val clock_ID: Int = res.getIdentifier("clock", "id", "com.android.systemui")
|
||||||
val phone_status_bar_left_container_ID: Int = res.getIdentifier(
|
val phone_status_bar_left_container_ID: Int =
|
||||||
"phone_status_bar_left_container",
|
res.getIdentifier("phone_status_bar_left_container", "id", "com.android.systemui")
|
||||||
"id",
|
val fullscreen_notification_icon_area_ID: Int =
|
||||||
"com.android.systemui"
|
res.getIdentifier("fullscreen_notification_icon_area", "id", "com.android.systemui")
|
||||||
)
|
status_bar = MiuiPhoneStatusBarView.findViewById(status_bar_ID)
|
||||||
val fullscreen_notification_icon_area_ID: Int = res.getIdentifier(
|
|
||||||
"fullscreen_notification_icon_area",
|
|
||||||
"id",
|
|
||||||
"com.android.systemui"
|
|
||||||
)
|
|
||||||
status_bar =
|
|
||||||
MiuiPhoneStatusBarView.findViewById(status_bar_ID)
|
|
||||||
val status_bar_contents: ViewGroup =
|
val status_bar_contents: ViewGroup =
|
||||||
MiuiPhoneStatusBarView.findViewById(status_bar_contents_ID)
|
MiuiPhoneStatusBarView.findViewById(status_bar_contents_ID)
|
||||||
if (status_bar == null) return
|
if (status_bar == null) return@hookAfterMethod
|
||||||
val Clock: View = MiuiPhoneStatusBarView.findViewById(clock_ID)
|
val Clock: View = MiuiPhoneStatusBarView.findViewById(clock_ID)
|
||||||
val phone_status_bar_left_container: ViewGroup =
|
val phone_status_bar_left_container: ViewGroup =
|
||||||
MiuiPhoneStatusBarView.findViewById(phone_status_bar_left_container_ID)
|
MiuiPhoneStatusBarView.findViewById(phone_status_bar_left_container_ID)
|
||||||
@@ -83,7 +66,6 @@ class StatusBarLayout : IXposedHookLoadPackage {
|
|||||||
val system_icon_area: ViewGroup =
|
val system_icon_area: ViewGroup =
|
||||||
MiuiPhoneStatusBarView.findViewById(system_icon_area_ID)
|
MiuiPhoneStatusBarView.findViewById(system_icon_area_ID)
|
||||||
|
|
||||||
|
|
||||||
(Clock.parent as ViewGroup).removeView(Clock)
|
(Clock.parent as ViewGroup).removeView(Clock)
|
||||||
(phone_status_bar_left_container.parent as ViewGroup).removeView(
|
(phone_status_bar_left_container.parent as ViewGroup).removeView(
|
||||||
phone_status_bar_left_container
|
phone_status_bar_left_container
|
||||||
@@ -93,15 +75,13 @@ class StatusBarLayout : IXposedHookLoadPackage {
|
|||||||
)
|
)
|
||||||
(system_icon_area.parent as ViewGroup).removeView(system_icon_area)
|
(system_icon_area.parent as ViewGroup).removeView(system_icon_area)
|
||||||
|
|
||||||
|
|
||||||
val mConstraintLayoutLp = ConstraintLayout.LayoutParams(
|
val mConstraintLayoutLp = ConstraintLayout.LayoutParams(
|
||||||
ConstraintLayout.LayoutParams.MATCH_PARENT,
|
ConstraintLayout.LayoutParams.MATCH_PARENT,
|
||||||
ConstraintLayout.LayoutParams.MATCH_PARENT
|
ConstraintLayout.LayoutParams.MATCH_PARENT
|
||||||
)
|
)
|
||||||
|
|
||||||
val mConstraintLayout = ConstraintLayout(context).also {
|
val mConstraintLayout =
|
||||||
it.layoutParams = mConstraintLayoutLp
|
ConstraintLayout(context).also { it.layoutParams = mConstraintLayoutLp }
|
||||||
}
|
|
||||||
|
|
||||||
mConstraintLayout.addView(fullscreen_notification_icon_area)
|
mConstraintLayout.addView(fullscreen_notification_icon_area)
|
||||||
|
|
||||||
@@ -110,17 +90,12 @@ class StatusBarLayout : IXposedHookLoadPackage {
|
|||||||
ConstraintLayout.LayoutParams.MATCH_PARENT
|
ConstraintLayout.LayoutParams.MATCH_PARENT
|
||||||
)
|
)
|
||||||
|
|
||||||
fullscreen_notification_icon_area.layoutParams =
|
fullscreen_notification_icon_area.layoutParams = fullscreen_notification_icon_area_lp
|
||||||
fullscreen_notification_icon_area_lp
|
|
||||||
|
|
||||||
//增加一个左对齐布局
|
//增加一个左对齐布局
|
||||||
mLeftLayout = LinearLayout(context)
|
mLeftLayout = LinearLayout(context)
|
||||||
val LeftLp: LinearLayout.LayoutParams =
|
val LeftLp: LinearLayout.LayoutParams =
|
||||||
LinearLayout.LayoutParams(
|
LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f)
|
||||||
0,
|
|
||||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
|
||||||
1.0f
|
|
||||||
)
|
|
||||||
mLeftLayout!!.layoutParams = LeftLp
|
mLeftLayout!!.layoutParams = LeftLp
|
||||||
mLeftLayout!!.gravity = Gravity.START or Gravity.CENTER_VERTICAL
|
mLeftLayout!!.gravity = Gravity.START or Gravity.CENTER_VERTICAL
|
||||||
|
|
||||||
@@ -134,11 +109,7 @@ class StatusBarLayout : IXposedHookLoadPackage {
|
|||||||
mCenterLayout!!.gravity = Gravity.CENTER or Gravity.CENTER_VERTICAL
|
mCenterLayout!!.gravity = Gravity.CENTER or Gravity.CENTER_VERTICAL
|
||||||
mRightLayout = LinearLayout(context)
|
mRightLayout = LinearLayout(context)
|
||||||
val RightLp: LinearLayout.LayoutParams =
|
val RightLp: LinearLayout.LayoutParams =
|
||||||
LinearLayout.LayoutParams(
|
LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f)
|
||||||
0,
|
|
||||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
|
||||||
1.0f
|
|
||||||
)
|
|
||||||
mRightLayout!!.layoutParams = RightLp
|
mRightLayout!!.layoutParams = RightLp
|
||||||
mRightLayout!!.gravity = Gravity.END or Gravity.CENTER_VERTICAL
|
mRightLayout!!.gravity = Gravity.END or Gravity.CENTER_VERTICAL
|
||||||
mLeftLayout!!.addView(phone_status_bar_left_container)
|
mLeftLayout!!.addView(phone_status_bar_left_container)
|
||||||
@@ -170,26 +141,17 @@ class StatusBarLayout : IXposedHookLoadPackage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
val classIfExists2 = XposedHelpers.findClassIfExists(
|
val phoneStatusBarViewClass =
|
||||||
"com.android.systemui.statusbar.phone.PhoneStatusBarView",
|
"com.android.systemui.statusbar.phone.PhoneStatusBarView".findClass(lpparam.classLoader)
|
||||||
lpparam.classLoader
|
|
||||||
)
|
|
||||||
|
|
||||||
XposedHelpers.findAndHookMethod(
|
phoneStatusBarViewClass.hookAfterMethod("updateLayoutForCutout") {
|
||||||
classIfExists2,
|
|
||||||
"updateLayoutForCutout",
|
|
||||||
object : XC_MethodHook() {
|
|
||||||
override fun afterHookedMethod(param: MethodHookParam) {
|
|
||||||
if (XSPUtils.getBoolean("layout_compatibility_mode", false)) {
|
if (XSPUtils.getBoolean("layout_compatibility_mode", false)) {
|
||||||
val context = (param.thisObject as ViewGroup).context
|
val context = (it.thisObject as ViewGroup).context
|
||||||
updateLayout(context)
|
updateLayout(context)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
fun updateLayout(context: Context) {
|
fun updateLayout(context: Context) {
|
||||||
|
|||||||
@@ -8,9 +8,10 @@ import android.util.AttributeSet
|
|||||||
import android.util.TypedValue
|
import android.util.TypedValue
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import com.lt2333.simplicitytools.util.XSPUtils
|
import com.lt2333.simplicitytools.util.XSPUtils
|
||||||
|
import com.lt2333.simplicitytools.util.findClass
|
||||||
|
import com.lt2333.simplicitytools.util.hookAfterConstructor
|
||||||
|
import com.lt2333.simplicitytools.util.hookAfterMethod
|
||||||
import de.robv.android.xposed.IXposedHookLoadPackage
|
import de.robv.android.xposed.IXposedHookLoadPackage
|
||||||
import de.robv.android.xposed.XC_MethodHook
|
|
||||||
import de.robv.android.xposed.XposedHelpers
|
|
||||||
import de.robv.android.xposed.callbacks.XC_LoadPackage
|
import de.robv.android.xposed.callbacks.XC_LoadPackage
|
||||||
import java.lang.reflect.Method
|
import java.lang.reflect.Method
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
@@ -18,151 +19,113 @@ import java.util.*
|
|||||||
|
|
||||||
class StatusBarTimeCustomization : IXposedHookLoadPackage {
|
class StatusBarTimeCustomization : IXposedHookLoadPackage {
|
||||||
|
|
||||||
|
private val isYear = XSPUtils.getBoolean("status_bar_time_year", false)
|
||||||
|
private val isMonth = XSPUtils.getBoolean("status_bar_time_month", false)
|
||||||
|
private val isDay = XSPUtils.getBoolean("status_bar_time_day", false)
|
||||||
|
private val isWeek = XSPUtils.getBoolean("status_bar_time_week", false)
|
||||||
|
private val isHideSpace = XSPUtils.getBoolean("status_bar_time_hide_space", false)
|
||||||
|
private val isDoubleLine = XSPUtils.getBoolean("status_bar_time_double_line", false)
|
||||||
|
private val isSecond = XSPUtils.getBoolean("status_bar_time_seconds", false)
|
||||||
|
private val isDoubleHour = XSPUtils.getBoolean("status_bar_time_double_hour", false)
|
||||||
|
private val isPeriod = XSPUtils.getBoolean("status_bar_time_period", true)
|
||||||
|
private val getClockSize = XSPUtils.getInt("status_bar_clock_size", 0)
|
||||||
|
private val isOpen = XSPUtils.getBoolean("custom_clock_switch", false)
|
||||||
|
private val getClockDoubleSize = XSPUtils.getInt("status_bar_clock_double_line_size", 0)
|
||||||
|
private var now_time: Date? = null
|
||||||
|
private var str = ""
|
||||||
|
|
||||||
val isYear = XSPUtils.getBoolean("status_bar_time_year", false)
|
@SuppressLint("SetTextI18n")
|
||||||
val isMonth = XSPUtils.getBoolean("status_bar_time_month", false)
|
|
||||||
val isDay = XSPUtils.getBoolean("status_bar_time_day", false)
|
|
||||||
val isWeek = XSPUtils.getBoolean("status_bar_time_week", false)
|
|
||||||
val isHideSpace = XSPUtils.getBoolean("status_bar_time_hide_space", false)
|
|
||||||
val isDoubleLine = XSPUtils.getBoolean("status_bar_time_double_line", false)
|
|
||||||
val isSecond = XSPUtils.getBoolean("status_bar_time_seconds", false)
|
|
||||||
val isDoubleHour = XSPUtils.getBoolean("status_bar_time_double_hour", false)
|
|
||||||
val isPeriod = XSPUtils.getBoolean("status_bar_time_period", true)
|
|
||||||
val getClockSize = XSPUtils.getInt("status_bar_clock_size", 0)
|
|
||||||
val isOpen = XSPUtils.getBoolean("custom_clock_switch", false)
|
|
||||||
val getClockDoubleSize = XSPUtils.getInt("status_bar_clock_double_line_size", 0)
|
|
||||||
|
|
||||||
|
|
||||||
var now_time: Date? = null
|
|
||||||
var str = ""
|
|
||||||
|
|
||||||
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
|
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
|
||||||
if (isOpen) {
|
if (isOpen) {
|
||||||
var c: Context? = null
|
var c: Context? = null
|
||||||
val classIfExists = XposedHelpers.findClassIfExists(
|
val miuiClockClass = "com.android.systemui.statusbar.views.MiuiClock".findClass(lpparam.classLoader)
|
||||||
"com.android.systemui.statusbar.views.MiuiClock",
|
miuiClockClass.hookAfterConstructor(Context::class.java, AttributeSet::class.java, Integer.TYPE) {
|
||||||
lpparam.classLoader
|
|
||||||
)
|
|
||||||
XposedHelpers.findAndHookConstructor(classIfExists,
|
|
||||||
Context::class.java,
|
|
||||||
AttributeSet::class.java,
|
|
||||||
Integer.TYPE,
|
|
||||||
object : XC_MethodHook() {
|
|
||||||
override fun afterHookedMethod(param: MethodHookParam) {
|
|
||||||
try {
|
try {
|
||||||
c = param.args[0] as Context
|
c = it.args[0] as Context
|
||||||
val textV = param.thisObject as TextView
|
val textV = it.thisObject as TextView
|
||||||
textV.isSingleLine = false
|
textV.isSingleLine = false
|
||||||
|
|
||||||
if (isDoubleLine) {
|
if (isDoubleLine) {
|
||||||
str = "\n"
|
str = "\n"
|
||||||
var clock_double_line_size = 7F
|
var clock_double_line_size = 7F
|
||||||
if (getClockDoubleSize != 0) {
|
if (getClockDoubleSize != 0) {
|
||||||
clock_double_line_size =
|
clock_double_line_size = getClockDoubleSize.toFloat()
|
||||||
getClockDoubleSize
|
|
||||||
.toFloat()
|
|
||||||
}
|
}
|
||||||
textV.setTextSize(
|
textV.setTextSize(TypedValue.COMPLEX_UNIT_DIP, clock_double_line_size)
|
||||||
TypedValue.COMPLEX_UNIT_DIP,
|
|
||||||
clock_double_line_size
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
if (getClockSize != 0) {
|
if (getClockSize != 0) {
|
||||||
val clock_size =
|
val clock_size = getClockSize.toFloat()
|
||||||
getClockSize.toFloat()
|
|
||||||
textV.setTextSize(TypedValue.COMPLEX_UNIT_DIP, clock_size)
|
textV.setTextSize(TypedValue.COMPLEX_UNIT_DIP, clock_size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val d: Method = textV.javaClass.getDeclaredMethod("updateTime")
|
val d: Method = textV.javaClass.getDeclaredMethod("updateTime")
|
||||||
val r = Runnable {
|
val r = Runnable {
|
||||||
d.isAccessible = true
|
d.isAccessible = true
|
||||||
d.invoke(textV)
|
d.invoke(textV)
|
||||||
}
|
}
|
||||||
|
|
||||||
class T : TimerTask() {
|
class T : TimerTask() {
|
||||||
override fun run() {
|
override fun run() {
|
||||||
Handler(textV.context.mainLooper).post(r)
|
Handler(textV.context.mainLooper).post(r)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (textV.resources.getResourceEntryName(textV.id) == "clock")
|
if (textV.resources.getResourceEntryName(textV.id) == "clock")
|
||||||
Timer().scheduleAtFixedRate(
|
Timer().scheduleAtFixedRate(T(), 1000 - System.currentTimeMillis() % 1000, 1000)
|
||||||
T(),
|
|
||||||
1000 - System.currentTimeMillis() % 1000,
|
|
||||||
1000
|
|
||||||
)
|
|
||||||
|
|
||||||
} catch (e: java.lang.Exception) {
|
} catch (e: java.lang.Exception) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
miuiClockClass.hookAfterMethod("updateTime") {
|
||||||
)
|
|
||||||
XposedHelpers.findAndHookMethod(classIfExists, "updateTime",
|
|
||||||
object : XC_MethodHook() {
|
|
||||||
@SuppressLint("SetTextI18n", "SimpleDateFormat")
|
|
||||||
override fun afterHookedMethod(param: MethodHookParam) {
|
|
||||||
try {
|
try {
|
||||||
val textV = param.thisObject as TextView
|
val textV = it.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(c!!.contentResolver, Settings.System.TIME_12_24)
|
||||||
c!!.contentResolver,
|
|
||||||
Settings.System.TIME_12_24
|
|
||||||
)
|
|
||||||
now_time = Calendar.getInstance().time
|
now_time = Calendar.getInstance().time
|
||||||
|
|
||||||
textV.text = getDate(c!!, t) + str + getTime(c!!, t)
|
textV.text = getDate(c!!, t) + str + getTime(c!!, t)
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@SuppressLint("SimpleDateFormat")
|
@SuppressLint("SimpleDateFormat")
|
||||||
private fun getDate(context: Context, t: String): String {
|
private fun getDate(context: Context, t: String): String {
|
||||||
var DatePattern = ""
|
var datePattern = ""
|
||||||
val isZh = isZh(context)
|
val isZh = isZh(context)
|
||||||
|
|
||||||
if (isYear) {
|
if (isYear) {
|
||||||
if (isZh) {
|
if (isZh) {
|
||||||
DatePattern += "YY年"
|
datePattern += "YY年"
|
||||||
// if (!isHideSpace) DatePattern = "$DatePattern "
|
// if (!isHideSpace) datePattern = "$datePattern "
|
||||||
} else {
|
} else {
|
||||||
DatePattern += "YY"
|
datePattern += "YY"
|
||||||
if (isMonth || isDay) DatePattern += "/"
|
if (isMonth || isDay) datePattern += "/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isMonth) {
|
if (isMonth) {
|
||||||
if (isZh) {
|
if (isZh) {
|
||||||
DatePattern += "M月"
|
datePattern += "M月"
|
||||||
// if (!isHideSpace) DatePattern = "$DatePattern "
|
// if (!isHideSpace) datePattern = "$datePattern "
|
||||||
} else {
|
} else {
|
||||||
DatePattern += "M"
|
datePattern += "M"
|
||||||
if (isDay) DatePattern += "/"
|
if (isDay) datePattern += "/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isDay) {
|
if (isDay) {
|
||||||
if (isZh) {
|
datePattern += if (isZh) {
|
||||||
DatePattern += "d日"
|
"d日"
|
||||||
} else {
|
} else {
|
||||||
DatePattern += "d"
|
"d"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isWeek) {
|
if (isWeek) {
|
||||||
if (!isHideSpace) DatePattern = "$DatePattern "
|
if (!isHideSpace) datePattern = "$datePattern "
|
||||||
DatePattern += "E"
|
datePattern += "E"
|
||||||
if (!isDoubleLine) {
|
if (!isDoubleLine) {
|
||||||
if (!isHideSpace) DatePattern = "$DatePattern "
|
if (!isHideSpace) datePattern = "$datePattern "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
datePattern = SimpleDateFormat(datePattern).format(now_time)
|
||||||
DatePattern = SimpleDateFormat(DatePattern).format(now_time)
|
return datePattern
|
||||||
|
|
||||||
return DatePattern
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("SimpleDateFormat")
|
@SuppressLint("SimpleDateFormat")
|
||||||
@@ -171,13 +134,9 @@ class StatusBarTimeCustomization : IXposedHookLoadPackage {
|
|||||||
val isZh = isZh(context)
|
val isZh = isZh(context)
|
||||||
timePattern += if (t == "24") "HH:mm" else "h:mm"
|
timePattern += if (t == "24") "HH:mm" else "h:mm"
|
||||||
if (isSecond) timePattern += ":ss"
|
if (isSecond) timePattern += ":ss"
|
||||||
|
|
||||||
timePattern = SimpleDateFormat(timePattern).format(now_time)
|
timePattern = SimpleDateFormat(timePattern).format(now_time)
|
||||||
|
|
||||||
if (isZh) timePattern = getPeriod(isZh) + timePattern else timePattern += getPeriod(isZh)
|
if (isZh) timePattern = getPeriod(isZh) + timePattern else timePattern += getPeriod(isZh)
|
||||||
|
|
||||||
timePattern = getDoubleHour() + timePattern
|
timePattern = getDoubleHour() + timePattern
|
||||||
|
|
||||||
return timePattern
|
return timePattern
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,8 +145,7 @@ class StatusBarTimeCustomization : IXposedHookLoadPackage {
|
|||||||
var period = ""
|
var period = ""
|
||||||
if (isPeriod) {
|
if (isPeriod) {
|
||||||
if (isZh) {
|
if (isZh) {
|
||||||
val now = SimpleDateFormat("HH").format(now_time)
|
when (SimpleDateFormat("HH").format(now_time)) {
|
||||||
when (now) {
|
|
||||||
"00", "01", "02", "03", "04", "05" -> {
|
"00", "01", "02", "03", "04", "05" -> {
|
||||||
period = "凌晨"
|
period = "凌晨"
|
||||||
}
|
}
|
||||||
@@ -222,8 +180,7 @@ class StatusBarTimeCustomization : IXposedHookLoadPackage {
|
|||||||
private fun getDoubleHour(): String {
|
private fun getDoubleHour(): String {
|
||||||
var doubleHour = ""
|
var doubleHour = ""
|
||||||
if (isDoubleHour) {
|
if (isDoubleHour) {
|
||||||
val now = SimpleDateFormat("HH").format(now_time)
|
when (SimpleDateFormat("HH").format(now_time)) {
|
||||||
when (now) {
|
|
||||||
"23", "00" -> {
|
"23", "00" -> {
|
||||||
doubleHour = "子时"
|
doubleHour = "子时"
|
||||||
}
|
}
|
||||||
@@ -268,7 +225,7 @@ class StatusBarTimeCustomization : IXposedHookLoadPackage {
|
|||||||
return doubleHour
|
return doubleHour
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isZh(context: Context): Boolean {
|
private fun isZh(context: Context): Boolean {
|
||||||
val locale = context.resources.configuration.locale
|
val locale = context.resources.configuration.locale
|
||||||
val language = locale.language
|
val language = locale.language
|
||||||
return language.endsWith("zh")
|
return language.endsWith("zh")
|
||||||
|
|||||||
@@ -395,6 +395,10 @@ fun <T> T.setLongField(field: String?, value: Long) = apply {
|
|||||||
XposedHelpers.setLongField(this, field, value)
|
XposedHelpers.setLongField(this, field, value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun <T> T.setFloatField(field: String?, value: Float) = apply {
|
||||||
|
XposedHelpers.setFloatField(this, field, value)
|
||||||
|
}
|
||||||
|
|
||||||
fun <T> T.setObjectField(field: String?, value: Any?) = apply {
|
fun <T> T.setObjectField(field: String?, value: Any?) = apply {
|
||||||
XposedHelpers.setObjectField(this, field, value)
|
XposedHelpers.setObjectField(this, field, value)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import com.lt2333.simplicitytools.BuildConfig
|
|||||||
import de.robv.android.xposed.XSharedPreferences
|
import de.robv.android.xposed.XSharedPreferences
|
||||||
|
|
||||||
object XSPUtils {
|
object XSPUtils {
|
||||||
var prefs = XSharedPreferences(BuildConfig.APPLICATION_ID, "config")
|
private var prefs = XSharedPreferences(BuildConfig.APPLICATION_ID, "config")
|
||||||
|
|
||||||
fun getBoolean(key: String, defValue: Boolean): Boolean {
|
fun getBoolean(key: String, defValue: Boolean): Boolean {
|
||||||
if (prefs.hasFileChanged()) {
|
if (prefs.hasFileChanged()) {
|
||||||
@@ -18,6 +18,13 @@ object XSPUtils {
|
|||||||
}
|
}
|
||||||
return prefs.getInt(key, defValue)
|
return prefs.getInt(key, defValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getFloat(key: String, defValue: Float): Float {
|
||||||
|
if (prefs.hasFileChanged()) {
|
||||||
|
prefs.reload()
|
||||||
|
}
|
||||||
|
return prefs.getFloat(key, defValue)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fun hasEnable(key: String, default: Boolean = false, noinline extraCondition: (() -> Boolean)? = null, crossinline block: () -> Unit) {
|
inline fun hasEnable(key: String, default: Boolean = false, noinline extraCondition: (() -> Boolean)? = null, crossinline block: () -> Unit) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources>
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="AppTheme" parent="android:Theme.Material.NoActionBar">
|
<style name="AppTheme" parent="android:Theme.Material.NoActionBar">
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
@@ -10,10 +10,8 @@
|
|||||||
<item name="android:textColor">@color/white</item>
|
<item name="android:textColor">@color/white</item>
|
||||||
<item name="android:colorBackground">@color/black</item>
|
<item name="android:colorBackground">@color/black</item>
|
||||||
<item name="android:statusBarColor">@color/black</item>
|
<item name="android:statusBarColor">@color/black</item>
|
||||||
<item name="android:windowLightStatusBar" tools:targetApi="m">false</item>
|
<item name="android:windowLightStatusBar">false</item>
|
||||||
<item name="android:forceDarkAllowed" tools:targetApi="Q">true</item>
|
<item name="android:forceDarkAllowed">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
<!-- 定义dialog的样式-->
|
|
||||||
</resources>
|
</resources>
|
||||||
@@ -151,4 +151,7 @@
|
|||||||
<string name="remove_thememanager_ads">移除主题壁纸的广告</string>
|
<string name="remove_thememanager_ads">移除主题壁纸的广告</string>
|
||||||
<string name="battery_life_function">电池页面显示当前温度</string>
|
<string name="battery_life_function">电池页面显示当前温度</string>
|
||||||
<string name="enable_wave_charge_animation">启用Alpha充电动画</string>
|
<string name="enable_wave_charge_animation">启用Alpha充电动画</string>
|
||||||
|
<string name="max_wallpaper_scale">壁纸缩放比例</string>
|
||||||
|
<string name="def">默认值:</string>
|
||||||
|
<string name="current">当前值:</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -151,4 +151,7 @@
|
|||||||
<string name="remove_thememanager_ads">拿掉主題壁紙的廣告</string>
|
<string name="remove_thememanager_ads">拿掉主題壁紙的廣告</string>
|
||||||
<string name="battery_life_function">電池頁面展示當前溫度</string>
|
<string name="battery_life_function">電池頁面展示當前溫度</string>
|
||||||
<string name="enable_wave_charge_animation">啟用Alpha充電動畫</string>
|
<string name="enable_wave_charge_animation">啟用Alpha充電動畫</string>
|
||||||
|
<string name="max_wallpaper_scale">壁紙縮放比例</string>
|
||||||
|
<string name="def">默認值:</string>
|
||||||
|
<string name="current">當前值:</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -151,4 +151,7 @@
|
|||||||
<string name="remove_thememanager_ads">拿掉主題壁紙的廣告</string>
|
<string name="remove_thememanager_ads">拿掉主題壁紙的廣告</string>
|
||||||
<string name="battery_life_function">電池頁面展示當前溫度</string>
|
<string name="battery_life_function">電池頁面展示當前溫度</string>
|
||||||
<string name="enable_wave_charge_animation">啟用Alpha充電動畫</string>
|
<string name="enable_wave_charge_animation">啟用Alpha充電動畫</string>
|
||||||
|
<string name="max_wallpaper_scale">壁紙縮放比例</string>
|
||||||
|
<string name="def">默認值:</string>
|
||||||
|
<string name="current">當前值:</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -151,4 +151,7 @@
|
|||||||
<string name="remove_thememanager_ads">Remove ads for theme manager</string>
|
<string name="remove_thememanager_ads">Remove ads for theme manager</string>
|
||||||
<string name="battery_life_function">Battery page shows the current temperature</string>
|
<string name="battery_life_function">Battery page shows the current temperature</string>
|
||||||
<string name="enable_wave_charge_animation">Enable wave charge animation</string>
|
<string name="enable_wave_charge_animation">Enable wave charge animation</string>
|
||||||
|
<string name="max_wallpaper_scale">Max wallpaper scale</string>
|
||||||
|
<string name="def">"Default: "</string>
|
||||||
|
<string name="current">Current:</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources>
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="AppTheme" parent="android:Theme.Material.Light.NoActionBar">
|
<style name="AppTheme" parent="android:Theme.Material.Light.NoActionBar">
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
@@ -10,11 +10,8 @@
|
|||||||
<item name="android:textAllCaps">false</item>
|
<item name="android:textAllCaps">false</item>
|
||||||
<item name="android:textColor">@color/black</item>
|
<item name="android:textColor">@color/black</item>
|
||||||
<item name="android:statusBarColor">@color/white</item>
|
<item name="android:statusBarColor">@color/white</item>
|
||||||
<item name="android:windowLightStatusBar" tools:targetApi="m">true</item>
|
<item name="android:windowLightStatusBar">true</item>
|
||||||
<item name="android:forceDarkAllowed" tools:targetApi="Q">true</item>
|
<item name="android:forceDarkAllowed">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
<!-- 定义dialog的样式-->
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
#Sun Feb 13 16:53:34 CST 2022
|
#Sun Feb 13 16:53:34 CST 2022
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
Reference in New Issue
Block a user