Compare commits

4 Commits

Author SHA1 Message Date
LittleTurtle2333
5f5bc6572c 更新版本号至1.7.3 2023-02-17 20:49:38 +08:00
乌堆小透明
b3859653ef 合并拉取请求 #224
* New translations strings.xml (Japanese)

* New translations strings.xml (Polish)

* New translations strings.xml (Portuguese)

* New translations strings.xml (Vietnamese)

* New translations strings.xml (Portuguese, Brazilian)

* New translations strings.xml (Russian)

* New translations strings.xml (Russian)

* New translations strings.xml (Chinese Traditional)

* New translations strings.xml (Japanese)
2023-02-17 20:22:30 +08:00
LittleTurtle2333
7dcfdcced7 修复去除游戏自动连招黑名单 2023-02-17 20:19:39 +08:00
LittleTurtle2333
f2a4f06301 修复连接WiFi时非上网卡显示大移动类型 2023-02-17 17:31:49 +08:00
9 changed files with 67 additions and 31 deletions

View File

@@ -11,8 +11,8 @@ android {
applicationId = "com.lt2333.simplicitytools"
minSdk = 31
targetSdk = 33
versionCode = 72
versionName = "1.7.2"
versionCode = 73
versionName = "1.7.3"
buildConfigField("String", "BUILD_TIME", "\"${System.currentTimeMillis()}\"")
}

View File

@@ -1,27 +1,29 @@
package com.lt2333.simplicitytools.hooks.rules.all.securitycenter
import com.github.kyuubiran.ezxhelper.utils.*
import com.lt2333.simplicitytools.utils.XSPUtils
import com.lt2333.simplicitytools.utils.xposed.base.HookRegister
import de.robv.android.xposed.XC_MethodHook
import de.robv.android.xposed.XposedBridge
import de.robv.android.xposed.XposedHelpers
object RemoveMacroBlacklistForAll : HookRegister() {
override fun init() {
// TODO: 新版已失效
if (XSPUtils.getBoolean("remove_macro_blacklist", false)) {
var letter = 'a'
for (i in 0..25) {
val classIfExists = XposedHelpers.findClassIfExists(
"com.miui.gamebooster.v.$letter" + "0", getDefaultClassLoader()
"com.miui.gamebooster.utils.$letter" + "0", getDefaultClassLoader()
) ?: continue
if (classIfExists.declaredMethods.size in 6..12 && classIfExists.fields.isEmpty() && classIfExists.declaredFields.size >= 2) {
XposedHelpers.findAndHookMethod(classIfExists, "c", String::class.java,
object : XC_MethodHook() {
override fun beforeHookedMethod(param: MethodHookParam?) {
param?.result = false
if (classIfExists.declaredMethods.size in 10..15 && classIfExists.fields.isEmpty() && classIfExists.declaredFields.size >= 2) {
XposedBridge.log("Woobox: RemoveMacroBlacklist in ${classIfExists.name}")
findMethod(classIfExists){
name=="c" && returnType==Boolean::class.java && isStatic &&parameterCount==1
}.hookBefore {
XposedBridge.log("Woobox: c")
it.result = false
}
})
return
}
letter++

View File

@@ -16,12 +16,10 @@ object StatusBarBigMobileTypeIconForT : HookRegister() {
private val getLocation = XSPUtils.getInt("big_mobile_type_location", 1)
private val upAndDownPosition = XSPUtils.getInt("big_mobile_type_icon_up_and_down_position", 0)
private val leftAndRightMargin =
XSPUtils.getInt("big_mobile_type_icon_left_and_right_margins", 0)
private val leftAndRightMargin = XSPUtils.getInt("big_mobile_type_icon_left_and_right_margins", 0)
private val isBold = XSPUtils.getBoolean("big_mobile_type_icon_bold", true)
private val size = XSPUtils.getFloat("big_mobile_type_icon_size", 12.5f)
private val isOnlyShowNetwork =
XSPUtils.getBoolean("big_mobile_type_only_show_network_card", false)
private val isOnlyShowNetwork = XSPUtils.getBoolean("big_mobile_type_only_show_network_card", false)
override fun init() = hasEnable("big_mobile_type_icon") {
//使网络类型单独显示
@@ -41,16 +39,13 @@ object StatusBarBigMobileTypeIconForT : HookRegister() {
val res: Resources = context.resources
//获取组件
val mobileContainerLeftId: Int =
res.getIdentifier("mobile_container_left", "id", "com.android.systemui")
val mobileContainerLeft =
statusBarMobileView.findViewById<ViewGroup>(mobileContainerLeftId)
val mobileContainerLeftId: Int = res.getIdentifier("mobile_container_left", "id", "com.android.systemui")
val mobileContainerLeft = statusBarMobileView.findViewById<ViewGroup>(mobileContainerLeftId)
val mobileGroupId: Int = res.getIdentifier("mobile_group", "id", "com.android.systemui")
val mobileGroup = statusBarMobileView.findViewById<ViewGroup>(mobileGroupId)
val mobileTypeSingleId: Int =
res.getIdentifier("mobile_type_single", "id", "com.android.systemui")
val mobileTypeSingleId: Int = res.getIdentifier("mobile_type_single", "id", "com.android.systemui")
val mobileTypeSingle = statusBarMobileView.findViewById<TextView>(mobileTypeSingleId)
//更改顺序
@@ -70,12 +65,10 @@ object StatusBarBigMobileTypeIconForT : HookRegister() {
leftAndRightMargin, upAndDownPosition, leftAndRightMargin, 0
)
//显示非上网卡的大图标
if (!isOnlyShowNetwork) {
if (!mobileIconState.getObjectAs<Boolean>("dataConnected")) {
if (!mobileIconState.getObjectAs<Boolean>("dataConnected") && !mobileIconState.getObjectAs<Boolean>("wifiAvailable")) {
mobileTypeSingle.visibility = View.VISIBLE
}
}
}
//显示非上网卡的大图标
if (!isOnlyShowNetwork) {
findMethod("com.android.systemui.statusbar.StatusBarMobileView") {
@@ -86,12 +79,10 @@ object StatusBarBigMobileTypeIconForT : HookRegister() {
val context: Context = statusBarMobileView.context
val res: Resources = context.resources
val mobileTypeSingleId: Int =
res.getIdentifier("mobile_type_single", "id", "com.android.systemui")
val mobileTypeSingle =
statusBarMobileView.findViewById<TextView>(mobileTypeSingleId)
val mobileTypeSingleId: Int = res.getIdentifier("mobile_type_single", "id", "com.android.systemui")
val mobileTypeSingle = statusBarMobileView.findViewById<TextView>(mobileTypeSingleId)
if (!mobileIconState.getObjectAs<Boolean>("dataConnected")) {
if (!mobileIconState.getObjectAs<Boolean>("dataConnected") && !mobileIconState.getObjectAs<Boolean>("wifiAvailable")) {
mobileTypeSingle.visibility = View.VISIBLE
}
}

View File

@@ -70,6 +70,7 @@
<string name="status_bar_clock_size">時計のサイズ (0: 変更しない)</string>
<string name="status_bar_clock_double_line_size">デュアル行サイズ (0: 変更しない)</string>
<string name="matters_needing_attention">機能が動作していませんか? </string>
<string name="Done">OK</string>
<string name="about_module_summary">モジュール関連情報を表示</string>
<string name="contributor_list">オープンソースリポジトリの貢献者一覧</string>
<string name="developer">開発者</string>
@@ -236,4 +237,14 @@
<string name="pkg_installer_summary">アプリインストール時のカウントチェックを無効にします</string>
<string name="big_mobile_type_only_show_network_card">ネットワークカードのみを表示する大きなモバイルタイプ</string>
<string name="big_mobile_type_location">大きなモバイルタイプの位置</string>
<string name="miuihome_recentview_remove_card_animation">カードマーキングアニメーションを変更する</string>
<string name="miuihome_recentview_remove_card_animation_summary">アプリ履歴でカードを削除するときのアニメーション効果を変更します</string>
<string name="miuihome_recentwiew_wallpaper_darkening">壁紙の調整を無効にする</string>
<string name="miuihome_recentwiew_wallpaper_darkening_summary">アプリ履歴へ出入りするときに壁紙の明るさが徐々に変化する効果を無効します</string>
<string name="miuihome_scroll_icon_name">アプリ名をスクロール</string>
<string name="miuihome_scroll_icon_name_summary">アプリ名が長すぎるとき、改行させずスクロール表示させます</string>
<string name="miuihome_shortcut_add_small_window">ショートカットメニューの追加ウィンドウ</string>
<string name="miuihome_shortcut_add_small_window_summary">ホーム画面のアイコンを長押しすると、素早く開けるウィンドウを追加できます</string>
<string name="miuihome_shortcut_add_small_window_title">小さいウィンドウ</string>
<string name="click_to_view_use_cases">クリックして使用例を表示</string>
</resources>

View File

@@ -47,6 +47,7 @@
<string name="main_switch">Główny przełącznik modułu</string>
<string name="hide_gps_icon">Ukryj ikonę GPS</string>
<string name="hide_status_bar_network_speed_second">Ukryj jednostki prędkości sieci (/s)</string>
<string name="menu">Menu</string>
<string name="Tips">Porady</string>
<string name="skip_waiting_time">Pomiń 5/10-sekundowe zakładki z ostrzeżeniem</string>
<string name="unlock_unlimited_cropping">Usuń ograniczenie przycinania zdjęć/zrzutów ekranu</string>
@@ -69,6 +70,7 @@
<string name="status_bar_clock_size">Rozmiar zegara (0: brak zmian)</string>
<string name="status_bar_clock_double_line_size">Rozmiar wiersza (0: brak zmian)</string>
<string name="matters_needing_attention">Funkcja nie działa? </string>
<string name="Done">OK</string>
<string name="about_module_summary">Wyświetl informacje dotyczące modułu</string>
<string name="contributor_list">Lista współtwórców repozytorium</string>
<string name="developer">Deweloper</string>

View File

@@ -241,4 +241,14 @@
<string name="pkg_installer_summary">Отключить проверку количества установок</string>
<string name="big_mobile_type_only_show_network_card">Большая иконка типа сети только для активной сим</string>
<string name="big_mobile_type_location">Положение большой иконки типа сети</string>
<string name="miuihome_recentview_remove_card_animation">Изменение анимации обозначения карты</string>
<string name="miuihome_recentview_remove_card_animation_summary">Изменить эффект анимации последней карты удаления задачи</string>
<string name="miuihome_recentwiew_wallpaper_darkening">Отключить затемнение обоев</string>
<string name="miuihome_recentwiew_wallpaper_darkening_summary">Отключит эффект видимости обоев от затемнения при запуске и выходе из недавней задачи</string>
<string name="miuihome_scroll_icon_name">Бегущая строка имени приложений</string>
<string name="miuihome_scroll_icon_name_summary">Длинное имя приложения будет прокручено и отображено в одну строку</string>
<string name="miuihome_shortcut_add_small_window">Меню добавления окна</string>
<string name="miuihome_shortcut_add_small_window_summary">Нажмите и удерживайте иконку рабочего стола, чтобы добавить быстрое открытое окно</string>
<string name="miuihome_shortcut_add_small_window_title">Маленькое окно</string>
<string name="click_to_view_use_cases">Нажмите, чтобы просмотреть варианты использования</string>
</resources>

View File

@@ -237,4 +237,14 @@
<string name="pkg_installer_summary">Tắt kiểm tra số lần cài đặt ứng dụng</string>
<string name="big_mobile_type_only_show_network_card">Mạng dữ liệu lớn chỉ hiển thị thẻ mạng</string>
<string name="big_mobile_type_location">Vị trí mạng dữ liệu lớn</string>
<string name="miuihome_recentview_remove_card_animation">Sửa đổi hoạt ảnh đánh dấu thẻ</string>
<string name="miuihome_recentview_remove_card_animation_summary">Sửa đổi hiệu ứng hoạt ảnh của thẻ loại bỏ nhiệm vụ gần đây</string>
<string name="miuihome_recentwiew_wallpaper_darkening">Tắt làm mờ hình nền</string>
<string name="miuihome_recentwiew_wallpaper_darkening_summary">Điều này sẽ vô hiệu hóa hiệu ứng mà hình nền sẽ sáng lên rồi mờ khi vào và ra khỏi tác vụ gần đây</string>
<string name="miuihome_scroll_icon_name">Cuộn tên ứng dụng</string>
<string name="miuihome_scroll_icon_name_summary">Tên ứng dụng quá dài sẽ bị cuộn và hiển thị mà không có dòng mới nào</string>
<string name="miuihome_shortcut_add_small_window">Menu phím tắt thêm cửa sổ</string>
<string name="miuihome_shortcut_add_small_window_summary">Nhấn và giữ biểu tượng màn hình chính để thêm cửa sổ mở nhanh</string>
<string name="miuihome_shortcut_add_small_window_title">Cửa sổ nhỏ</string>
<string name="click_to_view_use_cases">Nhấp để xem các trường hợp sử dụng</string>
</resources>

View File

@@ -237,4 +237,14 @@
<string name="pkg_installer_summary">禁用頻繁安裝應用檢查</string>
<string name="big_mobile_type_only_show_network_card">大行動網路僅會顯示網路卡</string>
<string name="big_mobile_type_location">大行動網路位置</string>
<string name="miuihome_recentview_remove_card_animation">修改卡片動畫</string>
<string name="miuihome_recentview_remove_card_animation_summary">修改在最近任務介面移除卡片的動畫效果</string>
<string name="miuihome_recentwiew_wallpaper_darkening">停用桌布壓暗</string>
<string name="miuihome_recentwiew_wallpaper_darkening_summary">這將會停用進出最近任務介面時的桌布壓暗效果</string>
<string name="miuihome_scroll_icon_name">捲動顯示應用程式名稱</string>
<string name="miuihome_scroll_icon_name_summary">過長的應用程式名稱將會捲動,而不會在多列顯示</string>
<string name="miuihome_shortcut_add_small_window">捷徑選單新增小窗</string>
<string name="miuihome_shortcut_add_small_window_summary">長按桌面圖示以快速開啟小窗應用程式</string>
<string name="miuihome_shortcut_add_small_window_title">小窗應用程式</string>
<string name="click_to_view_use_cases">按一下以檢視用例</string>
</resources>