38 Commits
4.2 ... 4.3

Author SHA1 Message Date
6b0fe1014e Update version to 4.3 | Support QQ 8.9.53~8.9.70 versions 2023-07-26 02:59:29 +08:00
bdf52ba463 Modify support QQ 8.9.70 2023-07-26 02:46:17 +08:00
c2b95b9133 Modify support QQ 8.9.70 (QQ-NT) hook entry item 2023-07-26 02:45:56 +08:00
2f64fb9ea9 Modify support QQ 8.9.58~8.9.68 2023-07-18 22:40:08 +08:00
f48277f434 Modify optimize code in QQTIMHooker 2023-07-18 22:35:28 +08:00
047f746afb Modify support QQ 8.9.55 2023-05-17 07:35:17 +08:00
ac885baa64 Update Gradle dependencies 2023-05-17 07:35:09 +08:00
4332881dad Modify support QQ 8.9.53 2023-04-27 01:23:06 +08:00
49c0655412 Update YukiHookAPI 2023-04-25 06:57:15 +08:00
7eeda27937 Update YukiHookAPI 2023-04-21 01:25:06 +08:00
a8692e8a33 Update version to 4.25 | Support QQ 8.9.30~8.9.50 versions 2023-04-17 06:19:55 +08:00
39ec0e8ef7 Modify change need restart dialog to prompt in ConfigActivity, activity_config 2023-04-17 05:59:55 +08:00
1dc22b90bb Modify merge to YukiHookAPI new usage 2023-04-17 05:50:35 +08:00
da955fc157 Update YukiHookAPI 2023-04-17 05:45:05 +08:00
94752010ec Modify merge contents of build.gradle into constant definitions 2023-04-15 22:35:36 +08:00
f9bc6fc013 Modify support QQ 8.9.50 2023-04-14 17:48:06 +08:00
dcd95e4d8d Update Gradle & Kotlin
- Update Kotlin version to 1.8.20
- Update Gradle version to 8.0.2
- Update Gradle dependencies
2023-04-08 00:00:35 +08:00
7f63f93165 Modify support QQ 8.9.38 2023-04-05 05:16:10 +08:00
e95af0bad9 Modify support QQ 8.9.35 2023-03-20 18:13:55 +08:00
344104903b Modify support QQ 8.9.33 2023-03-03 11:51:55 +08:00
249cec2bee Modify support QQ 8.9.30 2023-02-22 06:19:35 +08:00
42387603c6 Modify change package resources id cause some same host modules conflict with it in build.gradle 2023-02-22 06:17:48 +08:00
fb3aa96c0a Update Gradle dependencies 2023-02-22 06:15:05 +08:00
f7c31d9786 Added star history chart in README 2023-02-19 14:35:35 +08:00
8d00aca110 Fix "GitHub" spelling in all files 2023-02-07 05:29:35 +08:00
00a1aaad5b Modify change ProgressBar to CircularProgressIndicator in DialogBuilderFactory 2023-02-03 23:19:05 +08:00
a4602df9cb Modify optimize code in MainActivity 2023-02-03 01:43:05 +08:00
d5624e0e24 Update YukiHookAPI 2023-02-01 04:25:05 +08:00
60f9af38b2 Update .gitignore 2023-02-01 04:23:15 +08:00
d3bea2ec83 Update Gradle dependencies 2023-02-01 03:30:05 +08:00
d085659fbb Added new bug report issues template 2023-01-31 19:12:35 +08:00
f2ec8bf33e Update YukiHookAPI 2023-01-21 00:59:49 +08:00
3233e772bb Update Android Gradle Plugin to 7.4.0 2023-01-21 00:59:32 +08:00
e58da11553 Update Gradle dependencies 2023-01-19 22:27:32 +08:00
90d4c04593 Update README.md 2023-01-18 00:49:01 +08:00
bcb7f6b2c5 Modify rename ui/view to ui/widget 2023-01-17 11:14:27 +08:00
596726e8c7 Fix the central color problem of views such as CheckBox 2023-01-16 22:39:27 +08:00
0a52914911 Update copyright date to 2023 for all existing file 2023-01-14 10:57:18 +08:00
34 changed files with 471 additions and 196 deletions

104
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,104 @@
name: 问题与 BUG 反馈
description: 问题反馈必须使用此模板进行提交
labels: [ bug ]
title: "[问题与 BUG 反馈] (在这里简要描述问题原因)"
body:
- type: markdown
attributes:
value: |
### 请在下方填写问题发生的具体原因和复现步骤。
我们只接受从官方渠道或应用市场下载的 QQ、TIM、微信如果你正在第三方修改版请不要提交任何 BUG 与问题,我们无义务去解决,请自求多福。
请务必知悉:部分问题可能是 APP 自身产生的 BUG发生这种情况模块没有义务去负责解决与修复你可以尝试关闭模块以验证该问题是否来源于 APP 自身原因。
发生异常、崩溃、闪退或功能性问题,必须提交问题 Log (日志),没有 Log 的 issues 将直接被关闭。
- type: input
attributes:
label: 模块版本
description: 请填写当前使用的模块完整版本号,例如:**3.0**
validations:
required: true
- type: dropdown
attributes:
label: 作用域 APP
description: 请选择出现问题的作用域 APP。
options:
- QQ
- TIM
- 微信
- 两者或以上
validations:
required: true
- type: input
attributes:
label: 作用域 APP 版本
description: |
这里填写当前作用域 APP 的版本,例如:**QQ 8.9.28**、**微信 8.0.30**
如果存在多个有问题的作用域 APP请使用顿号分隔依次填写
validations:
required: true
- type: dropdown
attributes:
label: Android 版本
options:
- 13
- 12L/12.1
- 12
- 11
- 10
- 9
- 8.1
- 8.0.0
validations:
required: true
- type: input
attributes:
label: Xposed 框架名称与版本号
description: 请填写当前使用的 Xposed 框架,例如:**LSPosed 1.8.4(次版本号)**
validations:
required: true
- type: dropdown
attributes:
label: 系统是否已 Root
options:
-
-
validations:
required: true
- type: input
attributes:
label: 与当前作用域 APP 同作用域的 Xposed 模块
description: |
此模块的作用域为 QQ、TIM、微信为确保非其它模块冲突造成的问题请一定要填写当前你同时激活的相关模块。
若没有,请直接在下方填写“无”。
validations:
required: true
- type: textarea
attributes:
label: 详细描述问题发生的具体原因
description: 请在下方详细描述问题发生的具体场景、复现步骤和经过,以便我们能够按照你所描述的步骤复现这个问题。
validations:
required: true
- type: textarea
attributes:
label: 提供模块问题 Log 或必要 Log
description: LSPosed 可在日志管理中查看并筛选包含 `TSBattery` 的日志。
value: |
<details><summary>展开查看</summary><pre><code>
(此处粘贴问题 Log)
</code></pre></details>
<!-- 提交时请将括号内容包括括号全部删除,粘贴你复制的日志,不要破坏代码格式 -->
validations:
required: true
- type: checkboxes
attributes:
label: 确认一下你提交的信息
description: |
为了确保 issues 的质量和避免浪费不必要的时间,未勾选下方选项的 issues 将直接被关闭。
请一定确保你已经**勾选下方的选项**后再提交。
options:
- label: 我确保上述信息准确无误
required: false

View File

@@ -0,0 +1,6 @@
{
"keyAlias": "public",
"keyPassword": "123456",
"storeFileName": "universal.p12",
"storePassword": "123456"
}

View File

@@ -2,7 +2,7 @@
[![Blank](https://img.shields.io/badge/build-passing-brightgreen)](https://github.com/fankes/TSBattery)
[![Blank](https://img.shields.io/badge/license-AGPL3.0-blue)](https://github.com/fankes/TSBattery/blob/master/LICENSE)
[![Blank](https://img.shields.io/badge/version-v4.2-green)](https://github.com/fankes/TSBattery/releases)
[![Blank](https://img.shields.io/badge/version-v4.3-green)](https://github.com/fankes/TSBattery/releases)
[![Blank](https://img.shields.io/github/downloads/fankes/TSBattery/total?label=Release)](https://github.com/fankes/TSBattery/releases)
[![Blank](https://img.shields.io/github/downloads/Xposed-Modules-Repo/com.fankes.tsbattery/total?label=LSPosed%20Repo&logo=Android&style=flat&labelColor=F48FB1&logoColor=ffffff)](https://github.com/Xposed-Modules-Repo/com.fankes.tsbattery/releases)
[![Telegram](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/XiaofangInternet)
@@ -18,17 +18,15 @@ TSBattery 是一个旨在使 QQ、TIM、微信 变得更省电的开源 Xposed
## 适配说明
- 支持并建议使用 **LSPosed**(若作用域没有自动出现推荐请勾选 QQ、TIM、微信)
- 解锁 BL 并安装 **Magisk** 的设备建议使用 [LSPosed](https://github.com/LSPosed/LSPosed)
- 可以使用 **~~EdXposed~~**,但随时停止支持
- **太极无极 · 阴** 支持性不是很好,建议使用 **太极无极 · 阳****LSPatch (推荐)**
- **太极无极 · 阴** 支持性不是很好,建议使用 [LSPatch](https://github.com/LSPosed/LSPatch)
- 支持 **Pine**(梦境模块) 但是部分功能有限制
- 支持一些第三方免 Root 框架例如**应用转生**、**SandVXposed**,但是不推荐使用,可能会造成封号风险
- 请不要使用 **~~应用转生~~**,发生封号情况后果自负
- 如果微信不能在 **LSPosed** 中生效,请尝试勾选任意包含微信作用域的模块,例如 **微X模块**
- 如果在微信设置界面右上角你无法找到 **TSBattery** 的图标,请尝试同时激活 [WeXposed (微X模块)](https://github.com/Xposed-Modules-Repo/com.fkzhang.wechatxposed)
## 请勿用于非法用途
@@ -38,7 +36,7 @@ TSBattery 是一个旨在使 QQ、TIM、微信 变得更省电的开源 Xposed
- [Automatic Build on Commit](https://github.com/fankes/TSBattery/actions/workflows/commit_ci.yml)
上述更新为代码 `commit` 后自动触发,具体更新内容可点击上方的文字前往 **Github Actions** 进行查看,本更新由开源的流程自动编译发布,**不保证其稳定性**,所发布的版本**仅供测试**,且不会特殊说明甚至可能会变更版本号或保持与当前稳定版相同的版本号。
上述更新为代码 `commit` 后自动触发,具体更新内容可点击上方的文字前往 **GitHub Actions** 进行查看,本更新由开源的流程自动编译发布,**不保证其稳定性**,所发布的版本**仅供测试**,且不会特殊说明甚至可能会变更版本号或保持与当前稳定版相同的版本号。
- [Release](https://github.com/fankes/TSBattery/releases)
- [Xposed-Modules-Repo](https://github.com/Xposed-Modules-Repo/com.fankes.tsbattery/releases)
@@ -68,12 +66,16 @@ TSBattery 是一个旨在使 QQ、TIM、微信 变得更省电的开源 Xposed
- [CONTRIBUTING](https://github.com/fankes/TSBattery/blob/master/CONTRIBUTING.md)
## Star History
![Star History Chart](https://api.star-history.com/svg?repos=fankes/TSBattery&type=Date)
## 许可证
- [AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.html)
```
Copyright (C) 2019-2022 Fankes Studio(qzmmcn@163.com)
Copyright (C) 2017-2023 Fankes Studio(qzmmcn@163.com)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@@ -91,4 +93,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Powered by [YukiHookAPI](https://github.com/fankes/YukiHookAPI)
版权所有 © 2019-2022 Fankes Studio(qzmmcn@163.com)
版权所有 © 2017-2023 Fankes Studio(qzmmcn@163.com)

4
app/.gitignore vendored
View File

@@ -1,2 +1,4 @@
/build
/release
/release
/src/main/assets/xposed_init
/src/main/resources/META-INF/yukihookapi_init

View File

@@ -1,38 +1,51 @@
import groovy.json.JsonSlurper
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'com.google.devtools.ksp' version '1.7.22-1.0.8'
id 'org.jetbrains.kotlin.android'
id 'com.google.devtools.ksp'
}
android {
signingConfigs {
debug {
storeFile file('../keystore/public')
storePassword '123456'
keyAlias 'public'
keyPassword '123456'
universal {
def dirPath = rootProject.ext.app.signingConfigs.secretConfigsDirPath
def fileName = rootProject.ext.app.signingConfigs.secretConfigsFileName
def configs = new JsonSlurper().parse(file("${dirPath}/${fileName}"))
keyAlias configs.keyAlias
keyPassword configs.keyPassword
storeFile file("${dirPath}/${configs.storeFileName}")
storePassword configs.storePassword
v1SigningEnabled true
v2SigningEnabled true
}
}
compileSdkVersion 33
namespace 'com.fankes.tsbattery'
compileSdk rootProject.ext.android.compileSdk
defaultConfig {
applicationId "com.fankes.tsbattery"
minSdk 22
targetSdk 33
versionCode rootProject.ext.appVersionCode
versionName rootProject.ext.appVersionName
applicationId 'com.fankes.tsbattery'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
minSdk rootProject.ext.android.minSdk
targetSdk rootProject.ext.android.targetSdk
versionCode rootProject.ext.app.versionCode
versionName rootProject.ext.app.versionName
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
debug {
minifyEnabled false
signingConfig signingConfigs.universal
}
release {
minifyEnabled rootProject.ext.enableR8
shrinkResources rootProject.ext.enableR8
zipAlignEnabled rootProject.ext.enableR8
signingConfig signingConfigs.debug
minifyEnabled true
shrinkResources true
zipAlignEnabled true
signingConfig signingConfigs.universal
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
@@ -54,18 +67,18 @@ android {
lintOptions {
checkReleaseBuilds false
}
aaptOptions.additionalParameters '--allow-reserved-package-id', '--package-id', '0x64'
aaptOptions.additionalParameters '--allow-reserved-package-id', '--package-id', '0x37'
}
dependencies {
compileOnly 'de.robv.android.xposed:api:82'
implementation 'com.highcapable.yukihookapi:api:1.1.5'
ksp 'com.highcapable.yukihookapi:ksp-xposed:1.1.5'
implementation 'com.highcapable.yukihookapi:api:1.1.11'
ksp 'com.highcapable.yukihookapi:ksp-xposed:1.1.11'
implementation 'com.github.duanhong169:drawabletoolbox:1.0.7'
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.7'
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'

View File

@@ -37,6 +37,12 @@
# 排除注入的 Activity
-keep class com.fankes.tsbattery.ui.activity.parasitic.ConfigActivity
# 防止某些类被 R8 混淆 (可能是 BUG)
# FIXME: 已知问题字符串类名 (即使是常量) 也会被 R8 处理为混淆后的类名
# FIXME: 所以目前只能把不允许 R8 处理的类 keep 掉,同时在当前模块中也不会被混淆就是了
-keep class kotlin.Unit
-keep class kotlin.jvm.functions.Function0
-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
public static *** throwUninitializedProperty(...);
public static *** throwUninitializedPropertyAccessException(...);

View File

@@ -1 +0,0 @@
com.fankes.tsbattery.hook.HookEntry_YukiHookXposedInit

View File

@@ -1 +0,0 @@
com.fankes.tsbattery.hook.HookEntry

View File

@@ -1,6 +1,6 @@
/*
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
* Copyright (C) 2019-2022 Fankes Studio(qzmmcn@163.com)
* Copyright (C) 2017-2023 Fankes Studio(qzmmcn@163.com)
* https://github.com/fankes/TSBattery
*
* This software is non-free but opensource software: you can redistribute it

View File

@@ -1,6 +1,6 @@
/*
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
* Copyright (C) 2019-2022 Fankes Studio(qzmmcn@163.com)
* Copyright (C) 2017-2023 Fankes Studio(qzmmcn@163.com)
* https://github.com/fankes/TSBattery
*
* This software is non-free but opensource software: you can redistribute it

View File

@@ -1,6 +1,6 @@
/*
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
* Copyright (C) 2019-2022 Fankes Studio(qzmmcn@163.com)
* Copyright (C) 2017-2023 Fankes Studio(qzmmcn@163.com)
* https://github.com/fankes/TSBattery
*
* This software is non-free but opensource software: you can redistribute it
@@ -19,11 +19,14 @@
*
* This file is Created by fankes on 2022/9/28.
*/
@file:Suppress("StaticFieldLeak")
package com.fankes.tsbattery.data
import android.content.Context
import android.content.SharedPreferences
import android.widget.CompoundButton
import com.highcapable.yukihookapi.hook.factory.prefs
import com.highcapable.yukihookapi.hook.xposed.prefs.YukiHookPrefsBridge
/**
* 全局配置存储控制类
@@ -42,30 +45,30 @@ object ConfigData {
/** 停用全部省电功能 (停用模块) */
const val DISABLE_ALL_HOOK = "disable_all_hook"
/** 当前的 [SharedPreferences] */
private var sharePrefs: SharedPreferences? = null
/** 当前的 [YukiHookPrefsBridge] */
private var prefs: YukiHookPrefsBridge? = null
/**
* 读取 [SharedPreferences]
* 读取 [YukiHookPrefsBridge]
* @param key 键值名称
* @param value 键值内容
* @return [Boolean]
*/
private fun getBoolean(key: String, value: Boolean = false) = sharePrefs?.getBoolean(key, value) ?: value
private fun getBoolean(key: String, value: Boolean = false) = prefs?.getBoolean(key, value) ?: value
/**
* 存入 [SharedPreferences]
* 存入 [YukiHookPrefsBridge]
* @param key 键值名称
* @param value 键值内容
*/
private fun putBoolean(key: String, value: Boolean = false) = sharePrefs?.edit()?.putBoolean(key, value)?.apply()
private fun putBoolean(key: String, value: Boolean = false) = prefs?.edit { putBoolean(key, value) }
/**
* 初始化 [SharedPreferences]
* 初始化 [YukiHookPrefsBridge]
* @param context 实例
*/
fun init(context: Context) {
sharePrefs = context.getSharedPreferences("tsbattery_config", Context.MODE_PRIVATE)
prefs = context.prefs(name = "tsbattery_config").native()
}
/**

View File

@@ -1,6 +1,6 @@
/*
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
* Copyright (C) 2019-2022 Fankes Studio(qzmmcn@163.com)
* Copyright (C) 2017-2023 Fankes Studio(qzmmcn@163.com)
* https://github.com/fankes/TSBattery
*
* This software is non-free but opensource software: you can redistribute it

View File

@@ -1,6 +1,6 @@
/*
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
* Copyright (C) 2019-2022 Fankes Studio(qzmmcn@163.com)
* Copyright (C) 2017-2023 Fankes Studio(qzmmcn@163.com)
* https://github.com/fankes/TSBattery
*
* This software is non-free but opensource software: you can redistribute it
@@ -23,6 +23,7 @@ package com.fankes.tsbattery.hook.entity
import android.app.Activity
import android.app.Service
import android.content.Context
import android.content.res.Configuration
import android.os.Build
import android.view.View
@@ -30,10 +31,12 @@ import android.view.ViewGroup
import androidx.core.app.ServiceCompat
import androidx.fragment.app.Fragment
import com.fankes.tsbattery.BuildConfig
import com.fankes.tsbattery.R
import com.fankes.tsbattery.const.PackageName
import com.fankes.tsbattery.data.ConfigData
import com.fankes.tsbattery.hook.HookEntry
import com.fankes.tsbattery.hook.factory.hookSystemWakeLock
import com.fankes.tsbattery.hook.factory.isQQNightMode
import com.fankes.tsbattery.hook.factory.jumpToModuleSettings
import com.fankes.tsbattery.hook.factory.startModuleSettings
import com.fankes.tsbattery.utils.factory.appVersionName
@@ -47,6 +50,7 @@ import com.highcapable.yukihookapi.hook.log.loggerI
import com.highcapable.yukihookapi.hook.log.loggerW
import com.highcapable.yukihookapi.hook.type.android.*
import com.highcapable.yukihookapi.hook.type.java.*
import java.lang.reflect.Proxy
/**
* Hook QQ、TIM
@@ -56,15 +60,24 @@ object QQTIMHooker : YukiBaseHooker() {
/** QQ、TIM 存在的类 */
const val JumpActivityClass = "${PackageName.QQ}.activity.JumpActivity"
/** QQ、TIM 存在的类 */
/** QQ、TIM 存在的类 (NT 版本不再存在) */
private const val QQSettingSettingActivityClass = "${PackageName.QQ}.activity.QQSettingSettingActivity"
/** QQ 新版存在的类 (Pad 模式) */
/** QQ 新版存在的类 (Pad 模式 - NT 版本不再存在) */
private const val QQSettingSettingFragmentClass = "${PackageName.QQ}.fragment.QQSettingSettingFragment"
/** QQ、TIM 存在的类 */
/** QQ、TIM 存在的类 (NT 版本不再存在) */
private const val AboutActivityClass = "${PackageName.QQ}.activity.AboutActivity"
/** QQ 新版本存在的类 */
private const val GeneralSettingActivityClass = "${PackageName.QQ}.activity.GeneralSettingActivity"
/** QQ 新版本 (NT) 存在的类 */
private const val MainSettingFragmentClass = "${PackageName.QQ}.setting.main.MainSettingFragment"
/** QQ 新版本 (NT) 存在的类 */
private const val MainSettingConfigProviderClass = "${PackageName.QQ}.setting.main.MainSettingConfigProvider"
/** QQ、TIM 新版本存在的类 */
private const val FormSimpleItemClass = "${PackageName.QQ}.widget.FormSimpleItem"
@@ -78,8 +91,7 @@ object QQTIMHooker : YukiBaseHooker() {
private const val CoreService_KernelServiceClass = "${PackageName.QQ}.app.CoreService\$KernelService"
/** 根据多个版本存的不同的类 */
private val BaseChatPieClass =
VariousClass("${PackageName.QQ}.activity.aio.core.BaseChatPie", "${PackageName.QQ}.activity.BaseChatPie")
private val BaseChatPieClass = VariousClass("${PackageName.QQ}.activity.aio.core.BaseChatPie", "${PackageName.QQ}.activity.BaseChatPie")
/** 一个内部进程的名称 (与 X5 浏览器内核有关) */
private val privilegedProcessName = "$packageName:privileged_process"
@@ -93,6 +105,14 @@ object QQTIMHooker : YukiBaseHooker() {
*/
private val isQQ get() = packageName == PackageName.QQ
/**
* 当前是否为 QQ 的 NT 版本
*
* 在 QQ NT 中 [AboutActivityClass] 已被移除 - 以此作为判断条件
* @return [Boolean]
*/
private val isQQNTVersion get() = isQQ && AboutActivityClass.hasClass().not()
/** 当前宿主的版本 */
private var hostVersionName = "<unknown>"
@@ -122,124 +142,140 @@ object QQTIMHooker : YukiBaseHooker() {
private fun hookQQBaseChatPie() {
if (isQQ) when (hostVersionName) {
"8.0.0" -> {
hookBaseChatPie(methodName = "bq")
hookBaseChatPie(methodName = "aL")
hookBaseChatPie("bq")
hookBaseChatPie("aL")
}
"8.0.5", "8.0.7" -> {
hookBaseChatPie(methodName = "bw")
hookBaseChatPie(methodName = "aQ")
hookBaseChatPie("bw")
hookBaseChatPie("aQ")
}
"8.1.0", "8.1.3" -> {
hookBaseChatPie(methodName = "bE")
hookBaseChatPie(methodName = "aT")
hookBaseChatPie("bE")
hookBaseChatPie("aT")
}
"8.1.5" -> {
hookBaseChatPie(methodName = "bF")
hookBaseChatPie(methodName = "aT")
hookBaseChatPie("bF")
hookBaseChatPie("aT")
}
"8.1.8", "8.2.0", "8.2.6" -> {
hookBaseChatPie(methodName = "bC")
hookBaseChatPie(methodName = "aT")
hookBaseChatPie("bC")
hookBaseChatPie("aT")
}
"8.2.7", "8.2.8", "8.2.11", "8.3.0" -> {
hookBaseChatPie(methodName = "bE")
hookBaseChatPie(methodName = "aV")
hookBaseChatPie("bE")
hookBaseChatPie("aV")
}
"8.3.5" -> {
hookBaseChatPie(methodName = "bR")
hookBaseChatPie(methodName = "aX")
hookBaseChatPie("bR")
hookBaseChatPie("aX")
}
"8.3.6" -> {
hookBaseChatPie(methodName = "cp")
hookBaseChatPie(methodName = "aX")
hookBaseChatPie("cp")
hookBaseChatPie("aX")
}
"8.3.9" -> {
hookBaseChatPie(methodName = "cj")
hookBaseChatPie(methodName = "aT")
hookBaseChatPie("cj")
hookBaseChatPie("aT")
}
"8.4.1", "8.4.5" -> {
hookBaseChatPie(methodName = "ck")
hookBaseChatPie(methodName = "aT")
hookBaseChatPie("ck")
hookBaseChatPie("aT")
}
"8.4.8", "8.4.10", "8.4.17", "8.4.18", "8.5.0" -> {
hookBaseChatPie(methodName = "remainScreenOn")
hookBaseChatPie(methodName = "cancelRemainScreenOn")
hookBaseChatPie("remainScreenOn")
hookBaseChatPie("cancelRemainScreenOn")
}
"8.5.5" -> {
hookBaseChatPie(methodName = "bT")
hookBaseChatPie(methodName = "aN")
hookBaseChatPie("bT")
hookBaseChatPie("aN")
}
"8.6.0", "8.6.5", "8.7.0", "8.7.5", "8.7.8", "8.8.0", "8.8.3", "8.8.5" -> {
hookBaseChatPie(methodName = "ag")
hookBaseChatPie(methodName = "ah")
hookBaseChatPie("ag")
hookBaseChatPie("ah")
}
"8.8.11", "8.8.12" -> {
hookBaseChatPie(methodName = "bc")
hookBaseChatPie(methodName = "bd")
hookBaseChatPie("bc")
hookBaseChatPie("bd")
}
"8.8.17", "8.8.20" -> {
hookBaseChatPie(methodName = "bd")
hookBaseChatPie(methodName = "be")
hookBaseChatPie("bd")
hookBaseChatPie("be")
}
"8.8.23", "8.8.28" -> {
hookBaseChatPie(methodName = "bf")
hookBaseChatPie(methodName = "bg")
hookBaseChatPie("bf")
hookBaseChatPie("bg")
}
"8.8.33" -> {
hookBaseChatPie(methodName = "bg")
hookBaseChatPie(methodName = "bh")
hookBaseChatPie("bg")
hookBaseChatPie("bh")
}
"8.8.35", "8.8.38" -> {
hookBaseChatPie(methodName = "bi")
hookBaseChatPie(methodName = "bj")
hookBaseChatPie("bi")
hookBaseChatPie("bj")
}
"8.8.50" -> {
hookBaseChatPie(methodName = "bj")
hookBaseChatPie(methodName = "bk")
hookBaseChatPie("bj")
hookBaseChatPie("bk")
}
"8.8.55", "8.8.68", "8.8.80" -> {
hookBaseChatPie(methodName = "bk")
hookBaseChatPie(methodName = "bl")
hookBaseChatPie("bk")
hookBaseChatPie("bl")
}
"8.8.83", "8.8.85", "8.8.88", "8.8.90" -> {
hookBaseChatPie(methodName = "bl")
hookBaseChatPie(methodName = "bm")
hookBaseChatPie("bl")
hookBaseChatPie("bm")
}
"8.8.93", "8.8.95" -> {
hookBaseChatPie(methodName = "J3")
hookBaseChatPie(methodName = "S")
hookBaseChatPie("J3")
hookBaseChatPie("S")
}
"8.8.98" -> {
hookBaseChatPie(methodName = "M3")
hookBaseChatPie(methodName = "S")
hookBaseChatPie("M3")
hookBaseChatPie("S")
}
"8.9.0", "8.9.1", "8.9.2" -> {
hookBaseChatPie(methodName = "N3")
hookBaseChatPie(methodName = "S")
hookBaseChatPie("N3")
hookBaseChatPie("S")
}
"8.9.3", "8.9.5" -> {
hookBaseChatPie(methodName = "H3")
hookBaseChatPie(methodName = "P")
hookBaseChatPie("H3")
hookBaseChatPie("P")
}
"8.9.8", "8.9.10" -> {
hookBaseChatPie(methodName = "H3")
hookBaseChatPie(methodName = "N")
hookBaseChatPie("H3")
hookBaseChatPie("N")
}
"8.9.13" -> {
hookBaseChatPie(methodName = "y3")
hookBaseChatPie(methodName = "H")
hookBaseChatPie("y3")
hookBaseChatPie("H")
}
"8.9.15", "8.9.18", "8.9.19", "8.9.20" -> {
hookBaseChatPie(methodName = "w3")
hookBaseChatPie(methodName = "H")
hookBaseChatPie("w3")
hookBaseChatPie("H")
}
"8.9.23", "8.9.25" -> {
hookBaseChatPie(methodName = "z3")
hookBaseChatPie(methodName = "H")
hookBaseChatPie("z3")
hookBaseChatPie("H")
}
"8.9.28" -> {
hookBaseChatPie(methodName = "A3")
hookBaseChatPie(methodName = "H")
"8.9.28", "8.9.30", "8.9.33" -> {
hookBaseChatPie("A3")
hookBaseChatPie("H")
}
"8.9.35", "8.9.38", "8.9.50" -> {
hookBaseChatPie("B3")
hookBaseChatPie("H")
}
"8.9.53", "8.9.55", "8.9.58" -> {
hookBaseChatPie("C3")
hookBaseChatPie("H")
}
"8.9.63", "8.9.68" -> {
hookBaseChatPie("t3")
hookBaseChatPie("J")
}
"8.9.70" -> {
hookBaseChatPie("u3")
hookBaseChatPie("J")
}
else -> {
HookEntry.isHookClientSupport = false
@@ -532,11 +568,68 @@ object QQTIMHooker : YukiBaseHooker() {
}.ignoredHookClassNotFoundFailure()
}
/** Hook QQ 的设置界面添加模块设置入口 (新版) */
private fun hookQQSettingsUi() {
if (MainSettingFragmentClass.hasClass().not()) return loggerE(msg = "Could not found main setting class, hook aborted")
val kotlinUnit = "kotlin.Unit"
val kotlinFunction0 = "kotlin.jvm.functions.Function0"
val simpleItemProcessorClass = searchClass {
from("${PackageName.QQ}.setting.processor").absolute()
constructor { param(ContextClass, IntType, CharSequenceClass, IntType) }
method {
param(kotlinFunction0)
returnType = UnitType
}
field().count { it >= 6 }
}.get() ?: return loggerE(msg = "Could not found processor class, hook aborted")
/**
* 创建入口点条目
* @param context 当前实例
* @return [Any]
*/
fun createTSEntryItem(context: Context): Any {
/** 为了使用图标资源 ID - 这里需要重新注入模块资源防止不生效 */
context.injectModuleAppResources()
val iconResId = if (context.isQQNightMode()) R.mipmap.ic_tsbattery_entry_night else R.mipmap.ic_tsbattery_entry_day
return simpleItemProcessorClass.buildOf(context, R.id.tsbattery_qq_entry_item_id, "TSBattery", iconResId) {
param(ContextClass, IntType, CharSequenceClass, IntType)
}?.also { entryItem ->
val onClickMethod = simpleItemProcessorClass.method {
param { it[0].name == kotlinFunction0 }
paramCount = 1
returnType = UnitType
}.giveAll().lastOrNull() ?: error("Could not found processor method")
val proxyOnClick = Proxy.newProxyInstance(appClassLoader, arrayOf(onClickMethod.parameterTypes[0])) { any, method, args ->
if (method.name == "invoke") {
context.startModuleSettings()
kotlinUnit.toClass().field { name = "INSTANCE" }.get().any()
} else method.invoke(any, args)
}; onClickMethod.invoke(entryItem, proxyOnClick)
} ?: error("Could not create TSBattery entry item")
}
MainSettingConfigProviderClass.hook {
injectMember {
method {
param(ContextClass)
returnType = ListClass
}
afterHook {
val context = args().first().cast<Context>() ?: return@afterHook
val processor = result<MutableList<Any?>>() ?: return@afterHook
processor.add(1, processor[0]?.javaClass?.buildOf(arrayListOf<Any>().apply { add(createTSEntryItem(context)) }, "", "") {
param(ListClass, CharSequenceClass, CharSequenceClass)
})
}
}
}
}
/**
* Hook QQ 的设置界面添加模块设置入口
* Hook QQ 的设置界面添加模块设置入口 (旧版)
* @param instance 当前设置界面实例
*/
private fun hookQQSettingsUI(instance: Any?) {
private fun hookQQSettingsUiLegacy(instance: Any?) {
/** 当前的顶级 Item 实例 */
val formItemRefRoot = instance?.current()?.field {
type { it.name == FormSimpleItemClass || it.name == FormCommonSingleLineItemClass }.index(num = 1)
@@ -579,7 +672,9 @@ object QQTIMHooker : YukiBaseHooker() {
/** 不注入此进程防止部分系统发生 X5 浏览器内核崩溃问题 */
if (processName.startsWith(privilegedProcessName)) return@onCreate
ConfigData.init(context = this)
registerModuleAppActivities(AboutActivityClass)
if (isQQNTVersion)
registerModuleAppActivities(GeneralSettingActivityClass)
else registerModuleAppActivities(AboutActivityClass)
if (ConfigData.isDisableAllHook) return@onCreate
hookSystemWakeLock()
hookQQBaseChatPie()
@@ -600,26 +695,30 @@ object QQTIMHooker : YukiBaseHooker() {
afterHook { instance<Activity>().jumpToModuleSettings() }
}
}
/** 将条目注入设置界面 (Activity) */
QQSettingSettingActivityClass.hook {
injectMember {
method {
name = "doOnCreate"
param(BundleClass)
/** Hook 设置界面入口点 */
if (isQQNTVersion) hookQQSettingsUi()
else {
/** 将条目注入设置界面 (Activity) */
QQSettingSettingActivityClass.hook {
injectMember {
method {
name = "doOnCreate"
param(BundleClass)
}
afterHook { hookQQSettingsUiLegacy(instance) }
}
afterHook { hookQQSettingsUI(instance) }
}
/** 将条目注入设置界面 (Fragment) */
QQSettingSettingFragmentClass.hook {
injectMember {
method {
name = "doOnCreateView"
paramCount = 3
}
afterHook { hookQQSettingsUiLegacy(instance) }
}
}.ignoredHookClassNotFoundFailure()
}
/** 将条目注入设置界面 (Fragment) */
QQSettingSettingFragmentClass.hook {
injectMember {
method {
name = "doOnCreateView"
paramCount = 3
}
afterHook { hookQQSettingsUI(instance) }
}
}.ignoredHookClassNotFoundFailure()
}
}
}

View File

@@ -1,6 +1,6 @@
/*
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
* Copyright (C) 2019-2022 Fankes Studio(qzmmcn@163.com)
* Copyright (C) 2017-2023 Fankes Studio(qzmmcn@163.com)
* https://github.com/fankes/TSBattery
*
* This software is non-free but opensource software: you can redistribute it

View File

@@ -1,6 +1,6 @@
/*
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
* Copyright (C) 2019-2022 Fankes Studio(qzmmcn@163.com)
* Copyright (C) 2017-2023 Fankes Studio(qzmmcn@163.com)
* https://github.com/fankes/TSBattery
*
* This software is non-free but opensource software: you can redistribute it
@@ -47,7 +47,7 @@ private val ThemeUtilClass = VariousClass("${PackageName.QQ}.theme.ThemeUtil", "
* QQ、TIM 主题是否为夜间模式
* @return [Boolean]
*/
private fun Context.isQQNightMode() = runCatching {
fun Context.isQQNightMode() = runCatching {
ThemeUtilClass.get(classLoader).method {
name = "getUserCurrentThemeId"
paramCount = 1

View File

@@ -1,6 +1,6 @@
/*
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
* Copyright (C) 2019-2022 Fankes Studio(qzmmcn@163.com)
* Copyright (C) 2017-2023 Fankes Studio(qzmmcn@163.com)
* https://github.com/fankes/TSBattery
*
* This software is non-free but opensource software: you can redistribute it
@@ -54,7 +54,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
"8.8.55", "8.8.68", "8.8.80", "8.8.83", "8.8.85", "8.8.88", "8.8.90",
"8.8.93", "8.8.95", "8.8.98", "8.9.0", "8.9.1", "8.9.2", "8.9.3",
"8.9.5", "8.9.8", "8.9.10", "8.9.13", "8.9.15", "8.9.18", "8.9.19",
"8.9.20", "8.9.23", "8.9.25", "8.9.28"
"8.9.20", "8.9.23", "8.9.25", "8.9.28", "8.9.30", "8.9.33",
"8.9.35", "8.9.38", "8.9.50", "8.9.53", "8.9.55", "8.9.58",
"8.9.63", "8.9.68", "8.9.70"
)
private val qqSupportVersion by lazy {
if (qqSupportVersions.isNotEmpty()) {
@@ -128,12 +130,6 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
/** 振动提醒 */
it.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP)
}
/** 设置桌面图标显示隐藏 */
binding.hideIconInLauncherSwitch.isChecked = isLauncherIconShowing.not()
binding.hideIconInLauncherSwitch.setOnCheckedChangeListener { btn, b ->
if (btn.isPressed.not()) return@setOnCheckedChangeListener
hideOrShowLauncherIcon(b)
}
/** 快捷操作 QQ */
binding.quickQqButton.setOnClickListener { startModuleSettings(PackageName.QQ) }
/** 快捷操作 TIM */
@@ -146,6 +142,12 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
binding.linkWithFollowMe.setOnClickListener {
openBrowser(url = "https://www.coolapk.com/u/876977", packageName = "com.coolapk.market")
}
/** 设置桌面图标显示隐藏 */
binding.hideIconInLauncherSwitch.isChecked = isLauncherIconShowing.not()
binding.hideIconInLauncherSwitch.setOnCheckedChangeListener { btn, b ->
if (btn.isPressed.not()) return@setOnCheckedChangeListener
hideOrShowLauncherIcon(b)
}
}
/**

View File

@@ -1,6 +1,6 @@
/*
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
* Copyright (C) 2019-2022 Fankes Studio(qzmmcn@163.com)
* Copyright (C) 2017-2023 Fankes Studio(qzmmcn@163.com)
* https://github.com/fankes/TSBattery
*
* This software is non-free but opensource software: you can redistribute it

View File

@@ -1,6 +1,6 @@
/*
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
* Copyright (C) 2019-2022 Fankes Studio(qzmmcn@163.com)
* Copyright (C) 2017-2023 Fankes Studio(qzmmcn@163.com)
* https://github.com/fankes/TSBattery
*
* This software is non-free but opensource software: you can redistribute it
@@ -79,6 +79,22 @@ class ConfigActivity : BaseActivity<ActivityConfigBinding>() {
binding.inactiveModeIcon.isGone = HookEntry.isHookClientSupport
binding.unsupportItem.isGone = HookEntry.isHookClientSupport
binding.executorInfoText.text = "${YukiHookAPI.Status.Executor.name} API ${YukiHookAPI.Status.Executor.apiLevel}"
binding.needRestartTipText.replaceToAppName()
binding.needRestartTipText.setOnClickListener {
showDialog {
title = "需要重新启动"
msg = "你必须重新启动${appName}才能使当前更改生效,现在重新启动吗?"
confirmButton {
cancel()
finish()
exitProcess(status = 0)
}
cancelButton(text = "稍后再说") {
cancel()
it.isVisible = false
}
}
}
/** 刷新当前模式文本 */
fun refreshCurrentModeText() {
binding.currentModeText.text = when {
@@ -96,24 +112,15 @@ class ConfigActivity : BaseActivity<ActivityConfigBinding>() {
refreshConfigItems()
binding.infoTipText.replaceToAppName()
binding.qqTimProtectTipText.replaceToAppName()
binding.disableAllHookSwitch.bind(ConfigData.DISABLE_ALL_HOOK) { refreshConfigItems(); refreshCurrentModeText(); showRestartDialog() }
binding.qqTimProtectModeSwitch.bind(ConfigData.ENABLE_QQ_TIM_PROTECT_MODE) { refreshCurrentModeText(); showRestartDialog() }
binding.qqTimCoreServiceSwitch.bind(ConfigData.ENABLE_KILL_QQ_TIM_CORESERVICE) { showRestartDialog() }
binding.qqTimCoreServiceChildSwitch.bind(ConfigData.ENABLE_KILLE_QQ_TIM_CORESERVICE_CHILD) { showRestartDialog() }
binding.disableAllHookSwitch.bind(ConfigData.DISABLE_ALL_HOOK) { refreshConfigItems(); refreshCurrentModeText(); showNeedRestartTip() }
binding.qqTimProtectModeSwitch.bind(ConfigData.ENABLE_QQ_TIM_PROTECT_MODE) { refreshCurrentModeText(); showNeedRestartTip() }
binding.qqTimCoreServiceSwitch.bind(ConfigData.ENABLE_KILL_QQ_TIM_CORESERVICE) { showNeedRestartTip() }
binding.qqTimCoreServiceChildSwitch.bind(ConfigData.ENABLE_KILLE_QQ_TIM_CORESERVICE_CHILD) { showNeedRestartTip() }
}
/** 显示重新启动对话框 */
private fun showRestartDialog() {
showDialog {
title = "需要重新启动"
msg = "你必须重新启动${appName}才能使当前更改生效,现在重新启动吗?"
confirmButton {
cancel()
finish()
exitProcess(status = 0)
}
cancelButton(text = "稍后再说")
}
/** 显示需要重新启动提示 */
private fun showNeedRestartTip() {
binding.needRestartTipText.isVisible = true
}
/** 替换占位符到当前 APP 名称 */

View File

@@ -1,6 +1,6 @@
/*
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
* Copyright (C) 2019-2022 Fankes Studio(qzmmcn@163.com)
* Copyright (C) 2017-2023 Fankes Studio(qzmmcn@163.com)
* https://github.com/fankes/TSBattery
*
* This software is non-free but opensource software: you can redistribute it
@@ -21,7 +21,7 @@
*/
@file:Suppress("SameParameterValue")
package com.fankes.tsbattery.ui.view
package com.fankes.tsbattery.ui.widget
import android.content.Context
import android.content.res.ColorStateList

View File

@@ -1,6 +1,6 @@
/*
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
* Copyright (C) 2019-2022 Fankes Studio(qzmmcn@163.com)
* Copyright (C) 2017-2023 Fankes Studio(qzmmcn@163.com)
* https://github.com/fankes/TSBattery
*
* This software is non-free but opensource software: you can redistribute it
@@ -29,11 +29,11 @@ import android.view.Gravity
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import android.widget.ProgressBar
import android.widget.TextView
import androidx.appcompat.app.AlertDialog
import com.fankes.tsbattery.R
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.progressindicator.CircularProgressIndicator
import com.highcapable.yukihookapi.annotation.CauseProblemsApi
import com.highcapable.yukihookapi.hook.factory.applyModuleTheme
@@ -89,7 +89,10 @@ class DialogBuilder(val context: Context) {
customLayoutView = LinearLayout(context).apply {
orientation = LinearLayout.HORIZONTAL
gravity = Gravity.CENTER or Gravity.START
addView(ProgressBar(context))
addView(CircularProgressIndicator(context).apply {
isIndeterminate = true
trackCornerRadius = 10.dp(context)
})
addView(View(context).apply { layoutParams = ViewGroup.LayoutParams(20.dp(context), 5) })
addView(TextView(context).apply {
tag = "progressContent"

View File

@@ -1,6 +1,6 @@
/*
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
* Copyright (C) 2019-2022 Fankes Studio(qzmmcn@163.com)
* Copyright (C) 2017-2023 Fankes Studio(qzmmcn@163.com)
* https://github.com/fankes/TSBattery
*
* This software is non-free but opensource software: you can redistribute it

View File

@@ -1,6 +1,6 @@
/*
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
* Copyright (C) 2019-2022 Fankes Studio(qzmmcn@163.com)
* Copyright (C) 2017-2023 Fankes Studio(qzmmcn@163.com)
* https://github.com/fankes/TSBattery
*
* This software is non-free but opensource software: you can redistribute it

View File

@@ -1,6 +1,6 @@
/*
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
* Copyright (C) 2019-2022 Fankes Studio(qzmmcn@163.com)
* Copyright (C) 2017-2023 Fankes Studio(qzmmcn@163.com)
* https://github.com/fankes/TSBattery
*
* This software is non-free but opensource software: you can redistribute it
@@ -36,7 +36,7 @@ import java.io.Serializable
import java.util.*
/**
* 获取 Github Release 最新版本工具类
* 获取 GitHub Release 最新版本工具类
*/
object GithubReleaseTool {
@@ -130,7 +130,7 @@ object GithubReleaseTool {
}
/**
* Github Release bean
* GitHub Release bean
* @param name 版本名称
* @param htmlUrl 网页地址
* @param content 更新日志

View File

@@ -1,6 +1,6 @@
/*
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
* Copyright (C) 2019-2022 Fankes Studio(qzmmcn@163.com)
* Copyright (C) 2017-2023 Fankes Studio(qzmmcn@163.com)
* https://github.com/fankes/TSBattery
*
* This software is non-free but opensource software: you can redistribute it
@@ -26,7 +26,7 @@ import com.fankes.tsbattery.BuildConfig
import com.fankes.tsbattery.utils.factory.openBrowser
import com.fankes.tsbattery.utils.factory.showDialog
import com.highcapable.yukihookapi.YukiHookAPI
import com.highcapable.yukihookapi.hook.factory.modulePrefs
import com.highcapable.yukihookapi.hook.factory.prefs
import com.highcapable.yukihookapi.hook.xposed.prefs.data.PrefsData
/**
@@ -42,8 +42,8 @@ object YukiPromoteTool {
* @param context 实例
*/
fun promote(context: Context) {
fun saveReaded() = context.modulePrefs.put(YUKI_PROMOTE_READED, value = true)
if (context.modulePrefs.get(YUKI_PROMOTE_READED).not())
fun saveReaded() = context.prefs().edit { put(YUKI_PROMOTE_READED, value = true) }
if (context.prefs().get(YUKI_PROMOTE_READED).not())
context.showDialog {
title = "面向开发者的推广"
msg = "你想快速拥有一个自己的 Xposed 模块吗,你只需要拥有基础的 Android 开发经验以及使用 Kotlin 编程语言即可。\n\n" +

View File

@@ -83,6 +83,21 @@
android:textSize="13sp"
android:visibility="gone" />
<TextView
android:id="@+id/need_restart_tip_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="5dp"
android:background="@drawable/bg_orange_round"
android:gravity="center"
android:padding="5dp"
android:text="新的设置需要重新启动{APP_NAME}才能生效"
android:textColor="@color/white"
android:textSize="13sp"
android:visibility="gone" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -286,7 +301,7 @@
android:paddingRight="15dp"
android:paddingBottom="15dp">
<com.fankes.tsbattery.ui.view.MaterialSwitch
<com.fankes.tsbattery.ui.widget.MaterialSwitch
android:id="@+id/disable_all_hook_switch"
android:layout_width="match_parent"
android:layout_height="35dp"
@@ -326,7 +341,7 @@
android:paddingTop="10dp"
android:paddingRight="15dp">
<com.fankes.tsbattery.ui.view.MaterialSwitch
<com.fankes.tsbattery.ui.widget.MaterialSwitch
android:id="@+id/qq_tim_protect_mode_switch"
android:layout_width="match_parent"
android:layout_height="35dp"
@@ -360,7 +375,7 @@
android:paddingRight="15dp"
android:paddingBottom="15dp">
<com.fankes.tsbattery.ui.view.MaterialSwitch
<com.fankes.tsbattery.ui.widget.MaterialSwitch
android:id="@+id/qq_tim_core_service_switch"
android:layout_width="match_parent"
android:layout_height="35dp"
@@ -379,7 +394,7 @@
android:textColor="@color/colorTextDark"
android:textSize="12sp" />
<com.fankes.tsbattery.ui.view.MaterialSwitch
<com.fankes.tsbattery.ui.widget.MaterialSwitch
android:id="@+id/qq_tim_core_service_child_switch"
android:layout_width="match_parent"
android:layout_height="35dp"

View File

@@ -400,7 +400,7 @@
android:textSize="12sp" />
</LinearLayout>
<com.fankes.tsbattery.ui.view.MaterialSwitch
<com.fankes.tsbattery.ui.widget.MaterialSwitch
android:id="@+id/hide_icon_in_launcher_switch"
android:layout_width="match_parent"
android:layout_height="wrap_content"

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -4,11 +4,11 @@
<!-- Primary brand color. -->
<item name="colorPrimary">@color/colorPrimaryAccent</item>
<item name="colorPrimaryVariant">@color/colorPrimaryAccent</item>
<item name="colorOnPrimary">@color/black</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/colorPrimaryAccent</item>
<item name="colorSecondaryVariant">@color/colorPrimaryAccent</item>
<item name="colorOnSecondary">@color/colorPrimaryAccent</item>
<item name="colorOnSecondary">@color/white</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<item name="tsbattery_qq_entry_item_id" type="id" />
</resources>

View File

@@ -4,11 +4,11 @@
<!-- Primary brand color. -->
<item name="colorPrimary">@color/colorPrimaryAccent</item>
<item name="colorPrimaryVariant">@color/colorPrimaryAccent</item>
<item name="colorOnPrimary">@color/colorPrimaryAccent</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/colorPrimaryAccent</item>
<item name="colorSecondaryVariant">@color/colorPrimaryAccent</item>
<item name="colorOnSecondary">@color/colorPrimaryAccent</item>
<item name="colorOnSecondary">@color/white</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->

View File

@@ -1,13 +1,24 @@
plugins {
id 'com.android.application' version '7.3.1' apply false
id 'com.android.library' version '7.3.1' apply false
id 'org.jetbrains.kotlin.android' version '1.7.22' apply false
id 'com.android.application' version '7.4.1' apply false
id 'com.android.library' version '7.4.1' apply false
id 'org.jetbrains.kotlin.android' version '1.8.20' apply false
id 'com.google.devtools.ksp' version '1.8.20-1.0.10' apply false
}
ext {
appVersionName = "4.2"
appVersionCode = 27
enableR8 = true
android = [
compileSdk: 33,
minSdk : 21,
targetSdk : 33
]
app = [
versionName : '4.3',
versionCode : 29,
signingConfigs: [
secretConfigsDirPath : "${projectDir.getAbsolutePath()}/.secret",
secretConfigsFileName: "key_store_secret.json"
]
]
}
task clean(type: Delete) {

View File

@@ -1,6 +1,6 @@
#Wed May 25 04:34:58 CST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME