mirror of
https://github.com/fankes/TSBattery.git
synced 2025-09-07 03:06:06 +08:00
Compare commits
28 Commits
Author | SHA1 | Date | |
---|---|---|---|
a8692e8a33
|
|||
39ec0e8ef7
|
|||
1dc22b90bb
|
|||
da955fc157
|
|||
94752010ec
|
|||
f9bc6fc013
|
|||
dcd95e4d8d
|
|||
7f63f93165
|
|||
e95af0bad9
|
|||
344104903b
|
|||
249cec2bee
|
|||
42387603c6
|
|||
fb3aa96c0a
|
|||
f7c31d9786
|
|||
8d00aca110
|
|||
00a1aaad5b
|
|||
a4602df9cb
|
|||
d5624e0e24
|
|||
60f9af38b2
|
|||
d3bea2ec83
|
|||
d085659fbb
|
|||
f2ec8bf33e
|
|||
3233e772bb
|
|||
e58da11553
|
|||
90d4c04593
|
|||
bcb7f6b2c5
|
|||
596726e8c7
|
|||
0a52914911
|
104
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
104
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal 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
|
6
.secret/key_store_secret.json
Normal file
6
.secret/key_store_secret.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"keyAlias": "public",
|
||||||
|
"keyPassword": "123456",
|
||||||
|
"storeFileName": "universal.p12",
|
||||||
|
"storePassword": "123456"
|
||||||
|
}
|
22
README.md
22
README.md
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
[](https://github.com/fankes/TSBattery)
|
[](https://github.com/fankes/TSBattery)
|
||||||
[](https://github.com/fankes/TSBattery/blob/master/LICENSE)
|
[](https://github.com/fankes/TSBattery/blob/master/LICENSE)
|
||||||
[](https://github.com/fankes/TSBattery/releases)
|
[](https://github.com/fankes/TSBattery/releases)
|
||||||
[](https://github.com/fankes/TSBattery/releases)
|
[](https://github.com/fankes/TSBattery/releases)
|
||||||
[](https://github.com/Xposed-Modules-Repo/com.fankes.tsbattery/releases)
|
[](https://github.com/Xposed-Modules-Repo/com.fankes.tsbattery/releases)
|
||||||
[](https://t.me/XiaofangInternet)
|
[](https://t.me/XiaofangInternet)
|
||||||
@@ -18,17 +18,15 @@ TSBattery 是一个旨在使 QQ、TIM、微信 变得更省电的开源 Xposed
|
|||||||
|
|
||||||
## 适配说明
|
## 适配说明
|
||||||
|
|
||||||
- 支持并建议使用 **LSPosed**(若作用域没有自动出现推荐请勾选 QQ、TIM、微信)
|
- 解锁 BL 并安装 **Magisk** 的设备建议使用 [LSPosed](https://github.com/LSPosed/LSPosed)
|
||||||
|
|
||||||
- 可以使用 **~~EdXposed~~**,但随时停止支持
|
- 可以使用 **~~EdXposed~~**,但随时停止支持
|
||||||
|
|
||||||
- **太极无极 · 阴** 支持性不是很好,建议使用 **太极无极 · 阳** 或 **LSPatch (推荐)**
|
- **太极无极 · 阴** 支持性不是很好,建议使用 [LSPatch](https://github.com/LSPosed/LSPatch)
|
||||||
|
|
||||||
- 支持 **Pine**(梦境模块) 但是部分功能有限制
|
- 支持一些第三方免 Root 框架例如**应用转生**、**SandVXposed**,但是不推荐使用,可能会造成封号风险
|
||||||
|
|
||||||
- 请不要使用 **~~应用转生~~**,发生封号情况后果自负
|
- 如果在微信设置界面右上角你无法找到 **TSBattery** 的图标,请尝试同时激活 [WeXposed (微X模块)](https://github.com/Xposed-Modules-Repo/com.fkzhang.wechatxposed)
|
||||||
|
|
||||||
- 如果微信不能在 **LSPosed** 中生效,请尝试勾选任意包含微信作用域的模块,例如 **微X模块**
|
|
||||||
|
|
||||||
## 请勿用于非法用途
|
## 请勿用于非法用途
|
||||||
|
|
||||||
@@ -38,7 +36,7 @@ TSBattery 是一个旨在使 QQ、TIM、微信 变得更省电的开源 Xposed
|
|||||||
|
|
||||||
- [Automatic Build on Commit](https://github.com/fankes/TSBattery/actions/workflows/commit_ci.yml)
|
- [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)
|
- [Release](https://github.com/fankes/TSBattery/releases)
|
||||||
- [Xposed-Modules-Repo](https://github.com/Xposed-Modules-Repo/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)
|
- [CONTRIBUTING](https://github.com/fankes/TSBattery/blob/master/CONTRIBUTING.md)
|
||||||
|
|
||||||
|
## Star History
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## 许可证
|
## 许可证
|
||||||
|
|
||||||
- [AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.html)
|
- [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
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU Affero General Public License as
|
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)
|
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
4
app/.gitignore
vendored
@@ -1,2 +1,4 @@
|
|||||||
/build
|
/build
|
||||||
/release
|
/release
|
||||||
|
/src/main/assets/xposed_init
|
||||||
|
/src/main/resources/META-INF/yukihookapi_init
|
@@ -1,38 +1,51 @@
|
|||||||
|
import groovy.json.JsonSlurper
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.android.application'
|
id 'com.android.application'
|
||||||
id 'kotlin-android'
|
id 'org.jetbrains.kotlin.android'
|
||||||
id 'com.google.devtools.ksp' version '1.7.22-1.0.8'
|
id 'com.google.devtools.ksp'
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
debug {
|
universal {
|
||||||
storeFile file('../keystore/public')
|
def dirPath = rootProject.ext.app.signingConfigs.secretConfigsDirPath
|
||||||
storePassword '123456'
|
def fileName = rootProject.ext.app.signingConfigs.secretConfigsFileName
|
||||||
keyAlias 'public'
|
def configs = new JsonSlurper().parse(file("${dirPath}/${fileName}"))
|
||||||
keyPassword '123456'
|
keyAlias configs.keyAlias
|
||||||
|
keyPassword configs.keyPassword
|
||||||
|
storeFile file("${dirPath}/${configs.storeFileName}")
|
||||||
|
storePassword configs.storePassword
|
||||||
v1SigningEnabled true
|
v1SigningEnabled true
|
||||||
v2SigningEnabled true
|
v2SigningEnabled true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileSdkVersion 33
|
|
||||||
|
namespace 'com.fankes.tsbattery'
|
||||||
|
compileSdk rootProject.ext.android.compileSdk
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.fankes.tsbattery"
|
applicationId 'com.fankes.tsbattery'
|
||||||
minSdk 22
|
|
||||||
targetSdk 33
|
|
||||||
versionCode rootProject.ext.appVersionCode
|
|
||||||
versionName rootProject.ext.appVersionName
|
|
||||||
|
|
||||||
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 {
|
buildTypes {
|
||||||
|
debug {
|
||||||
|
minifyEnabled false
|
||||||
|
signingConfig signingConfigs.universal
|
||||||
|
}
|
||||||
release {
|
release {
|
||||||
minifyEnabled rootProject.ext.enableR8
|
minifyEnabled true
|
||||||
shrinkResources rootProject.ext.enableR8
|
shrinkResources true
|
||||||
zipAlignEnabled rootProject.ext.enableR8
|
zipAlignEnabled true
|
||||||
signingConfig signingConfigs.debug
|
signingConfig signingConfigs.universal
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -54,18 +67,18 @@ android {
|
|||||||
lintOptions {
|
lintOptions {
|
||||||
checkReleaseBuilds false
|
checkReleaseBuilds false
|
||||||
}
|
}
|
||||||
aaptOptions.additionalParameters '--allow-reserved-package-id', '--package-id', '0x64'
|
aaptOptions.additionalParameters '--allow-reserved-package-id', '--package-id', '0x37'
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly 'de.robv.android.xposed:api:82'
|
compileOnly 'de.robv.android.xposed:api:82'
|
||||||
implementation 'com.highcapable.yukihookapi:api:1.1.5'
|
implementation 'com.highcapable.yukihookapi:api:1.1.9'
|
||||||
ksp 'com.highcapable.yukihookapi:ksp-xposed:1.1.5'
|
ksp 'com.highcapable.yukihookapi:ksp-xposed:1.1.9'
|
||||||
implementation 'com.github.duanhong169:drawabletoolbox:1.0.7'
|
implementation 'com.github.duanhong169:drawabletoolbox:1.0.7'
|
||||||
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.7'
|
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.7'
|
||||||
implementation 'androidx.core:core-ktx:1.9.0'
|
implementation 'androidx.core:core-ktx:1.10.0'
|
||||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||||
implementation 'com.google.android.material:material:1.7.0'
|
implementation 'com.google.android.material:material:1.8.0'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||||
testImplementation 'junit:junit:4.13.2'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
com.fankes.tsbattery.hook.HookEntry_YukiHookXposedInit
|
|
@@ -1 +0,0 @@
|
|||||||
com.fankes.tsbattery.hook.HookEntry
|
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
|
* 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
|
* https://github.com/fankes/TSBattery
|
||||||
*
|
*
|
||||||
* This software is non-free but opensource software: you can redistribute it
|
* This software is non-free but opensource software: you can redistribute it
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
|
* 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
|
* https://github.com/fankes/TSBattery
|
||||||
*
|
*
|
||||||
* This software is non-free but opensource software: you can redistribute it
|
* This software is non-free but opensource software: you can redistribute it
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
|
* 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
|
* https://github.com/fankes/TSBattery
|
||||||
*
|
*
|
||||||
* This software is non-free but opensource software: you can redistribute it
|
* 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.
|
* This file is Created by fankes on 2022/9/28.
|
||||||
*/
|
*/
|
||||||
|
@file:Suppress("StaticFieldLeak")
|
||||||
|
|
||||||
package com.fankes.tsbattery.data
|
package com.fankes.tsbattery.data
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.SharedPreferences
|
|
||||||
import android.widget.CompoundButton
|
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"
|
const val DISABLE_ALL_HOOK = "disable_all_hook"
|
||||||
|
|
||||||
/** 当前的 [SharedPreferences] */
|
/** 当前的 [YukiHookPrefsBridge] */
|
||||||
private var sharePrefs: SharedPreferences? = null
|
private var prefs: YukiHookPrefsBridge? = null
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 读取 [SharedPreferences]
|
* 读取 [YukiHookPrefsBridge]
|
||||||
* @param key 键值名称
|
* @param key 键值名称
|
||||||
* @param value 键值内容
|
* @param value 键值内容
|
||||||
* @return [Boolean]
|
* @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 key 键值名称
|
||||||
* @param value 键值内容
|
* @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 实例
|
* @param context 实例
|
||||||
*/
|
*/
|
||||||
fun init(context: Context) {
|
fun init(context: Context) {
|
||||||
sharePrefs = context.getSharedPreferences("tsbattery_config", Context.MODE_PRIVATE)
|
prefs = context.prefs(name = "tsbattery_config").native()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
|
* 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
|
* https://github.com/fankes/TSBattery
|
||||||
*
|
*
|
||||||
* This software is non-free but opensource software: you can redistribute it
|
* This software is non-free but opensource software: you can redistribute it
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
|
* 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
|
* https://github.com/fankes/TSBattery
|
||||||
*
|
*
|
||||||
* This software is non-free but opensource software: you can redistribute it
|
* This software is non-free but opensource software: you can redistribute it
|
||||||
@@ -237,10 +237,14 @@ object QQTIMHooker : YukiBaseHooker() {
|
|||||||
hookBaseChatPie(methodName = "z3")
|
hookBaseChatPie(methodName = "z3")
|
||||||
hookBaseChatPie(methodName = "H")
|
hookBaseChatPie(methodName = "H")
|
||||||
}
|
}
|
||||||
"8.9.28" -> {
|
"8.9.28", "8.9.30", "8.9.33" -> {
|
||||||
hookBaseChatPie(methodName = "A3")
|
hookBaseChatPie(methodName = "A3")
|
||||||
hookBaseChatPie(methodName = "H")
|
hookBaseChatPie(methodName = "H")
|
||||||
}
|
}
|
||||||
|
"8.9.35", "8.9.38", "8.9.50" -> {
|
||||||
|
hookBaseChatPie(methodName = "B3")
|
||||||
|
hookBaseChatPie(methodName = "H")
|
||||||
|
}
|
||||||
else -> {
|
else -> {
|
||||||
HookEntry.isHookClientSupport = false
|
HookEntry.isHookClientSupport = false
|
||||||
loggerW(msg = "$hostVersionName not supported!")
|
loggerW(msg = "$hostVersionName not supported!")
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
|
* 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
|
* https://github.com/fankes/TSBattery
|
||||||
*
|
*
|
||||||
* This software is non-free but opensource software: you can redistribute it
|
* This software is non-free but opensource software: you can redistribute it
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
|
* 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
|
* https://github.com/fankes/TSBattery
|
||||||
*
|
*
|
||||||
* This software is non-free but opensource software: you can redistribute it
|
* This software is non-free but opensource software: you can redistribute it
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
|
* 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
|
* https://github.com/fankes/TSBattery
|
||||||
*
|
*
|
||||||
* This software is non-free but opensource software: you can redistribute it
|
* This software is non-free but opensource software: you can redistribute it
|
||||||
@@ -54,7 +54,8 @@ 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.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.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.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"
|
||||||
)
|
)
|
||||||
private val qqSupportVersion by lazy {
|
private val qqSupportVersion by lazy {
|
||||||
if (qqSupportVersions.isNotEmpty()) {
|
if (qqSupportVersions.isNotEmpty()) {
|
||||||
@@ -128,12 +129,6 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||||||
/** 振动提醒 */
|
/** 振动提醒 */
|
||||||
it.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP)
|
it.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP)
|
||||||
}
|
}
|
||||||
/** 设置桌面图标显示隐藏 */
|
|
||||||
binding.hideIconInLauncherSwitch.isChecked = isLauncherIconShowing.not()
|
|
||||||
binding.hideIconInLauncherSwitch.setOnCheckedChangeListener { btn, b ->
|
|
||||||
if (btn.isPressed.not()) return@setOnCheckedChangeListener
|
|
||||||
hideOrShowLauncherIcon(b)
|
|
||||||
}
|
|
||||||
/** 快捷操作 QQ */
|
/** 快捷操作 QQ */
|
||||||
binding.quickQqButton.setOnClickListener { startModuleSettings(PackageName.QQ) }
|
binding.quickQqButton.setOnClickListener { startModuleSettings(PackageName.QQ) }
|
||||||
/** 快捷操作 TIM */
|
/** 快捷操作 TIM */
|
||||||
@@ -146,6 +141,12 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||||||
binding.linkWithFollowMe.setOnClickListener {
|
binding.linkWithFollowMe.setOnClickListener {
|
||||||
openBrowser(url = "https://www.coolapk.com/u/876977", packageName = "com.coolapk.market")
|
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)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
|
* 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
|
* https://github.com/fankes/TSBattery
|
||||||
*
|
*
|
||||||
* This software is non-free but opensource software: you can redistribute it
|
* This software is non-free but opensource software: you can redistribute it
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
|
* 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
|
* https://github.com/fankes/TSBattery
|
||||||
*
|
*
|
||||||
* This software is non-free but opensource software: you can redistribute it
|
* 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.inactiveModeIcon.isGone = HookEntry.isHookClientSupport
|
||||||
binding.unsupportItem.isGone = HookEntry.isHookClientSupport
|
binding.unsupportItem.isGone = HookEntry.isHookClientSupport
|
||||||
binding.executorInfoText.text = "${YukiHookAPI.Status.Executor.name} API ${YukiHookAPI.Status.Executor.apiLevel}"
|
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() {
|
fun refreshCurrentModeText() {
|
||||||
binding.currentModeText.text = when {
|
binding.currentModeText.text = when {
|
||||||
@@ -96,24 +112,15 @@ class ConfigActivity : BaseActivity<ActivityConfigBinding>() {
|
|||||||
refreshConfigItems()
|
refreshConfigItems()
|
||||||
binding.infoTipText.replaceToAppName()
|
binding.infoTipText.replaceToAppName()
|
||||||
binding.qqTimProtectTipText.replaceToAppName()
|
binding.qqTimProtectTipText.replaceToAppName()
|
||||||
binding.disableAllHookSwitch.bind(ConfigData.DISABLE_ALL_HOOK) { refreshConfigItems(); refreshCurrentModeText(); showRestartDialog() }
|
binding.disableAllHookSwitch.bind(ConfigData.DISABLE_ALL_HOOK) { refreshConfigItems(); refreshCurrentModeText(); showNeedRestartTip() }
|
||||||
binding.qqTimProtectModeSwitch.bind(ConfigData.ENABLE_QQ_TIM_PROTECT_MODE) { refreshCurrentModeText(); showRestartDialog() }
|
binding.qqTimProtectModeSwitch.bind(ConfigData.ENABLE_QQ_TIM_PROTECT_MODE) { refreshCurrentModeText(); showNeedRestartTip() }
|
||||||
binding.qqTimCoreServiceSwitch.bind(ConfigData.ENABLE_KILL_QQ_TIM_CORESERVICE) { showRestartDialog() }
|
binding.qqTimCoreServiceSwitch.bind(ConfigData.ENABLE_KILL_QQ_TIM_CORESERVICE) { showNeedRestartTip() }
|
||||||
binding.qqTimCoreServiceChildSwitch.bind(ConfigData.ENABLE_KILLE_QQ_TIM_CORESERVICE_CHILD) { showRestartDialog() }
|
binding.qqTimCoreServiceChildSwitch.bind(ConfigData.ENABLE_KILLE_QQ_TIM_CORESERVICE_CHILD) { showNeedRestartTip() }
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 显示重新启动对话框 */
|
/** 显示需要重新启动提示 */
|
||||||
private fun showRestartDialog() {
|
private fun showNeedRestartTip() {
|
||||||
showDialog {
|
binding.needRestartTipText.isVisible = true
|
||||||
title = "需要重新启动"
|
|
||||||
msg = "你必须重新启动${appName}才能使当前更改生效,现在重新启动吗?"
|
|
||||||
confirmButton {
|
|
||||||
cancel()
|
|
||||||
finish()
|
|
||||||
exitProcess(status = 0)
|
|
||||||
}
|
|
||||||
cancelButton(text = "稍后再说")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 替换占位符到当前 APP 名称 */
|
/** 替换占位符到当前 APP 名称 */
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
|
* 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
|
* https://github.com/fankes/TSBattery
|
||||||
*
|
*
|
||||||
* This software is non-free but opensource software: you can redistribute it
|
* This software is non-free but opensource software: you can redistribute it
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
@file:Suppress("SameParameterValue")
|
@file:Suppress("SameParameterValue")
|
||||||
|
|
||||||
package com.fankes.tsbattery.ui.view
|
package com.fankes.tsbattery.ui.widget
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.res.ColorStateList
|
import android.content.res.ColorStateList
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
|
* 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
|
* https://github.com/fankes/TSBattery
|
||||||
*
|
*
|
||||||
* This software is non-free but opensource software: you can redistribute it
|
* 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.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.LinearLayout
|
import android.widget.LinearLayout
|
||||||
import android.widget.ProgressBar
|
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import com.fankes.tsbattery.R
|
import com.fankes.tsbattery.R
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
|
import com.google.android.material.progressindicator.CircularProgressIndicator
|
||||||
import com.highcapable.yukihookapi.annotation.CauseProblemsApi
|
import com.highcapable.yukihookapi.annotation.CauseProblemsApi
|
||||||
import com.highcapable.yukihookapi.hook.factory.applyModuleTheme
|
import com.highcapable.yukihookapi.hook.factory.applyModuleTheme
|
||||||
|
|
||||||
@@ -89,7 +89,10 @@ class DialogBuilder(val context: Context) {
|
|||||||
customLayoutView = LinearLayout(context).apply {
|
customLayoutView = LinearLayout(context).apply {
|
||||||
orientation = LinearLayout.HORIZONTAL
|
orientation = LinearLayout.HORIZONTAL
|
||||||
gravity = Gravity.CENTER or Gravity.START
|
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(View(context).apply { layoutParams = ViewGroup.LayoutParams(20.dp(context), 5) })
|
||||||
addView(TextView(context).apply {
|
addView(TextView(context).apply {
|
||||||
tag = "progressContent"
|
tag = "progressContent"
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
|
* 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
|
* https://github.com/fankes/TSBattery
|
||||||
*
|
*
|
||||||
* This software is non-free but opensource software: you can redistribute it
|
* This software is non-free but opensource software: you can redistribute it
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
|
* 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
|
* https://github.com/fankes/TSBattery
|
||||||
*
|
*
|
||||||
* This software is non-free but opensource software: you can redistribute it
|
* This software is non-free but opensource software: you can redistribute it
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
|
* 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
|
* https://github.com/fankes/TSBattery
|
||||||
*
|
*
|
||||||
* This software is non-free but opensource software: you can redistribute it
|
* This software is non-free but opensource software: you can redistribute it
|
||||||
@@ -36,7 +36,7 @@ import java.io.Serializable
|
|||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取 Github Release 最新版本工具类
|
* 获取 GitHub Release 最新版本工具类
|
||||||
*/
|
*/
|
||||||
object GithubReleaseTool {
|
object GithubReleaseTool {
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ object GithubReleaseTool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Github Release bean
|
* GitHub Release bean
|
||||||
* @param name 版本名称
|
* @param name 版本名称
|
||||||
* @param htmlUrl 网页地址
|
* @param htmlUrl 网页地址
|
||||||
* @param content 更新日志
|
* @param content 更新日志
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* TSBattery - A new way to save your battery avoid cancer apps hacker it.
|
* 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
|
* https://github.com/fankes/TSBattery
|
||||||
*
|
*
|
||||||
* This software is non-free but opensource software: you can redistribute it
|
* 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.openBrowser
|
||||||
import com.fankes.tsbattery.utils.factory.showDialog
|
import com.fankes.tsbattery.utils.factory.showDialog
|
||||||
import com.highcapable.yukihookapi.YukiHookAPI
|
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
|
import com.highcapable.yukihookapi.hook.xposed.prefs.data.PrefsData
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,8 +42,8 @@ object YukiPromoteTool {
|
|||||||
* @param context 实例
|
* @param context 实例
|
||||||
*/
|
*/
|
||||||
fun promote(context: Context) {
|
fun promote(context: Context) {
|
||||||
fun saveReaded() = context.modulePrefs.put(YUKI_PROMOTE_READED, value = true)
|
fun saveReaded() = context.prefs().edit { put(YUKI_PROMOTE_READED, value = true) }
|
||||||
if (context.modulePrefs.get(YUKI_PROMOTE_READED).not())
|
if (context.prefs().get(YUKI_PROMOTE_READED).not())
|
||||||
context.showDialog {
|
context.showDialog {
|
||||||
title = "面向开发者的推广"
|
title = "面向开发者的推广"
|
||||||
msg = "你想快速拥有一个自己的 Xposed 模块吗,你只需要拥有基础的 Android 开发经验以及使用 Kotlin 编程语言即可。\n\n" +
|
msg = "你想快速拥有一个自己的 Xposed 模块吗,你只需要拥有基础的 Android 开发经验以及使用 Kotlin 编程语言即可。\n\n" +
|
||||||
|
@@ -83,6 +83,21 @@
|
|||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
android:visibility="gone" />
|
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
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -286,7 +301,7 @@
|
|||||||
android:paddingRight="15dp"
|
android:paddingRight="15dp"
|
||||||
android:paddingBottom="15dp">
|
android:paddingBottom="15dp">
|
||||||
|
|
||||||
<com.fankes.tsbattery.ui.view.MaterialSwitch
|
<com.fankes.tsbattery.ui.widget.MaterialSwitch
|
||||||
android:id="@+id/disable_all_hook_switch"
|
android:id="@+id/disable_all_hook_switch"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="35dp"
|
android:layout_height="35dp"
|
||||||
@@ -326,7 +341,7 @@
|
|||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
android:paddingRight="15dp">
|
android:paddingRight="15dp">
|
||||||
|
|
||||||
<com.fankes.tsbattery.ui.view.MaterialSwitch
|
<com.fankes.tsbattery.ui.widget.MaterialSwitch
|
||||||
android:id="@+id/qq_tim_protect_mode_switch"
|
android:id="@+id/qq_tim_protect_mode_switch"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="35dp"
|
android:layout_height="35dp"
|
||||||
@@ -360,7 +375,7 @@
|
|||||||
android:paddingRight="15dp"
|
android:paddingRight="15dp"
|
||||||
android:paddingBottom="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:id="@+id/qq_tim_core_service_switch"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="35dp"
|
android:layout_height="35dp"
|
||||||
@@ -379,7 +394,7 @@
|
|||||||
android:textColor="@color/colorTextDark"
|
android:textColor="@color/colorTextDark"
|
||||||
android:textSize="12sp" />
|
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:id="@+id/qq_tim_core_service_child_switch"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="35dp"
|
android:layout_height="35dp"
|
||||||
|
@@ -400,7 +400,7 @@
|
|||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.fankes.tsbattery.ui.view.MaterialSwitch
|
<com.fankes.tsbattery.ui.widget.MaterialSwitch
|
||||||
android:id="@+id/hide_icon_in_launcher_switch"
|
android:id="@+id/hide_icon_in_launcher_switch"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@@ -4,11 +4,11 @@
|
|||||||
<!-- Primary brand color. -->
|
<!-- Primary brand color. -->
|
||||||
<item name="colorPrimary">@color/colorPrimaryAccent</item>
|
<item name="colorPrimary">@color/colorPrimaryAccent</item>
|
||||||
<item name="colorPrimaryVariant">@color/colorPrimaryAccent</item>
|
<item name="colorPrimaryVariant">@color/colorPrimaryAccent</item>
|
||||||
<item name="colorOnPrimary">@color/black</item>
|
<item name="colorOnPrimary">@color/white</item>
|
||||||
<!-- Secondary brand color. -->
|
<!-- Secondary brand color. -->
|
||||||
<item name="colorSecondary">@color/colorPrimaryAccent</item>
|
<item name="colorSecondary">@color/colorPrimaryAccent</item>
|
||||||
<item name="colorSecondaryVariant">@color/colorPrimaryAccent</item>
|
<item name="colorSecondaryVariant">@color/colorPrimaryAccent</item>
|
||||||
<item name="colorOnSecondary">@color/colorPrimaryAccent</item>
|
<item name="colorOnSecondary">@color/white</item>
|
||||||
<!-- Status bar color. -->
|
<!-- Status bar color. -->
|
||||||
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
|
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
|
@@ -4,11 +4,11 @@
|
|||||||
<!-- Primary brand color. -->
|
<!-- Primary brand color. -->
|
||||||
<item name="colorPrimary">@color/colorPrimaryAccent</item>
|
<item name="colorPrimary">@color/colorPrimaryAccent</item>
|
||||||
<item name="colorPrimaryVariant">@color/colorPrimaryAccent</item>
|
<item name="colorPrimaryVariant">@color/colorPrimaryAccent</item>
|
||||||
<item name="colorOnPrimary">@color/colorPrimaryAccent</item>
|
<item name="colorOnPrimary">@color/white</item>
|
||||||
<!-- Secondary brand color. -->
|
<!-- Secondary brand color. -->
|
||||||
<item name="colorSecondary">@color/colorPrimaryAccent</item>
|
<item name="colorSecondary">@color/colorPrimaryAccent</item>
|
||||||
<item name="colorSecondaryVariant">@color/colorPrimaryAccent</item>
|
<item name="colorSecondaryVariant">@color/colorPrimaryAccent</item>
|
||||||
<item name="colorOnSecondary">@color/colorPrimaryAccent</item>
|
<item name="colorOnSecondary">@color/white</item>
|
||||||
<!-- Status bar color. -->
|
<!-- Status bar color. -->
|
||||||
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
|
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
|
23
build.gradle
23
build.gradle
@@ -1,13 +1,24 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'com.android.application' version '7.3.1' apply false
|
id 'com.android.application' version '7.4.1' apply false
|
||||||
id 'com.android.library' version '7.3.1' apply false
|
id 'com.android.library' version '7.4.1' apply false
|
||||||
id 'org.jetbrains.kotlin.android' version '1.7.22' 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 {
|
ext {
|
||||||
appVersionName = "4.2"
|
android = [
|
||||||
appVersionCode = 27
|
compileSdk: 33,
|
||||||
enableR8 = true
|
minSdk : 21,
|
||||||
|
targetSdk : 33
|
||||||
|
]
|
||||||
|
app = [
|
||||||
|
versionName : '4.25',
|
||||||
|
versionCode : 28,
|
||||||
|
signingConfigs: [
|
||||||
|
secretConfigsDirPath : "${projectDir.getAbsolutePath()}/.secret",
|
||||||
|
secretConfigsFileName: "key_store_secret.json"
|
||||||
|
]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
task clean(type: Delete) {
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
#Wed May 25 04:34:58 CST 2022
|
#Wed May 25 04:34:58 CST 2022
|
||||||
distributionBase=GRADLE_USER_HOME
|
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
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
Reference in New Issue
Block a user