Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Commit

Permalink
v2.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Moriafly committed Feb 1, 2021
1 parent 636add7 commit 8424996
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 82 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ android {
applicationId "com.dirror.music"
minSdkVersion 21
targetSdkVersion 30
versionCode 314
versionName "2.6.1"
versionCode 316
versionName "2.6.1-beta"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Expand Down
Binary file renamed app/release/2.6.0.apk → app/release/2.6.1.apk
Binary file not shown.
4 changes: 2 additions & 2 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
{
"type": "SINGLE",
"filters": [],
"versionCode": 310,
"versionName": "2.6.0",
"versionCode": 316,
"versionName": "2.6.1-beta",
"outputFile": "app-release.apk"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ class AboutActivity2 : BaseActivity() {
itemCheckForUpdates.setOnClickListener { UpdateUtil.checkNewVersion(this@AboutActivity2, true) }
// 更新日志
itemUpdateLog.setOnClickListener { MyApplication.activityManager.startWebActivity(this@AboutActivity2, UPDATE_LOG) }
// 源代码
itemSourceCode.setOnClickListener {
MyApplication.activityManager.startWebActivity(this@AboutActivity2, "https://github.com/Moriafly/DsoMusic", getString(R.string.source_code))
}
// 使用开源项目
itemOpenSourceCode.setOnClickListener { startActivity(Intent(this@AboutActivity2, OpenSourceActivity::class.java)) }
// ivLogo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,6 @@ class MainActivity : AppCompatActivity() {
}
}

binding.menuMain.itemSourceCode.setOnClickListener {
MyApplication.activityManager.startWebActivity(this, "https://github.com/Moriafly/DsoMusic", getString(R.string.source_code))
}

binding.menuMain.itemAbout.setOnClickListener {
startActivity(Intent(this, AboutActivity2::class.java))
}
Expand Down
20 changes: 0 additions & 20 deletions app/src/main/java/com/dirror/music/ui/activity/SettingsActivity.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.dirror.music.ui.activity

import android.view.View
import com.dirror.music.MyApplication
import com.dirror.music.databinding.ActivitySettingsBinding
import com.dirror.music.ui.base.BaseActivity
Expand Down Expand Up @@ -31,30 +30,11 @@ class SettingsActivity : BaseActivity() {
switcherSmartFilter.setChecked(MyApplication.mmkv.decodeBool(Config.SMART_FILTER, true))
}

if (!Secure.isDebug()) {
binding.itemTestCookie.visibility = View.GONE
}

}

override fun initListener() {
binding.apply {

// Cookie 导出
itemTestCookie.setOnClickListener {
if (Secure.isDebug()) {
val cookie = MyApplication.userManager.getCloudMusicCookie()
if (cookie != "") {
toast("Cookie 存在,是否过时未知,已经导入剪贴板")
copyToClipboard(this@SettingsActivity, cookie)
} else {
toast("Cookie 不存在")
}
} else {
toast("非开发版")
}
}

switcherParseHomeNavigation.setOnCheckedChangeListener { MyApplication.mmkv.encode(Config.PARSE_NAVIGATION, it) }

switcherPlaylistScrollAnimation.setOnCheckedChangeListener { MyApplication.mmkv.encode(Config.PLAYLIST_SCROLL_ANIMATION, it) }
Expand Down
16 changes: 14 additions & 2 deletions app/src/main/java/com/dirror/music/ui/dialog/SoundEffectDialog.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ package com.dirror.music.ui.dialog

import android.app.Activity
import android.content.Context
import android.content.Intent
import android.media.audiofx.AudioEffect
import com.dirror.music.MyApplication
import com.dirror.music.databinding.DialogSoundEffectBinding
import com.dirror.music.ui.base.BaseBottomSheetDialog
import com.dirror.music.util.IntentUtil
import com.dirror.music.util.toast

class SoundEffectDialog(context: Context, private val activity: Activity): BaseBottomSheetDialog(context) {

Expand All @@ -25,7 +27,17 @@ class SoundEffectDialog(context: Context, private val activity: Activity): BaseB
override fun initListener() {
binding.apply {
itemEqualizer.setOnClickListener {
IntentUtil.openEqualizer(activity)
try {
// 启动一个音频控制面板
// 参考 https://www.cnblogs.com/dongweiq/p/7998445.html
val intent = Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL)
// 传入 AudioSessionId
intent.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, MyApplication.musicBinderInterface?.getAudioSessionId())
// 调用应用程序必须使用 startActivityForResult 方法启动控制面板,以便控制面板应用程序指示其包名称并用于跟踪此特定应用程序的更改
activity.startActivityForResult(intent, 666)
} catch (e: Exception) {
toast("设备不支持均衡!")
}
dismiss()
}
ivIncreasePitch.setOnClickListener {
Expand Down
34 changes: 0 additions & 34 deletions app/src/main/java/com/dirror/music/util/IntentUtil.kt

This file was deleted.

6 changes: 6 additions & 0 deletions app/src/main/res/layout/activity_about2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@
android:layout_height="56dp"
app:text="@string/check_for_updates" />

<com.dirror.music.widget.ItemLayout
android:id="@+id/itemSourceCode"
android:layout_width="match_parent"
android:layout_height="@dimen/defaultHeight"
app:text="@string/source_code"/>

<com.dirror.music.widget.ItemLayout
android:id="@+id/itemUpdateLog"
app:text="@string/update_log"
Expand Down
9 changes: 1 addition & 8 deletions app/src/main/res/layout/activity_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@
</com.dirror.music.widget.ItemLayout>

<TextView
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="32dp"
android:gravity="center_vertical"
Expand All @@ -263,14 +264,6 @@
android:textColor="@color/colorSubTextForeground"
android:textSize="12sp" />

<com.dirror.music.widget.ItemLayout
android:id="@+id/itemTestCookie"
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="@color/colorItemBackground"
app:text="导出 Cookie(仅开发版使用)">

</com.dirror.music.widget.ItemLayout>

</LinearLayout>
</ScrollView>
Expand Down
11 changes: 1 addition & 10 deletions app/src/main/res/layout/menu_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,20 +129,11 @@

</com.dirror.music.widget.ItemLayout>

<com.dirror.music.widget.ItemLayout
android:id="@+id/itemSourceCode"
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_marginTop="112dp"
app:text="@string/source_code">

</com.dirror.music.widget.ItemLayout>

<com.dirror.music.widget.ItemLayout
android:id="@+id/itemAbout"
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_marginTop="168dp"
android:layout_marginTop="112dp"
app:text="@string/about">

</com.dirror.music.widget.ItemLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
tools:srcCompat="@tools:sample/avatars" />

<TextView
android:visibility="gone"
android:id="@+id/tvPlayCount"
android:layout_width="wrap_content"
android:layout_height="18dp"
Expand Down

0 comments on commit 8424996

Please sign in to comment.