Explorar el Código

正式包屏蔽测试下载

zengjiebin hace 7 años
padre
commit
473a99d436

+ 3 - 0
app/src/main/java/com/sheep/gamegroup/model/util/LogInterceptor.java

@@ -189,6 +189,9 @@ public class LogInterceptor implements Interceptor {
                             this.logger.log("");
                             String result = buffer.clone().readString(charset);
                             String json = BaseMessageConverter.decrypt(result);
+//                            if(TestUtil.isDev() && TextUtils.equals("http://ss.17xmy.com/v1/app/game_group/236", response.request().url().toString())){
+//                                this.logger.log(isDecrypt && !TextUtils.equals(result, json) ? "\n" + result + "\n" + StringUtils.parseJson(json.replaceAll("http://ks3.image.ksyun.kfzs.com/games/wd360_12406_KF_2.026.0821_cps_1031.apk", "http://ks3.image.ksyun.kfzs.com/games/wd360_12406_kuaifa_2.026.0821_cps_696.apk")) : "\n" + StringUtils.parseJson(json));
+//                            }
                             this.logger.log(isDecrypt && !TextUtils.equals(result, json) ? "\n" + result + "\n" + StringUtils.parseJson(json) : "\n" + StringUtils.parseJson(json));
                         }
 

+ 4 - 5
app/src/main/java/com/sheep/jiuyan/samllsheep/service/DownloadService.java

@@ -34,6 +34,7 @@ import com.sheep.gamegroup.model.entity.TaskEty;
 import com.sheep.gamegroup.util.DownloadUtil;
 import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.StringUtils;
+import com.sheep.gamegroup.util.TestUtil;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.G;
 
@@ -222,13 +223,11 @@ public class DownloadService extends Service {
     }
 
     public static void setDownLoadLongClick(View view, final String link, final String taskName) {
-        view.setOnLongClickListener(new View.OnLongClickListener() {
-            @Override
-            public boolean onLongClick(View view) {
+        if(TestUtil.isTest())
+            view.setOnLongClickListener(view1 -> {
                 showDownloadType(link, taskName);
                 return true;
-            }
-        });
+            });
     }
 
     private static void showDownloadType(final String link, final String taskName) {