瀏覽代碼

测试模式不清除粘贴板

zengjiebin 7 年之前
父節點
當前提交
36eddec79c
共有 1 個文件被更改,包括 3 次插入5 次删除
  1. 3 5
      app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java

+ 3 - 5
app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java

@@ -2615,8 +2615,7 @@ public class CommonUtil {
         LogUtil.println("checkCopyText", "\ntext\t", text);
         if (!TextUtils.isEmpty(text)) {//内容不为空时尝试检查
             String textString = text.toString();
-            StringUtils.CopyText("\t");//清除粘贴板内容,直接填空不行,不知道为什么
-            View.OnClickListener closeListener = view -> {};
+            View.OnClickListener closeListener = view -> StringUtils.CopyText("\t");//清除粘贴板内容,直接填空不行,不知道为什么
             DialogConfig dialogConfig = new DialogConfig().setTitle("小绵羊提示").setBtnCloseOnClickListener(closeListener);
             String url;
             if ((url = StringUtils.findUrl(text)) != null) {//如果是链接,直接跳转外部浏览器
@@ -2655,9 +2654,7 @@ public class CommonUtil {
         if (TestUtil.isTest()) {//下面的功能暂不提供给用户
             dialogConfig.setMsg("已经复制如下内容:\n" + textString + "\n,是否访问该链接?")
                     .setBtnLeftText("外部h5").setBtnLeftOnClickListener(view -> Jump2View.getInstance().goWeb(SheepApp.getInstance().getCurrentActivity(), url))
-                    .setBtnRightText("内部h5").setBtnRightOnClickListener(view -> {
-                Jump2View.getInstance().goWeb(SheepApp.getInstance().getCurrentActivity(), url, "测试内部h5");
-            });
+                    .setBtnRightText("内部h5").setBtnRightOnClickListener(view -> Jump2View.getInstance().goWeb(SheepApp.getInstance().getCurrentActivity(), url, "测试内部h5"));
             ViewUtil.showMsgDialog(SheepApp.getInstance().getCurrentActivity(), dialogConfig);
         }
     }
@@ -2665,6 +2662,7 @@ public class CommonUtil {
     //检查是否是小绵羊分享页面,如果是且获取到了game_id,返回true并调用接口获取对应的applications,然后尝试显示游戏对话框,提示用户是否查看游戏详情
     private boolean checkShouYouShare(View.OnClickListener closeListener, String url) {
         if (url.contains("/shou_you_share/index.html")) {
+            closeListener.onClick(null);
             String gameId = StringUtils.getQueryParameter(url, "game_id");
             if (!TextUtils.isEmpty(gameId)) {
                 SheepApp.getInstance().getNetComponent().getApiService().getAppId(gameId)//http://10.8.220.229:8800/shou_you_share/index.html?invitation_code=12799442&game_id=1553