Skip to content

Commit

Permalink
更新js,修复歌单中的qq音乐无法播放问题
Browse files Browse the repository at this point in the history
  • Loading branch information
hcyl committed May 14, 2019
1 parent c87f993 commit 43e7fdc
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 51 deletions.
7 changes: 6 additions & 1 deletion RELEASENOTE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# MusicLake

## v5.0.0
- 增加夜间模式
- 增加本地歌单
- 网易云音乐账号绑定,网易云账号的歌单,每日推荐,歌单广场
- 优化设置,增加api配置,全局搜索配置

## v4.2.0 v4.2.1
- 下架在线音乐服务

Expand All @@ -10,7 +16,6 @@
- 优化音乐榜单
- 更新桌面歌词(两行显示)


## v4.1.8
- 增加发现页横幅,QQ音乐歌手列表
- 增加歌曲音质切换,标准,较高,高清,无损等格式。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,51 +279,4 @@ public void saveLock(boolean lock, boolean toast) {
mFloatLyricView.saveLock(lock, toast);
}


// private String getProcess() throws Exception {
// if (Build.VERSION.SDK_INT >= 21) {
// return getProcessNew();
// } else {
// return getProcessOld();
// }
// }
//
// private String topPackageName = null;
//
// //API 21 and above
// @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
// private String getProcessNew() throws Exception {
// UsageStatsManager mUsageStatsManager = (UsageStatsManager) MusicApp.getAppContext().getSystemService(Context.USAGE_STATS_SERVICE);
// long time = System.currentTimeMillis();
// // We get usage stats for the last 10 seconds
// List<UsageStats> stats = mUsageStatsManager.queryUsageStats(UsageStatsManager.INTERVAL_DAILY, time - 1000 * 5, time);
// // Sort the stats by the last time used
//
// if (stats != null) {
// SortedMap<Long, UsageStats> mySortedMap = new TreeMap<Long, UsageStats>();
// for (UsageStats usageStats : stats) {
// mySortedMap.put(usageStats.getLastTimeUsed(), usageStats);
// }
// if (!mySortedMap.isEmpty()) {
// topPackageName = mySortedMap.get(mySortedMap.lastKey()).getPackageName();
// }
// }
// return topPackageName;
// }
//
// //API below 21
// @SuppressWarnings("deprecation")
// private String getProcessOld() throws Exception {
// String topPackageName = null;
// ActivityManager activity = (ActivityManager) MusicApp.getAppContext().getSystemService(Context.ACTIVITY_SERVICE);
// List<ActivityManager.RunningTaskInfo> runningTask = activity.getRunningTasks(1);
// if (runningTask != null) {
// ActivityManager.RunningTaskInfo taskTop = runningTask.get(0);
// ComponentName componentTop = taskTop.topActivity;
// topPackageName = componentTop.getPackageName();
// }
// return topPackageName;
// }


}
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ public class MusicPlayerService extends Service {

private static MusicPlayerService instance;

//歌词定时器
private Timer lyricTimer;

public static MusicPlayerService getInstance() {
return instance;
}
Expand Down Expand Up @@ -1177,8 +1180,12 @@ public String getAudioId() {
}
}

private Timer lyricTimer;

/**
* 显示桌面歌词
*
* @param show
*/
public void showDesktopLyric(boolean show) {
if (show) {
// 开启定时器,每隔0.5秒刷新一次
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ class FloatLyricView(context: Context) : FrameLayout(context), View.OnClickListe
mSettingsButton.setOnClickListener(this)

mFontSize = SPUtils.getFontSize().toFloat()
mIsLock = SPUtils.getAnyByKey(SPUtils.SP_KEY_FLOAT_LYRIC_LOCK, false)
mLyricText.setFontSizeScale(mFontSize)
mSizeSeekBar.progress = mFontSize.toInt()

Expand Down
2 changes: 1 addition & 1 deletion musicapi/src/main/assets/dist/app.native.js

Large diffs are not rendered by default.

0 comments on commit 43e7fdc

Please sign in to comment.