王鹏鹏 2 лет назад
Родитель
Сommit
990bb5de6e

+ 2 - 2
app/src/main/java/com/yingyangfly/AutoInstallService.java

@@ -33,7 +33,7 @@ public class AutoInstallService extends AccessibilityService {
         for (int i = 0; i < nodes.size(); i++) {
             AccessibilityNodeInfo node = nodes.get(i);
             // 执行按钮点击行为
-            if (node.getClassName().equals("android.widget.Button") && node.isEnabled()) {
+            if ("android.widget.Button".equals(node.getClassName()) && node.isEnabled()) {
                 node.performAction(AccessibilityNodeInfo.ACTION_CLICK);
             }
         }
@@ -47,7 +47,7 @@ public class AutoInstallService extends AccessibilityService {
         for (int i = 0; i < nodes.size(); i++) {
             AccessibilityNodeInfo node = nodes.get(i);
             // 执行按钮点击行为
-            if (node.getClassName().equals("android.widget.TextView") && node.isEnabled()) {
+            if ("android.widget.TextView".equals(node.getClassName()) && node.isEnabled()) {
                 node.performAction(AccessibilityNodeInfo.ACTION_CLICK);
             }
         }

+ 0 - 1
baselib/src/main/java/com/yingyangfly/baselib/player/VoicePlayer.java

@@ -47,7 +47,6 @@ public class VoicePlayer {
             isPause = false;
             onCompletionListener = listener;
             try {
-                mediaPlayer.reset();
                 mediaPlayer.setDataSource(url);
                 mediaPlayer.prepareAsync();
                 mediaPlayer.setOnPreparedListener(mp -> {

+ 1 - 1
baselib/src/main/java/com/yingyangfly/baselib/utils/DensityUtils.java

@@ -77,7 +77,7 @@ public class DensityUtils {
         try {
             Double division;
             //根据带入参数选择不同的适配方向
-            if (orientation.equals("height")) {
+            if ("height".equals(orientation)) {
                 division = division(appDisplayMetrics.heightPixels, 598);
             } else {
                 division = division(appDisplayMetrics.widthPixels, 417);

+ 1 - 1
baselib/src/main/java/com/yingyangfly/baselib/widget/HighLight.java

@@ -264,7 +264,7 @@ public class HighLight {
         }
         lightGuideView.setRadius(this.radius);
         lightGuideView.setMaskColor(maskColor);
-        if (mAnchor.getClass().getSimpleName().equals("FrameLayout")) {
+        if ("FrameLayout".equals(mAnchor.getClass().getSimpleName())) {
             ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
             ((ViewGroup) mAnchor).addView(lightGuideView, ((ViewGroup) mAnchor).getChildCount(), params);
         } else {

+ 2 - 2
home/src/main/java/com/yingyangfly/home/updater/AutoInstallService.java

@@ -37,7 +37,7 @@ public class AutoInstallService extends AccessibilityService {
         for (int i = 0; i < nodes.size(); i++) {
             AccessibilityNodeInfo node = nodes.get(i);
             // 执行按钮点击行为
-            if (node.getClassName().equals("android.widget.Button") && node.isEnabled()) {
+            if ("android.widget.Button".equals(node.getClassName()) && node.isEnabled()) {
                 node.performAction(AccessibilityNodeInfo.ACTION_CLICK);
             }
         }
@@ -51,7 +51,7 @@ public class AutoInstallService extends AccessibilityService {
         for (int i = 0; i < nodes.size(); i++) {
             AccessibilityNodeInfo node = nodes.get(i);
             // 执行按钮点击行为
-            if (node.getClassName().equals("android.widget.TextView") && node.isEnabled()) {
+            if ("android.widget.TextView".equals(node.getClassName()) && node.isEnabled()) {
                 node.performAction(AccessibilityNodeInfo.ACTION_CLICK);
             }
         }

+ 1 - 1
superplayerkit/src/main/java/com/tencent/liteav/demo/superplayer/model/SuperPlayerImpl.java

@@ -391,7 +391,7 @@ public class SuperPlayerImpl implements SuperPlayer, ITXVodPlayListener, ITXLive
         mVodPlayConfig = new TXVodPlayConfig();
 
         if (TXPlayerGlobalSetting.getCacheFolderPath() == null
-                || TXPlayerGlobalSetting.getCacheFolderPath().equals("")) {
+                || "".equals(TXPlayerGlobalSetting.getCacheFolderPath())) {
             File sdcardDir = context.getExternalFilesDir(null);
             TXPlayerGlobalSetting.setCacheFolderPath(sdcardDir.getPath() + "/txcache");
         }