Skip to content

Commit

Permalink
将 隐藏运营商 移动到 SystemSpecialPage并限制Android14以下才能使用
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaowine committed Dec 31, 2023
1 parent 889e2d8 commit 5835139
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class ExtendPage : BasePage() {
TextSw(textId = R.string.hide_notification_icon, key = "hideNotificationIcon", onClickListener = { changeConfig() })
TextSSw(textId = R.string.limit_visibility_change, tipsId = R.string.limit_visibility_change_tips, key = "limitVisibilityChange")
TextSw(textId = R.string.hide_lyric_when_lock_screen, key = "hideLyricWhenLockScreen", defValue = true)
TextSw(textId = R.string.hide_carrier, key = "hideCarrier")
val lyricColorScheme: LinkedHashMap<Int, String> = LinkedHashMap<Int, String>().apply {
this[0] = getString(R.string.color_scheme1)
this[1] = getString(R.string.color_scheme2)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package statusbar.lyric.activity.page

import android.os.Build
import cn.fkj233.ui.activity.annotation.BMPage
import cn.fkj233.ui.activity.data.BasePage
import statusbar.lyric.R
Expand All @@ -11,6 +12,7 @@ class SystemSpecialPage : BasePage() {
if (isMIUI) {
TextSw(textId = R.string.miui_hide_network_speed, key = "mMIUIHideNetworkSpeed")
TextSw(textId = R.string.miui_pad_optimize, key = "mMiuiPadOptimize")
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.TIRAMISU) TextSw(textId = R.string.hide_carrier, key = "hideCarrier")
}
Line()
TitleText("Wait for More...")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class SystemUILyric : BaseHook() {
}
}
}
if (config.hideCarrier) {
if (config.hideCarrier && Build.VERSION.SDK_INT <= Build.VERSION_CODES.TIRAMISU) {
moduleRes.getString(R.string.hide_carrier).log()
loadClassOrNull("com.android.systemui.statusbar.phone.KeyguardStatusBarView").isNotNull {
it.methodFinder().filterByName("onFinishInflate").first().createHook {
Expand Down

0 comments on commit 5835139

Please sign in to comment.