Skip to content

Commit

Permalink
6.0.2
Browse files Browse the repository at this point in the history
添加 状态栏滑动切歌
添加 点击状态栏隐藏歌词(完美方案)
添加 根据下一句歌词到来时间,动态调节速度速度(目前只支持apple music,算法也不知道有没有问题)
添加 歌词模糊边缘类型
修复 随机动画缺少新动画
添加 MIUI隐藏网速
优化 代码
  • Loading branch information
xiaowine authored Aug 4, 2023
1 parent 931f242 commit d82bdcb
Show file tree
Hide file tree
Showing 38 changed files with 1,182 additions and 876 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/Android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ jobs:

- name: Build with Gradle
run: |
echo 'org.gradle.parallel=true' >> gradle.properties
echo 'org.gradle.jvmargs=-Xmx4g' >> gradle.properties
./gradlew assemble
./gradlew bundleRelease
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/Android_Dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Android CI Dev

on:
push:
branches: [ Dev,new ]
branches: [Dev, new]
paths-ignore:
- 'README.md'
- "README.md"
pull_request:

jobs:
Expand All @@ -31,8 +31,8 @@ jobs:
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'microsoft'
java-version: "17"
distribution: "microsoft"

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
Expand Down Expand Up @@ -77,6 +77,7 @@ jobs:
CHANNEL_ID: ${{ secrets.CHANNEL_DEV_ID }}
BOT_TOKEN: ${{ secrets.BOT_DEV_TOKEN }}
MAPPING: ./app/build/outputs/mapping/release/mapping.txt
COMMIT_URL: ${{ github.event.head_commit.url }}
COMMIT_MESSAGE: |+
Github CI Build
Expand All @@ -86,5 +87,5 @@ jobs:
run: |
export RELEASE=$(find ./app/build/outputs/apk/release -name "*.apk")
export DEBUG=$(find ./app/build/outputs/apk/debug -name "*.apk")
ESCAPED=`python3 -c 'import json,os,urllib.parse; print(urllib.parse.quote(json.dumps(os.environ["COMMIT_MESSAGE"])))'`
ESCAPED=`python3 -c 'import json,os,urllib.parse; msg = json.dumps(os.environ["COMMIT_MESSAGE"]); print(urllib.parse.quote(msg if len(msg) <= 1024 else json.dumps(os.environ["COMMIT_URL"])))'`
curl -v "https://api.telegram.org/bot${BOT_TOKEN}/sendMediaGroup?chat_id=${CHANNEL_ID}&media=%5B%7B%22type%22%3A%22document%22%2C%22media%22%3A%22attach%3A%2F%2Frelease%22%7D%2C%7B%22type%22%3A%22document%22%2C%22media%22%3A%22attach%3A%2F%2Fdebug%22%7D%2C%7B%22type%22%3A%22document%22%2C%22media%22%3A%22attach%3A%2F%2Fmapping%22%2C%22parse_mode%22%3A%22MarkdownV2%22%2C%22caption%22%3A${ESCAPED}%7D%5D" -F release="@$RELEASE" -F debug="@$DEBUG" -F mapping="@$MAPPING"
5 changes: 1 addition & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@

[submodule "xtoast"]
path = xtoast
url = https://github.com/Wine-Network/xToast
[submodule "LyricGetterApi"]
path = LyricGetterApi
url = https://github.com/xiaowine/LyricGetterApi
url = https://github.com/Wine-Network/xToast
1 change: 0 additions & 1 deletion LyricGetterApi
Submodule LyricGetterApi deleted from 3f2a52
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<h1 align="center">墨状态栏歌词</h1>
<h1 align="center">墨-状态栏歌词</h1>

<div align="center">

[![Icon](/icon.png)]()
![Release Download](https://img.shields.io/github/downloads/577fkj/StatusBarLyric/total?style=flat-square)
[![Release Version](https://img.shields.io/github/v/release/577fkj/StatusBarLyric?style=flat-square)](https://github.com/577fkj/StatusBarLyric/releases/latest)
[![GitHub license](https://img.shields.io/github/license/577fkj/StatusBarLyric?style=flat-square)](LICENSE)
Expand Down
13 changes: 7 additions & 6 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ android {
applicationId = "statusbar.lyric"
minSdk = 26
targetSdk = 34
versionCode = 201
versionName = "6.0.1"
versionCode = 202
versionName = "6.0.2"
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
buildConfigField("long", "BUILD_TIME", "$buildTime")
buildConfigField("int", "API_VERSION", "4")
buildConfigField("int", "API_VERSION", "5")
buildConfigField("int", "CONFIG_VERSION", "3")
}
val config = localProperties.getProperty("androidStoreFile")?.let {
Expand All @@ -43,7 +43,7 @@ android {
release {
isMinifyEnabled = true
isShrinkResources = true
setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro", "proguard-log.pro"))
setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"))
}
}
compileOptions {
Expand All @@ -66,10 +66,11 @@ android {
}
buildFeatures {
viewBinding = true
buildConfig = true
}
applicationVariants.all {
outputs.all {
(this as BaseVariantOutputImpl).outputFileName = "StatusBarLyric-$versionName($versionCode)-$name-$buildTime.apk"
(this as BaseVariantOutputImpl).outputFileName = "StatusBarLyric-$versionName-$versionCode-$name-$buildTime.apk"
}
}
}
Expand All @@ -79,6 +80,6 @@ dependencies {
compileOnly("de.robv.android.xposed:api:82")
implementation(project(":blockmiui"))
implementation(project(":xtoast"))
implementation(project(":LyricGetterApi"))
implementation("com.github.kyuubiran:EzXHelper:2.0.6")
implementation("com.github.xiaowine:Lyric-Getter-Api:5.0.2")
}
54 changes: 0 additions & 54 deletions app/proguard-log.pro

This file was deleted.

1 change: 0 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@
-keep class statusbar.lyric.hook.MainHook
-keep class statusbar.lyric.activity.page.*
-keep class cn.lyric.getter.api.data.*{*;}
-repackageclasses "截图看NM日志"
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</queries>
<application
android:icon="@mipmap/ic_launcher"
android:label="@string/AppName"
android:label="@string/app_name"
android:requestLegacyExternalStorage="true"
android:resizeableActivity="true"
android:roundIcon="@mipmap/ic_launcher_round"
Expand Down Expand Up @@ -40,7 +40,7 @@
android:value="true" />
<meta-data
android:name="xposeddescription"
android:value="@string/XposedTips" />
android:value="@string/xposed_tips" />
<meta-data
android:name="xposedminversion"
android:value="93" />
Expand Down
58 changes: 30 additions & 28 deletions app/src/main/java/statusbar/lyric/activity/SettingsActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import statusbar.lyric.activity.page.LyricPage
import statusbar.lyric.activity.page.MainPage
import statusbar.lyric.activity.page.MenuPage
import statusbar.lyric.activity.page.HookPage
import statusbar.lyric.activity.page.SystemSpecialPage
import statusbar.lyric.config.ActivityOwnSP
import statusbar.lyric.config.ActivityOwnSP.updateConfigVer
import statusbar.lyric.data.Data
Expand All @@ -60,13 +61,14 @@ class SettingsActivity : MIUIActivity() {


override fun register() {
registerPage(MainPage::class.java, activity.getString(R.string.AppName))
registerPage(MenuPage::class.java, activity.getString(R.string.Menu))
registerPage(HookPage::class.java, activity.getString(R.string.HookPage))
registerPage(LyricPage::class.java, activity.getString(R.string.LyricPage))
registerPage(IconPage::class.java, activity.getString(R.string.IconPage))
registerPage(ChoosePage::class.java, activity.getString(R.string.ChoosePage))
registerPage(ExtendPage::class.java, activity.getString(R.string.ChoosePage))
registerPage(MainPage::class.java, activity.getString(R.string.app_name))
registerPage(MenuPage::class.java, activity.getString(R.string.menu))
registerPage(HookPage::class.java, activity.getString(R.string.hook_page))
registerPage(LyricPage::class.java, activity.getString(R.string.lyric_page))
registerPage(IconPage::class.java, activity.getString(R.string.icon_page))
registerPage(ChoosePage::class.java, activity.getString(R.string.choose_page))
registerPage(ExtendPage::class.java, activity.getString(R.string.choose_page))
registerPage(SystemSpecialPage::class.java, activity.getString(R.string.system_special_page))
}

override fun onCreate(savedInstanceState: Bundle?) {
Expand Down Expand Up @@ -95,25 +97,25 @@ class SettingsActivity : MIUIActivity() {
super.onDestroy()
}

private fun checkLSPosed(): Boolean {
return try {
setSP(ActivityOwnSP.ownSP)
updateConfigVer()
init()
true
} catch (e: Exception) {
e.printStackTrace()
MIUIDialog(this) {
setTitle(R.string.FirstUseTips)
setMessage(R.string.NotSupportXposedFramework)
setRButton(R.string.ReStartApp) {
ActivityTools.restartApp()
}
setCancelable(false)
}.show()
false
private fun checkLSPosed(): Boolean {
return try {
setSP(ActivityOwnSP.ownSP)
updateConfigVer()
init()
true
} catch (e: Exception) {
e.printStackTrace()
MIUIDialog(this) {
setTitle(R.string.first_use_tips)
setMessage(R.string.not_support_xposed_framework)
setRButton(R.string.re_start_app) {
ActivityTools.restartApp()
}
setCancelable(false)
}.show()
false
}
}
}


private fun init() {
Expand Down Expand Up @@ -156,9 +158,9 @@ class SettingsActivity : MIUIActivity() {
}!!
if (dataList.size == 0) {
MIUIDialog(context) {
setTitle(context.getString(R.string.NotFoundHook))
setMessage(context.getString(R.string.NotFoundHookTips))
setRButton(context.getText(R.string.OK)) {
setTitle(context.getString(R.string.not_found_hook))
setMessage(context.getString(R.string.not_found_hook_tips))
setRButton(context.getText(R.string.ok)) {
dismiss()
}
}.show()
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/java/statusbar/lyric/activity/page/ChoosePage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@ import statusbar.lyric.tools.ActivityTestTools.showView
@BMPage
class ChoosePage : BasePage() {
override fun onCreate() {
TitleText(textId = R.string.ChoosePageTips)
TitleText(textId = R.string.choose_page_tips)
Line()
dataList.forEach { data ->
TextSA(text = "${data.textViewClassName} ${data.textViewID}", tips = "${data.parentClassName} ${data.parentID}", onClickListener = {
activity.showView(data)
MIUIDialog(activity) {
setTitle(activity.getString(R.string.SelectHook))
setRButton(activity.getString(R.string.OK)) {
setTitle(activity.getString(R.string.select_hook))
setRButton(activity.getString(R.string.ok)) {
config.textViewClassName = data.textViewClassName
config.textViewID = data.textViewID
config.parentClassName = data.parentClassName
config.parentID = data.parentID
config.index = data.index
}
setLButton(activity.getString(R.string.Cancel))
setLButton(activity.getString(R.string.cancel))
finally { dismiss() }
}.show()

})
TitleText(activity.getString(R.string.AAATips).format(data.isRepeat, data.index))
TitleText(activity.getString(R.string.a_a_a_tips).format(data.isRepeat, data.index))
Line()
}
}
Expand Down
Loading

0 comments on commit d82bdcb

Please sign in to comment.