diff --git a/.idea/misc.xml b/.idea/misc.xml index 6199cc2..b516350 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,5 +1,12 @@ + + + diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 73bee2c..240908d 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -31,7 +31,8 @@ + android:label="@string/app_name" + android:screenOrientation="behind"> @@ -44,6 +45,7 @@ android:enabled="true" android:exported="true" android:label="@string/app_name" + android:screenOrientation="behind" android:targetActivity="com.fankes.tsbattery.ui.MainActivity"> diff --git a/app/src/main/java/com/fankes/tsbattery/hook/HookMain.kt b/app/src/main/java/com/fankes/tsbattery/hook/HookMain.kt index 82ed4af..a01c3cb 100644 --- a/app/src/main/java/com/fankes/tsbattery/hook/HookMain.kt +++ b/app/src/main/java/com/fankes/tsbattery/hook/HookMain.kt @@ -106,6 +106,7 @@ class HookMain : IXposedHookLoadPackage { replaceToNull(BASE_CHAT_PIE, "bf") replaceToNull(BASE_CHAT_PIE, "bg") } + /** 8.8.35 贡献者:StarWishsama */ "8.8.35", "8.8.38" -> { replaceToNull(BASE_CHAT_PIE, "bi") replaceToNull(BASE_CHAT_PIE, "bj") diff --git a/app/src/main/java/com/fankes/tsbattery/ui/MainActivity.kt b/app/src/main/java/com/fankes/tsbattery/ui/MainActivity.kt index 0fcd8a6..d2f0fdd 100644 --- a/app/src/main/java/com/fankes/tsbattery/ui/MainActivity.kt +++ b/app/src/main/java/com/fankes/tsbattery/ui/MainActivity.kt @@ -52,7 +52,9 @@ class MainActivity : AppCompatActivity() { companion object { private const val moduleVersion = BuildConfig.VERSION_NAME - private const val moduleSupport = "QQ 8.5.5~8.8.50、TIM 2+" + private const val qqSupportVersion = "8.8.17、8.8.23、8.8.35、8.8.38、8.8.50 (8.5.5~8.8.50)" + private const val timSupportVersion = "2+、3+ (并未完全测试每个版本)" + private const val wechatSupportVersion = "敬请期待" /** 声明当前实例 */ var instance: MainActivity? = null @@ -86,7 +88,8 @@ class MainActivity : AppCompatActivity() { .setTitle("模块没有激活") .setMessage( "检测到模块没有激活,模块需要 Xposed 环境依赖,同时需要系统拥有 Root 权限(太极阴可以免 Root),请自行查看本页面使用帮助与说明第三条。\n" + - "太极、应用转生、梦境(Pine)和第三方 Xposed 激活后可能不会提示激活,若想验证是否激活请打开“提示模块运行信息”自行检查,如果生效就代表模块运行正常,这里的激活状态只是一个显示意义上的存在。\n" + + "太极、应用转生、梦境(Pine)和第三方 Xposed 激活后可能不会提示激活,若想验证是否激活请打开“提示模块运行信息”自行检查," + + "如果生效就代表模块运行正常,这里的激活状态只是一个显示意义上的存在。\n" + "太极(无极)在 MIUI 设备上会提示打开授权,请进行允许,然后再次打开本应用查看激活状态。" ) .setPositiveButton("我知道了", null) @@ -94,7 +97,36 @@ class MainActivity : AppCompatActivity() { .show() /** 设置文本 */ findViewById(R.id.main_text_version).text = "当前版本:$moduleVersion" - findViewById(R.id.main_text_support).text = "支持 $moduleSupport" + findViewById(R.id.main_text_support_qq).apply { + text = qqSupportVersion + setOnClickListener { + AlertDialog.Builder(this@MainActivity) + .setTitle("兼容的 QQ 版本") + .setMessage(qqSupportVersion) + .setPositiveButton("我知道了", null) + .show() + } + } + findViewById(R.id.main_text_support_tim).apply { + text = timSupportVersion + setOnClickListener { + AlertDialog.Builder(this@MainActivity) + .setTitle("兼容的 TIM 版本") + .setMessage(timSupportVersion) + .setPositiveButton("我知道了", null) + .show() + } + } + findViewById(R.id.main_text_support_wechat).apply { + text = wechatSupportVersion + setOnClickListener { + AlertDialog.Builder(this@MainActivity) + .setTitle("兼容的微信版本") + .setMessage(wechatSupportVersion) + .setPositiveButton("我知道了", null) + .show() + } + } /** 初始化 View */ val protectModeSwitch = findViewById(R.id.protect_mode_switch) val hideIconInLauncherSwitch = findViewById(R.id.hide_icon_in_launcher_switch) @@ -220,6 +252,11 @@ class MainActivity : AppCompatActivity() { } } + override fun onBackPressed() { + setWorldReadable() + super.onBackPressed() + } + override fun onDestroy() { super.onDestroy() /** 销毁实例防止内存泄漏 */ diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 004145b..8a44c25 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -5,7 +5,7 @@ android:layout_height="match_parent" android:orientation="vertical" tools:context=".ui.MainActivity" - tools:ignore="HardcodedText"> + tools:ignore="HardcodedText,UseCompoundDrawables,ContentDescription"> - + android:layout_marginBottom="7dp" + android:gravity="center|start" + android:orientation="horizontal"> + + + + + + + + + + + + + + + + + + + + + + + + + @@ -366,8 +459,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="10dp" - android:src="@mipmap/qr_pay" - tools:ignore="ContentDescription" /> + android:src="@mipmap/qr_pay" />