A面播放优化bug
This commit is contained in:
parent
1b27a928b9
commit
7c739312e9
BIN
.safedk/api/SafeDKAndroid-6.6.2.jar
Normal file
BIN
.safedk/api/SafeDKAndroid-6.6.2.jar
Normal file
Binary file not shown.
28
.safedk/app_sdks.lst
Normal file
28
.safedk/app_sdks.lst
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
a787e8e868e0962815f613634aaa7623
|
||||||
|
106f9be0e66f52f36eaaaff4dd231971
|
||||||
|
75939c4ce23c53ad9534d43be176b3e9
|
||||||
|
217e8f437c9fc4244d6e74653ac8a8c7
|
||||||
|
66b774de6608db14a84e972fba1ec954
|
||||||
|
e1c9ddef73e5621f62c717badf1be3f2
|
||||||
|
daaea35726ab7cd457ab61d4538fb822
|
||||||
|
b9b88d70c3d018bfbda46cd93ba3ddca
|
||||||
|
946dbe0d5ed7fee91c8ece64d035e70b
|
||||||
|
213ac5b6803852323d73a1292440d7be
|
||||||
|
d41ed920405e4bd14f3a42cd93c43d89
|
||||||
|
7eac188d3286b05ccbba774f63a2c049
|
||||||
|
4df96d3bc9afd17b812e65e6c6add1ef
|
||||||
|
9f5a74f6ccfb81b48969231b39bf937f
|
||||||
|
eb3214f29c0a52815b41977d6cc9a46e
|
||||||
|
becf75b2cc99e82716da2e6697879509
|
||||||
|
7eec7b9476b99b3ce94533da4f2eb987
|
||||||
|
974322f19d813702ea048d95288d2b8c
|
||||||
|
95ff573e4cdf46a05f6c5ac703940db3
|
||||||
|
f281c2ca1b0ba69b5805badd314ef646
|
||||||
|
29015bbfcc182d80e7f75bd2c38e4521
|
||||||
|
ff22dbf67af979b8b3169a242d10f166
|
||||||
|
c4d1f1775f251f03dce94fdf267a7b89
|
||||||
|
dd2971b0681141d57b221687791ad1bd
|
||||||
|
86a0d598cde251321e21a0da4ab94065
|
||||||
|
74616804a7dc29147dfb0afe122a9fd2
|
||||||
|
35695de726f6044576c830bf197f36f7
|
||||||
|
|
||||||
BIN
.safedk/dex/SafeDKAndroid-6.6.2.dex
Normal file
BIN
.safedk/dex/SafeDKAndroid-6.6.2.dex
Normal file
Binary file not shown.
BIN
.safedk/dex/android-support-multidex.dex
Normal file
BIN
.safedk/dex/android-support-multidex.dex
Normal file
Binary file not shown.
2
.safedk/hashes.safedk
Normal file
2
.safedk/hashes.safedk
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#Thu Nov 21 18:22:08 CST 2024
|
||||||
|
json=827215329
|
||||||
1
.safedk/list.enc
Normal file
1
.safedk/list.enc
Normal file
File diff suppressed because one or more lines are too long
5
.safedk/plugin.properties
Normal file
5
.safedk/plugin.properties
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#
|
||||||
|
#Thu Nov 21 18:29:25 CST 2024
|
||||||
|
4CFHxOfvQvy95EqDxa_eNPe4pmq_KfoZPJeVscTMt2uT3VL2fO3iyZyBFMTOOTRbKw6WelbaDEhNzxOxVrlQTE=tAh5Z8CtFiG05NfRWh9UuOHCp3h3SaFvlh6Phw5ucaxFMCRs2d97F7lywfBKOEKSipdaGq8vZOaDLZkrL1fDDc
|
||||||
|
sdk_analysis_plugin_version=5.6.2
|
||||||
|
set_multidex=true
|
||||||
36
.safedk/proguard-safedk.pro
Normal file
36
.safedk/proguard-safedk.pro
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
-keep class androidx.multidex.** { *; }
|
||||||
|
-keep class androidx.browser.customtabs.CustomTabsIntent { *; }
|
||||||
|
-keep class androidx.** {
|
||||||
|
*** startActivityForResult(***);
|
||||||
|
*** startActivity(***);
|
||||||
|
}
|
||||||
|
-keep class android.support.multidex.** { *; }
|
||||||
|
-keep class android.support.v4.app.** { *; }
|
||||||
|
-keep class com.google.android.gms.location.FusedLocationProviderApi { *; }
|
||||||
|
-keep class com.google.android.gms.location.LocationListener { *; }
|
||||||
|
-keep class io.fabric.sdk.android.** { *; }
|
||||||
|
-keep class okio.** { *; }
|
||||||
|
-keep class retrofit2.** { *; }
|
||||||
|
-keep class okhttp3.** { *; }
|
||||||
|
-keep class com.squareup.okhttp.** { *; }
|
||||||
|
-keep class com.android.volley.** { *; }
|
||||||
|
-keep class com.flurry.** { *; }
|
||||||
|
-keep class org.apache.** { *; }
|
||||||
|
-keep class com.applovin.** { *; }
|
||||||
|
-keep class com.google.android.gms.ads.** { *; }
|
||||||
|
-keep class com.ironsource.** { *; }
|
||||||
|
-keep class com.fyber.inneractive.** { *; }
|
||||||
|
-keep class com.vungle.** { *; }
|
||||||
|
-keep class com.unity3d.ads.** { *; }
|
||||||
|
-keep class com.unity3d.services.** { *; }
|
||||||
|
-keep class com.mintegral.msdk.** { *; }
|
||||||
|
-keep class com.mbridge.msdk.** { *; }
|
||||||
|
-keep class com.adcolony.sdk.** { *; }
|
||||||
|
-keep class com.inmobi.** { *; }
|
||||||
|
-keep class com.five_corp.** { *; }
|
||||||
|
-keep class com.bytedance.** { *; }
|
||||||
|
-keep class com.smaato.** { *; }
|
||||||
|
-keep class com.explorestack.** { *; }
|
||||||
|
-keep class com.safedk.** { *; }
|
||||||
|
-keep class com.applovin.quality.** { *; }
|
||||||
|
-keep class com.braze.** { *; }
|
||||||
@ -163,7 +163,7 @@ public class MusicPlayerForegroundService extends Service {
|
|||||||
mediaPlayer.setOnErrorListener((mp, what, extra) -> {
|
mediaPlayer.setOnErrorListener((mp, what, extra) -> {
|
||||||
Log.e("MusicPlayerService", "播放时发生错误: " + what + ", 额外信息: " + extra);
|
Log.e("MusicPlayerService", "播放时发生错误: " + what + ", 额外信息: " + extra);
|
||||||
isPlaying.postValue(false); // 更新状态
|
isPlaying.postValue(false); // 更新状态
|
||||||
stopSelf(); // 播放出错后停止服务
|
// stopSelf(); // 播放出错后停止服务
|
||||||
return true; // 表示错误已处理
|
return true; // 表示错误已处理
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -346,13 +346,16 @@ public class MusicPlayerForegroundService extends Service {
|
|||||||
Runnable runnable = new Runnable() {
|
Runnable runnable = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
Log.d("nowtotal","run11");
|
||||||
if (mediaPlayer != null && mediaPlayer.isPlaying()) {
|
if (mediaPlayer != null && mediaPlayer.isPlaying()) {
|
||||||
|
Log.d("nowtotal","run222");
|
||||||
currentPosition.postValue(mediaPlayer.getCurrentPosition());
|
currentPosition.postValue(mediaPlayer.getCurrentPosition());
|
||||||
handler.postDelayed(this, 1000); // 每隔1秒更新一次
|
handler.postDelayed(this, 1000); // 每隔1秒更新一次
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
handler.post(runnable); // 启动更新
|
handler.post(runnable); // 启动更新
|
||||||
|
Log.d("nowtotal","service");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 跳转到指定播放位置
|
// 跳转到指定播放位置
|
||||||
|
|||||||
@ -55,6 +55,8 @@ public class A_PlayActivity extends BaseActivity<ActivityAplayBinding> {
|
|||||||
musicService = ((MusicPlayerForegroundService.MusicBinder) service).getService();
|
musicService = ((MusicPlayerForegroundService.MusicBinder) service).getService();
|
||||||
isBound = true;
|
isBound = true;
|
||||||
|
|
||||||
|
Log.d("nowtotal","onServiceConnected");
|
||||||
|
|
||||||
// 设置观察者
|
// 设置观察者
|
||||||
musicService.getIsPlaying().observe(A_PlayActivity.this, this::updatePlayButton);
|
musicService.getIsPlaying().observe(A_PlayActivity.this, this::updatePlayButton);
|
||||||
|
|
||||||
@ -99,10 +101,7 @@ public class A_PlayActivity extends BaseActivity<ActivityAplayBinding> {
|
|||||||
|
|
||||||
loadBackgroundPreference(); // 加载之前保存的背景状态
|
loadBackgroundPreference(); // 加载之前保存的背景状态
|
||||||
|
|
||||||
updateSeekBarAndTime();
|
|
||||||
if (musicService != null) {
|
|
||||||
musicService.startUpdatingProgress();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 从Intent获取音频项
|
// 从Intent获取音频项
|
||||||
AudioItem audioItem = (AudioItem) getIntent().getSerializableExtra("Path");
|
AudioItem audioItem = (AudioItem) getIntent().getSerializableExtra("Path");
|
||||||
@ -142,6 +141,13 @@ public class A_PlayActivity extends BaseActivity<ActivityAplayBinding> {
|
|||||||
startMusicService(audioItem); // 启动音乐服务
|
startMusicService(audioItem); // 启动音乐服务
|
||||||
setupPlayButtonClickListener(); // 设置播放按钮的点击事件
|
setupPlayButtonClickListener(); // 设置播放按钮的点击事件
|
||||||
|
|
||||||
|
updateSeekBarAndTime();
|
||||||
|
|
||||||
|
if (musicService != null) {
|
||||||
|
musicService.startUpdatingProgress();
|
||||||
|
Log.d("nowtotal","onCreateInit");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -221,6 +227,7 @@ public class A_PlayActivity extends BaseActivity<ActivityAplayBinding> {
|
|||||||
if (duration!= null && duration > 0) {
|
if (duration!= null && duration > 0) {
|
||||||
vb.songSeekbar.setProgress((int) ((position / (float) duration) * 100));
|
vb.songSeekbar.setProgress((int) ((position / (float) duration) * 100));
|
||||||
vb.current.setText(formatTime(position));
|
vb.current.setText(formatTime(position));
|
||||||
|
Log.d("nowtotal","current");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -228,6 +235,7 @@ public class A_PlayActivity extends BaseActivity<ActivityAplayBinding> {
|
|||||||
musicService.getDurationLiveData().observe(this, duration -> {
|
musicService.getDurationLiveData().observe(this, duration -> {
|
||||||
if (duration!= null) {
|
if (duration!= null) {
|
||||||
vb.time.setText(formatTime(duration));
|
vb.time.setText(formatTime(duration));
|
||||||
|
Log.d("nowtotal","time");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user