Commit 7eaad204 by 徐健

修复FM播放动画在页面onResume的时候出现的异常

parent 3f39fc79
...@@ -168,13 +168,13 @@ dependencies { ...@@ -168,13 +168,13 @@ dependencies {
if (rootProject.ext.dev_mode) { if (rootProject.ext.dev_mode) {
//开发模式 //开发模式
api project(':m-user') api project(':m-user')
//api project(':m-fm') api project(':m-fm')
api project(':m-tests') api project(':m-tests')
api project(':m-consultant') api project(':m-consultant')
api (project(':ydl-platform')){ api (project(':ydl-platform')){
transitive = true transitive = true
} }
implementation project(':ydl-webview') // implementation project(':ydl-webview')
implementation project(':ydl-media') implementation project(':ydl-media')
} else { } else {
//发布模式 //发布模式
......
...@@ -555,7 +555,11 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen ...@@ -555,7 +555,11 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
@Override @Override
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();
fmSurfaceView.surfaceCreated(null); if (AudioPlayer.Companion.get().isPlaying()) {
fmSurfaceView.playTimer();
}else {
fmSurfaceView.stopTimer();
}
if (PlayerFloatHelper.Companion.isShow(this)) { if (PlayerFloatHelper.Companion.isShow(this)) {
PlayerFloatHelper.Companion.removeView(this); PlayerFloatHelper.Companion.removeView(this);
......
...@@ -86,7 +86,6 @@ class FMSurfaceView(context: Context?, attrs: AttributeSet?) : SurfaceView(conte ...@@ -86,7 +86,6 @@ class FMSurfaceView(context: Context?, attrs: AttributeSet?) : SurfaceView(conte
} }
private fun drawAnimate() { private fun drawAnimate() {
synchronized(this) {
mHolder?.let { mHolder?.let {
canvas = mHolder?.lockCanvas() canvas = mHolder?.lockCanvas()
canvas?.let { canvas?.let {
...@@ -123,7 +122,6 @@ class FMSurfaceView(context: Context?, attrs: AttributeSet?) : SurfaceView(conte ...@@ -123,7 +122,6 @@ class FMSurfaceView(context: Context?, attrs: AttributeSet?) : SurfaceView(conte
} }
} }
} }
}
private fun drawPath(point: Point, pointRadius: Float) { private fun drawPath(point: Point, pointRadius: Float) {
path = Path() path = Path()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment