移除多余代码

This commit is contained in:
lyswhut 2021-08-31 14:06:25 +08:00
parent cb749e494a
commit 2e7a7d1f76

View File

@ -294,9 +294,9 @@ public class LyricView extends Activity implements View.OnTouchListener {
public void setColor(String color) { public void setColor(String color) {
themeColor = color; themeColor = color;
if (windowManager == null || textView == null) return; if (textView == null) return;
textView.setTextColor(Color.parseColor(color)); textView.setTextColor(Color.parseColor(color));
windowManager.updateViewLayout(textView, layoutParams); // windowManager.updateViewLayout(textView, layoutParams);
} }
public void setLyricTextPosition(String textX, String textY) { public void setLyricTextPosition(String textX, String textY) {
@ -336,7 +336,7 @@ public class LyricView extends Activity implements View.OnTouchListener {
public void setAlpha(float alpha) { public void setAlpha(float alpha) {
this.alpha = alpha; this.alpha = alpha;
if (windowManager == null || textView == null) return; if (textView == null) return;
textView.setAlpha(alpha); textView.setAlpha(alpha);
} }
@ -349,7 +349,7 @@ public class LyricView extends Activity implements View.OnTouchListener {
} }
public void destroyView() { public void destroyView() {
if (textView == null) return; if (textView == null || windowManager == null) return;
windowManager.removeView(textView); windowManager.removeView(textView);
textView = null; textView = null;
} }