Commit 79185d0b by konghaorui

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

This reverts commit 7eaad204.
parent 7eaad204
...@@ -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,11 +555,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen ...@@ -555,11 +555,7 @@ public class FMDetailActivity extends BaseActivity implements View.OnClickListen
@Override @Override
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();
if (AudioPlayer.Companion.get().isPlaying()) { fmSurfaceView.surfaceCreated(null);
fmSurfaceView.playTimer();
}else {
fmSurfaceView.stopTimer();
}
if (PlayerFloatHelper.Companion.isShow(this)) { if (PlayerFloatHelper.Companion.isShow(this)) {
PlayerFloatHelper.Companion.removeView(this); PlayerFloatHelper.Companion.removeView(this);
......
...@@ -86,6 +86,7 @@ class FMSurfaceView(context: Context?, attrs: AttributeSet?) : SurfaceView(conte ...@@ -86,6 +86,7 @@ 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 {
...@@ -122,6 +123,7 @@ class FMSurfaceView(context: Context?, attrs: AttributeSet?) : SurfaceView(conte ...@@ -122,6 +123,7 @@ 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