Skip to content

Commit

Permalink
opt: 添加新版本网易云歌词强开 && opt: 优化vivo名称获取 && fix: 酷狗概念版3.4.9状态栏无法使用
Browse files Browse the repository at this point in the history
  • Loading branch information
ghhccghk authored Jan 10, 2025
2 parents ab8da74 + 447f247 commit bf0b8d2
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/src/main/kotlin/cn/lyric/getter/config/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ class Config {
var saltUseFlyme: Boolean by serialLazy(false)
var updateTime: Long by serialLazy(0L)
var showTitle: Boolean by serialLazy(false)
var fuckwyy: Boolean by serialLazy(false)
}

2 changes: 1 addition & 1 deletion app/src/main/kotlin/cn/lyric/getter/hook/app/Kugou.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ object Kugou : BaseHook() {
if (getProcessName(app) == "com.kugou.android.lite.support") return@getApplication
when {
verCode <= 10648 -> hookCarLyric()
verCode <= 10999 -> {
verCode <= 10935 -> {
HookTools.MockFlyme().mock()
hookLocalBroadcast("android.support.v4.content.LocalBroadcastManager")
hookFixStatusBarLyric()
Expand Down
11 changes: 11 additions & 0 deletions app/src/main/kotlin/cn/lyric/getter/hook/app/Netease.kt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package cn.lyric.getter.hook.app

import android.annotation.SuppressLint
import android.content.SharedPreferences
import android.os.Build
import cn.lyric.getter.hook.BaseHook
import cn.lyric.getter.tool.ConfigTools.xConfig
import cn.lyric.getter.tool.HookTools
import cn.lyric.getter.tool.HookTools.MockFlyme
import cn.lyric.getter.tool.HookTools.dexKitBridge
Expand All @@ -11,6 +13,7 @@ import cn.lyric.getter.tool.HookTools.fuckTinker
import cn.lyric.getter.tool.HookTools.mediaMetadataCompatLyric
import cn.lyric.getter.tool.MeiZuNotification
import cn.lyric.getter.tool.Tools.getVersionCode
import cn.xiaowine.xkt.LogTool.log
import com.github.kyuubiran.ezxhelper.ClassUtils.loadClass
import com.github.kyuubiran.ezxhelper.ClassUtils.setStaticObject
import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
Expand Down Expand Up @@ -59,6 +62,14 @@ object Netease : BaseHook() {
eventTools.sendLyric(hookParam.result as String)
}
}
if (verCode >= 9002033 ){
loadClass("vh0.a").methodFinder().filterByParamCount(0).filterByName("a").first().createHook {
after { hookParam ->
val a = hookParam.result as SharedPreferences
a.edit().putBoolean("status_bar_lyric_setting_key",xConfig.fuckwyy).commit()
}
}
}
}
} else {
mediaMetadataCompatLyric(it.classLoader)
Expand Down
7 changes: 6 additions & 1 deletion app/src/main/kotlin/cn/lyric/getter/tool/Tools.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ object Tools {

val getPhoneName by lazy {
val marketName = getSystemProperties("ro.product.marketname")
if (marketName.isNotEmpty()) bigtextone(marketName) else bigtextone(Build.BRAND) + " " + Build.MODEL
val vivomarketName = getSystemProperties("ro.vivo.market.name")
if (bigtextone(Build.BRAND) =="Vivo" ){
bigtextone(vivomarketName)
} else{
if (marketName.isNotEmpty()) bigtextone(marketName) else bigtextone(Build.BRAND) + " " + Build.MODEL
}
}

fun bigtextone(st:String): String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ class SettingsFragment : Fragment() {
false
}
}
switch("fuckwyy") {
titleRes = R.string.fuckwyy
defaultValue = config.fuckwyy
onClick {
config.fuckwyy = checked
false
}
}
}
binding.recyclerView.apply {
layoutManager = LinearLayoutManager(activity, RecyclerView.VERTICAL, false)
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,5 @@
<string name="multiple_modes_work">有多个可正常使用的模式</string>
<string name="show_title">强制显示标题</string>
<string name="version_differences">发行版本 Release 不会输出 Log,Debug 版本会输出 Log,非必要不建议安装 Debug 版本</string>
<string name="fuckwyy">网易云状态栏歌词强开</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,5 @@
<string name="multiple_modes_work">There are multiple modes that can be used normally</string>
<string name="show_title">Force show title</string>
<string name="version_differences">The release version won\'t generate logs, and the Debug version will generate logs, so it\'s recommended not to install the Debug version.</string>
<string name="fuckwyy">NetEase Cloud Status Bar Lyrics Forced Open</string>
</resources>

0 comments on commit bf0b8d2

Please sign in to comment.