From 986a7a83dc24ea53c6ced9ab378b6ade195dc997 Mon Sep 17 00:00:00 2001
From: xiaoleGun <1592501605@qq.com>
Date: Fri, 3 Nov 2023 08:50:00 +0800
Subject: [PATCH] patches: treble_app: Sync with latest sources of Treble App
Signed-off-by: xiaoleGun <1592501605@qq.com>
---
.../0001-res-Support-multiple-languages.patch | 173 +++++++++++++-----
...s-Add-support-for-simplified-Chinese.patch | 30 ++-
.../0003-res-Add-support-for-Japanese-1.patch | 4 +-
3 files changed, 149 insertions(+), 58 deletions(-)
diff --git a/patches/personal/treble_app/0001-res-Support-multiple-languages.patch b/patches/personal/treble_app/0001-res-Support-multiple-languages.patch
index 91f5194..73047ba 100644
--- a/patches/personal/treble_app/0001-res-Support-multiple-languages.patch
+++ b/patches/personal/treble_app/0001-res-Support-multiple-languages.patch
@@ -1,4 +1,4 @@
-From 79fd1f56b4cd68d9acdd6982aeb7c7677e9f8a57 Mon Sep 17 00:00:00 2001
+From 2127c8cd1bedefe0f057f49267e203e7405dfc2f Mon Sep 17 00:00:00 2001
From: xiaoleGun <1592501605@qq.com>
Date: Tue, 8 Feb 2022 16:40:33 +0800
Subject: [PATCH 1/3] res: Support multiple languages
@@ -7,29 +7,29 @@ Migrate all descriptions to strings.xml
Signed-off-by: xiaoleGun <1592501605@qq.com>
---
- app/src/main/res/values/strings.xml | 143 +++++++++++++++++++++++++
- app/src/main/res/xml/pref_custom.xml | 18 ++--
+ app/src/main/res/values/strings.xml | 158 +++++++++++++++++++++++++
+ app/src/main/res/xml/pref_custom.xml | 18 +--
app/src/main/res/xml/pref_doze.xml | 8 +-
- app/src/main/res/xml/pref_headers.xml | 30 +++---
+ app/src/main/res/xml/pref_headers.xml | 30 ++---
app/src/main/res/xml/pref_huawei.xml | 14 +--
app/src/main/res/xml/pref_ims.xml | 8 +-
app/src/main/res/xml/pref_lenovo.xml | 4 +-
- app/src/main/res/xml/pref_misc.xml | 101 +++++++++--------
+ app/src/main/res/xml/pref_misc.xml | 108 ++++++++---------
app/src/main/res/xml/pref_mydevice.xml | 6 +-
- app/src/main/res/xml/pref_nubia.xml | 24 ++---
- app/src/main/res/xml/pref_oneplus.xml | 12 +--
- app/src/main/res/xml/pref_oppo.xml | 12 +--
+ app/src/main/res/xml/pref_nubia.xml | 48 ++++----
+ app/src/main/res/xml/pref_oneplus.xml | 12 +-
+ app/src/main/res/xml/pref_oppo.xml | 12 +-
app/src/main/res/xml/pref_qualcomm.xml | 14 +--
- app/src/main/res/xml/pref_samsung.xml | 44 ++++----
+ app/src/main/res/xml/pref_samsung.xml | 44 +++----
app/src/main/res/xml/pref_vsmart.xml | 4 +-
app/src/main/res/xml/pref_xiaomi.xml | 6 +-
- 16 files changed, 295 insertions(+), 153 deletions(-)
+ 16 files changed, 326 insertions(+), 168 deletions(-)
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
-index d6f6e83..ed4f31a 100644
+index d6f6e83..99e3833 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
-@@ -27,4 +27,147 @@
+@@ -27,4 +27,162 @@
Magisk was detected! If you proceed with the update you may lose Magisk or the installation may fail!
Delete OTA files
Take in consideration that you may lose your userdata if you proceed!\nTo prevent this, cancel this dialog, reboot and flash the latest update on fastboot mode.\nDo you want to proceed anyway?
@@ -51,8 +51,8 @@ index d6f6e83..ed4f31a 100644
+ Audio
+ Camera
+ Display
-+ Enable double tap to wake
-+ Enable DT2W
++ Enable DT2W
++ Enable double tap to wake
+ Enable game mode
+ Enable USB OTG
+ Misc
@@ -96,6 +96,7 @@ index d6f6e83..ed4f31a 100644
+ Force headset switch (Huawei default)
+ Use alternate way to detect headsets
+ Disable audio effects
++ Disable fast audio
+ Set rounded corners diameter
+ Set forced/faked rounded corners diameter
+ FPS Divisor
@@ -109,6 +110,7 @@ index d6f6e83..ed4f31a 100644
+ For Mediatek devices
+ Backlight
+ Set alternative brightness curve
++ Set linear brightness curve
+ Disable backlight of hardware buttons if present
+ Force alternative backlight scale
+ Allows setting brightness to the lowest possible
@@ -125,6 +127,8 @@ index d6f6e83..ed4f31a 100644
+ Disable FUSE storage layer
+ This can (de/in)crease storage speed\nRequires a reboot
+ Automatically restart RIL
++ Force display 5G network
++ Displays 5G as an option for the preferred network type\nRequires a reboot
+ Double tap to wake
+ Unlikely to work for you
+ Under-display fp color
@@ -137,14 +141,25 @@ index d6f6e83..ed4f31a 100644
+ Community telegram group for my device
+ Apply presets
+
++ Enable high touch sample rate
++ Drain more battery.
++ Enable high touch sensitivity
++ While using gloves
++ Auto stop fan is disabled
++ Enable bypass charger
++ Charger -> Battery -> Phone
++ Charger->Phone
+ FAN speed
-+ Make Redmagic logo breath
++ Support smart charging
+ LEDs
++ Make Redmagic logo breath
+ REDMAGIC RGB
+ Boosts
+ Boost CPU
+ Boost caches
+ Boost GPU
++ Boost UFS
++ Increase Read/Write speed
+
+ Display Mode
+ High brightness mode
@@ -422,10 +437,10 @@ index e22cfa5..9ff49cd 100644
diff --git a/app/src/main/res/xml/pref_misc.xml b/app/src/main/res/xml/pref_misc.xml
-index d660f60..ff377bb 100644
+index a819fa6..1a984d0 100644
--- a/app/src/main/res/xml/pref_misc.xml
+++ b/app/src/main/res/xml/pref_misc.xml
-@@ -1,171 +1,170 @@
+@@ -1,184 +1,184 @@
@@ -463,6 +478,11 @@ index d660f60..ff377bb 100644
android:key="key_misc_disable_audio_effects"
- android:title="Disable audio effects" />
+ android:title="@string/misc_disable_audio_effects" />
+
++ android:title="@string/misc_disable_fast_audio" />
-
+
@@ -543,6 +563,11 @@ index d660f60..ff377bb 100644
+ android:title="@string/misc_low_gamma_brightness" />
++ android:title="@string/misc_linear_brightness" />
+
@@ -606,7 +631,14 @@ index d660f60..ff377bb 100644
+ android:summary="@string/misc_allow_binder_thread_on_incoming_calls_summary"
+ android:title="@stting/misc_allow_binder_thread_on_incoming_calls" />
++ android:title="@string/misc_force_display_5g"
++ android:summary="@string/misc_force_display_5g_summary" />
+
+ android:title="@string/misc_restart_ril" />
@@ -646,7 +678,7 @@ index d660f60..ff377bb 100644
diff --git a/app/src/main/res/xml/pref_nubia.xml b/app/src/main/res/xml/pref_nubia.xml
-index 3d765fa..35d8dc5 100644
+index 75502a5..68a655b 100644
--- a/app/src/main/res/xml/pref_nubia.xml
+++ b/app/src/main/res/xml/pref_nubia.xml
-@@ -1,59 +1,59 @@
+@@ -1,92 +1,92 @@
-
+
-
+
-
-+ android:title="@string/general_enable_dt2w" />
-
++ android:title="@string/general_enable_dt2w"
++ app:summary="@string/general_double_tap_to_wake" />
+
-+ android:title="@string/general_game_mode" />
+ android:key="nubia_high_touch_sample_rate"
+- android:title="Enable high touch sample rate"
+- app:summary="Drain more battery." />
++ android:title="@string/nubia_high_touch_sample_rate"
++ app:summary="@string/nubia_high_touch_sample_rate_summary" />
+
++ android:title="@string/nubia_high_touch_sensitivity"
++ app:summary="@string/nubia_high_touch_sensitivity_summary" />
-
+
-
-+ android:title="@string/nubia_fan_speed" />
+
++ android:title="@string/general_game_mode"
++ app:summaryOn="@string/nubia_touchscreen_game_mode_summaryOn" />
+
++ android:title="@string/nubia_bypass_charger"
++ app:summaryOff="@string/nubia_bypass_charger_summaryOff"
++ app:summaryOn="@string/nubia_bypass_charger_summaryOn" />
+
++ android:title="@string/nubia_fan_speed"
++ app:summary="@string/nubia_fan_speed_summary" />
-
+
-
+ android:title="@string/nubia_redmagic_logo_breath" />
-
-+ android:title="@string/nubia_redmagic_led" />
+
++ android:title="@string/nubia_redmagic_led" />
-
+
-
+ android:title="@string/nubia_boost_cpu" />
-
+ android:title="@string/nubia_boost_cache" />
-
+ android:title="@string/nubia_boost_gpu" />
+
++ android:title="@string/nubia_boost_ufs"
++ app:summaryOn="@string/nubia_boost_ufs_summaryOn" />
diff --git a/app/src/main/res/xml/pref_oneplus.xml b/app/src/main/res/xml/pref_oneplus.xml
@@ -1009,5 +1086,5 @@ index 588281f..7280d73 100644
--
-2.37.1 (Apple Git-137.1)
+2.41.0
diff --git a/patches/personal/treble_app/0002-res-Add-support-for-simplified-Chinese.patch b/patches/personal/treble_app/0002-res-Add-support-for-simplified-Chinese.patch
index f7a6b7f..ae272a7 100644
--- a/patches/personal/treble_app/0002-res-Add-support-for-simplified-Chinese.patch
+++ b/patches/personal/treble_app/0002-res-Add-support-for-simplified-Chinese.patch
@@ -1,4 +1,4 @@
-From 49ae30dcdcff3808faf740e3aaad0529209a9712 Mon Sep 17 00:00:00 2001
+From 50c3bac60ed713adc081974f8a60ac805d50901b Mon Sep 17 00:00:00 2001
From: xiaoleGun <1592501605@qq.com>
Date: Wed, 9 Feb 2022 14:16:06 +0800
Subject: [PATCH 2/3] res: Add support for simplified Chinese
@@ -8,11 +8,11 @@ Signed-off-by: xiaoleGun <1592501605@qq.com>
.../main/res/values-zh-rCH/pref_custom.xml | 30 +++
.../main/res/values-zh-rCH/pref_huawei.xml | 13 ++
app/src/main/res/values-zh-rCH/pref_misc.xml | 70 +++++++
- app/src/main/res/values-zh-rCH/pref_nubia.xml | 75 ++++++++
+ app/src/main/res/values-zh-rCH/pref_nubia.xml | 75 +++++++
.../main/res/values-zh-rCH/pref_oneplus.xml | 29 +++
.../main/res/values-zh-rCH/pref_samsung.xml | 17 ++
- app/src/main/res/values-zh-rCH/strings.xml | 172 ++++++++++++++++++
- 7 files changed, 406 insertions(+)
+ app/src/main/res/values-zh-rCH/strings.xml | 186 ++++++++++++++++++
+ 7 files changed, 420 insertions(+)
create mode 100644 app/src/main/res/values-zh-rCH/pref_custom.xml
create mode 100644 app/src/main/res/values-zh-rCH/pref_huawei.xml
create mode 100644 app/src/main/res/values-zh-rCH/pref_misc.xml
@@ -293,10 +293,10 @@ index 0000000..f3b12e2
+
diff --git a/app/src/main/res/values-zh-rCH/strings.xml b/app/src/main/res/values-zh-rCH/strings.xml
new file mode 100644
-index 0000000..f778251
+index 0000000..321804f
--- /dev/null
+++ b/app/src/main/res/values-zh-rCH/strings.xml
-@@ -0,0 +1,172 @@
+@@ -0,0 +1,186 @@
+
+ PhhTrebleApp
+ 设置
@@ -388,6 +388,7 @@ index 0000000..f778251
+ 强制耳机切换 (华为默认)
+ 使用其它方法检测耳机
+ 关闭音效
++ 关闭快速音频
+ 设置圆角大小
+ 设置强制/伪圆角大小
+ 设置FPS
@@ -417,6 +418,8 @@ index 0000000..f778251
+ 关闭FUSE
+ 可能提升或降低读写速度\n需要重启
+ 自动重启RIL
++ 强制显示5G
++ 将5G显示为首选网络类型的选项\n需要重启
+ 双击唤醒
+ 如果不会工作,此选项尝试修复
+ 显示FOD颜色
@@ -429,14 +432,25 @@ index 0000000..f778251
+ 设备Telegram群组
+ 使用设备预设值
+
++ 启用高触控采样率
++ 可能会加快耗电
++ 启用高触控灵敏度
++ 使用手套时
++ 自动停止风扇已禁用
++ 启用绕开电池充电
++ 充电器 -> 电池 -> 手机
++ 充电器->手机
+ 散热器转速
-+ 红魔光污染效果
++ 支持智能充电
+ LEDs
++ 红魔光污染效果
+ 红魔RGB
+ 加速
+ 加速CPU
+ 清理缓存
+ 加速GPU
++ 加速UFS
++ 增加读/写速度
+
+ 显示模式
+ 阳光屏
@@ -470,5 +484,5 @@ index 0000000..f778251
+ 禁用阳光模式
+
--
-2.37.1 (Apple Git-137.1)
+2.41.0
diff --git a/patches/personal/treble_app/0003-res-Add-support-for-Japanese-1.patch b/patches/personal/treble_app/0003-res-Add-support-for-Japanese-1.patch
index 8542269..12b0d59 100644
--- a/patches/personal/treble_app/0003-res-Add-support-for-Japanese-1.patch
+++ b/patches/personal/treble_app/0003-res-Add-support-for-Japanese-1.patch
@@ -1,4 +1,4 @@
-From 0c8e00a24dc1d9f997eacd800ab97a7eca5b7ce1 Mon Sep 17 00:00:00 2001
+From f756bcca79827f81ed350121e3b7bc4bd0b3a57c Mon Sep 17 00:00:00 2001
From: "Re*Index. (ot_inc)" <32851879+reindex-ot@users.noreply.github.com>
Date: Thu, 25 May 2023 21:21:15 +0900
Subject: [PATCH 3/3] res: Add support for Japanese (#1)
@@ -477,5 +477,5 @@ index 0000000..7444c87
+ 太陽光スクリーンを無効化
+
--
-2.37.1 (Apple Git-137.1)
+2.41.0