TIM v2.3.1版本的 MD5 值为:d6957e3ee7ce901ccc491cefdea0da8c

以下内容为反编译后的 TeamWorkUtils.java 源代码,内容仅作参考


package com.tencent.mobileqq.teamwork;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.ResultReceiver;
import android.support.v4.util.MQLruCache;
import android.text.TextUtils;
import android.util.Base64;
import com.tencent.biz.pubaccount.PublicAccountJavascriptInterface;
import com.tencent.biz.webviewplugin.Share;
import com.tencent.common.app.AppInterface;
import com.tencent.common.app.BaseApplicationImpl;
import com.tencent.mobileqq.activity.QQBrowserActivity;
import com.tencent.mobileqq.activity.TeamWorkDocEditBrowserActivity;
import com.tencent.mobileqq.activity.aio.ForwardUtils;
import com.tencent.mobileqq.activity.aio.rebuild.PublicAccountChatPie;
import com.tencent.mobileqq.app.AppConstants;
import com.tencent.mobileqq.app.BaseActivity;
import com.tencent.mobileqq.app.QQAppInterface;
import com.tencent.mobileqq.app.TroopManager;
import com.tencent.mobileqq.data.MessageForStructing;
import com.tencent.mobileqq.data.MessageRecord;
import com.tencent.mobileqq.data.TroopInfo;
import com.tencent.mobileqq.filemanager.util.FileUtil;
import com.tencent.mobileqq.forward.ForwardConstants;
import com.tencent.mobileqq.pb.ByteStringMicro;
import com.tencent.mobileqq.structmsg.AbsStructMsg;
import com.tencent.mobileqq.structmsg.StructMsgFactory;
import com.tencent.mobileqq.teamworkforgroup.GPadInfo;
import com.tencent.mobileqq.teamworkforgroup.GroupPadTemplateInfo;
import com.tencent.mobileqq.troop.utils.TroopBarUtils;
import com.tencent.mobileqq.util.BitmapManager;
import com.tencent.mobileqq.utils.CacheKeyHelper;
import com.tencent.mobileqq.utils.SharedPreUtils;
import com.tencent.mobileqq.webview.swift.component.SwiftBrowserUIStyleHandler;
import com.tencent.mobileqq.widget.IndexView;
import com.tencent.qphone.base.util.QLog;
import com.tencent.tim.R;
import com.tencent.util.URLUtil;
import java.io.File;
import java.net.URL;
import java.util.ArrayList;
import java.util.regex.Pattern;
import tencent.im.oidb.cmd0xae9.online_docs;
public class TeamWorkUtils {
    public static final String f93185c = "s_tim_aiomsg";
    public static final String d = "s_tim_cloud_folder";
    public static final String e = "s_tim_cloud_new";
    public static final String f = "s_tim_grpfile";
    public static final String g = "s_tim_file_edit";
    public static final String h = "s_tim_aio_grey";
    public static final String i = "s_guanwang";
    public static final String j = "s_tim_aio_edit";
    public static final String k = "s_tim_file_share_edit";
    public static final String l = "tdsourcetag";
    public static final String m = "https://docs.qq.com/desktop/favicon.ico";
    public static final String n = "https://docs.qq.com/desktop/m/index.html?_wv=2097154";
    private static final String o = "data:image/jpg;base64,";
    private static final String p = "data:image/png;base64,";
    private static final String q = "data:image/jpeg;base64,";
    private static final String r = "data:image/gif;base64,";
    public static String f30158a = "TeamWorkUtils";
    public static String f93184b = ".doc|.docx|.xls|.xlsx|";
    public static long f93183a = 101458937;

    public static boolean m8339a(String str, String str2) {
        File file;
        if (TextUtils.isEmpty(str2) && !TextUtils.isEmpty(str) && (file = new File(str)) != null && file.exists()) {
            str2 = file.getName();
        }
        String m6628a = FileUtil.m6628a(str2);
        if (TextUtils.isEmpty(m6628a)) {
            return false;
        }
        if (f93184b.indexOf(m6628a.toLowerCase()) < 0) {
            return false;
        }
        return true;
    }

    public static boolean m8338a(String str) {
        ArrayList m8308b = TeamWorkManager.m8308b();
        if (m8308b == null || m8308b.size() <= 0) {
            return false;
        }
        for (int i2 = 0; i2 < m8308b.size(); i2++) {
            if (str.contains((CharSequence) m8308b.get(i2))) {
                return true;
            }
        }
        return false;
    }

    public static boolean m8340b(String str) {
        ArrayList m8310c = TeamWorkManager.m8310c();
        if (m8310c == null || m8310c.size() <= 0) {
            return false;
        }
        for (int i2 = 0; i2 < m8310c.size(); i2++) {
            if (str.contains((CharSequence) m8310c.get(i2))) {
                return true;
            }
        }
        return false;
    }

    public static boolean c(String str) {
        ArrayList m8303a = TeamWorkManager.m8303a();
        if (m8303a == null || m8303a.size() <= 0) {
            return false;
        }
        for (int i2 = 0; i2 < m8303a.size(); i2++) {
            if (str.contains((CharSequence) m8303a.get(i2))) {
                return true;
            }
        }
        return false;
    }

    public static boolean d(String str) {
        return !TextUtils.isEmpty(str) && (m8340b(str) || Pattern.compile("^((http|https):(//|//t))([0-9]{1,20})(((\\.docx)||(\\.docs)).qq\\.com/.+)").matcher(str).find());
    }

    public static boolean e(String str) {
        if (TextUtils.isEmpty(str) || !c(str)) {
            return false;
        }
        try {
            String path = new URL(str).getPath();
            if (!TextUtils.isEmpty(path) && !path.equals("/") && !path.equals("/index.html") && !path.equals("/mobile.html")) {
                if (!path.equals("/login.html")) {
                    return true;
                }
            }
            return false;
        } catch (Exception e2) {
            QLog.e("docHome", 1, " detect docHome error: " + e2.toString());
            return true;
        }
    }

    public static String a(String str, int i2) {
        String[] split;
        boolean z = false;
        if (!TextUtils.isEmpty(str)) {
            StringBuilder sb = new StringBuilder(str);
            String[] split2 = str.split("\\?");
            if (split2 != null && split2.length > 0) {
                StringBuilder sb2 = new StringBuilder(split2[0]);
                if (split2.length > 1 && (split = split2[1].split(IndexView.f95329b)) != null) {
                    boolean z2 = false;
                    for (String str2 : split) {
                        String[] split3 = str2.split("=");
                        if (split3 != null && split3.length == 2) {
                            String str3 = null;
                            if (split3[0].equals("type")) {
                                if (!z2) {
                                    sb2.append("?");
                                }
                                if (z2) {
                                    sb2.append(IndexView.f95329b);
                                }
                                str3 = "type=" + split3[1];
                                z2 = true;
                            } else if (split3[0].equals("_wv")) {
                                if (!z2) {
                                    sb2.append("?");
                                }
                                if (z2) {
                                    sb2.append(IndexView.f95329b);
                                }
                                str3 = "_wv=" + split3[1];
                                z2 = true;
                            }
                            if (str3 != null) {
                                sb2.append(str3);
                            }
                        }
                    }
                    z = z2;
                }
                if (!z && (i2 == 1 || i2 == 2)) {
                    sb2.append("?type=").append(i2).append("&_wv=1");
                }
                sb = sb2;
            }
            return sb.toString();
        }
        return str;
    }

    public static String m8337a(String str) {
        String[] split;
        if (!TextUtils.isEmpty(str) && (split = str.split("\\?")) != null && split.length > 0) {
            return split[0];
        }
        return str;
    }

    public static boolean a(MessageRecord messageRecord) {
        if (messageRecord == null || !(messageRecord instanceof MessageForStructing)) {
            return false;
        }
        MessageForStructing messageForStructing = (MessageForStructing) messageRecord;
        if (messageForStructing.structingMsg == null || TextUtils.isEmpty(messageForStructing.structingMsg.mMsgUrl)) {
            return false;
        }
        if (!messageForStructing.structingMsg.mMsgUrl.contains("docx.qq.com") && !messageForStructing.structingMsg.mMsgUrl.contains(TeamWorkHandler.f30034w)) {
            return false;
        }
        return true;
    }

    public static String a(String str, String str2) {
        String[] split;
        String substring;
        String substring2;
        if (!TextUtils.isEmpty(str) && !TextUtils.isEmpty(str2) && str.contains(str2) && (split = str.split("\\?")) != null && split.length > 1) {
            String str3 = split[0];
            String str4 = split[1];
            int length = str4.length();
            if (str4.startsWith(str2)) {
                int length2 = str2.length();
                if (length2 + 1 < length) {
                    substring2 = str4.substring(length2 + 1, length);
                } else {
                    substring2 = str4.substring(length2, length);
                }
                return str3 + "?" + substring2;
            }
            int indexOf = str4.indexOf(str2);
            if (str2.length() + indexOf + 1 < length) {
                substring = str4.substring(0, indexOf) + str4.substring(indexOf + str2.length() + 1, length);
            } else {
                substring = str4.substring(0, indexOf - 1);
            }
            return str3 + "?" + substring;
        }
        return str;
    }

    public static online_docs.DocId a(int i2, String str) {
        online_docs.DocId docId = new online_docs.DocId();
        docId.pad_id.set(ByteStringMicro.copyFromUtf8(str));
        docId.domain_id.set(i2);
        return docId;
    }

    public static void a(QQAppInterface qQAppInterface, Activity activity, int i2, long j2) {
        int i3 = 2;
        String str = "";
        String valueOf = String.valueOf(j2);
        if (i2 == 1) {
            str = "https://" + qQAppInterface.getCurrentAccountUin() + "." + TeamWorkConstants.A + "?group_code=" + valueOf;
        } else if (i2 == 2) {
            str = "https://" + qQAppInterface.getCurrentAccountUin() + "." + TeamWorkConstants.B + "?group_code=" + valueOf;
        }
        if (i2 == 1) {
            i3 = 1;
        } else if (i2 != 2) {
            i3 = 1;
        }
        Bundle bundle = new Bundle();
        bundle.putString(l, f);
        bundle.putString("url", str);
        bundle.putString("title", activity.getString(R.string.f66603name_res_0x7f0a200f));
        bundle.putInt(TeamWorkDocEditBrowserActivity.f11369b, i3);
        bundle.putBoolean(SwiftBrowserUIStyleHandler.k, true);
        TroopInfo m4858b = ((TroopManager) qQAppInterface.getManager(51)).m4858b(String.valueOf(j2));
        if (m4858b != null && !TextUtils.isEmpty(m4858b.troopname)) {
            bundle.putString("troop_name", m4858b.troopname);
        } else {
            bundle.putString("troop_name", "" + j2);
        }
        TeamWorkDocEditBrowserActivity.a((Context) activity, bundle, true);
    }

    public static void a(QQAppInterface qQAppInterface, Activity activity, int i2) {
        int i3 = 2;
        String str = "";
        if (i2 == 2) {
            str = "https://" + qQAppInterface.getCurrentAccountUin() + "." + TeamWorkConstants.A;
        } else if (i2 == 3) {
            str = "https://" + qQAppInterface.getCurrentAccountUin() + "." + TeamWorkConstants.B;
        }
        if (i2 == 2) {
            i3 = 1;
        } else if (i2 != 3) {
            i3 = 1;
        }
        Bundle bundle = new Bundle();
        bundle.putString("url", str);
        bundle.putString("title", activity.getString(R.string.f66603name_res_0x7f0a200f));
        bundle.putInt(TeamWorkDocEditBrowserActivity.f11369b, i3);
        bundle.putString(l, e);
        TeamWorkDocEditBrowserActivity.a((Context) activity, bundle, true);
    }

    public static void a(QQAppInterface qQAppInterface, Activity activity, GroupPadTemplateInfo groupPadTemplateInfo) {
        int i2;
        int i3;
        String str;
        boolean z;
        String str2;
        int i4;
        Bundle bundle;
        TroopInfo m4858b;
        String str3 = "";
        String str4 = "";
        if (groupPadTemplateInfo != null) {
            i3 = groupPadTemplateInfo.docOrSheetType;
            i2 = groupPadTemplateInfo.templateID;
            str3 = String.valueOf(groupPadTemplateInfo.groupCode);
            str4 = groupPadTemplateInfo.templateUrl;
        } else {
            i2 = 0;
            i3 = 1;
        }
        if (TextUtils.isEmpty(str4)) {
            str = "";
            z = true;
        } else {
            str = "https:" + str4;
            z = !URLUtil.m10274a(str);
        }
        if (z) {
            if (i3 == 1) {
                str2 = "https://" + qQAppInterface.getCurrentAccountUin() + "." + String.format(TeamWorkConstants.F, Integer.valueOf(i2)) + "&group_code=" + str3;
            } else if (i3 == 2) {
                str2 = "https://" + qQAppInterface.getCurrentAccountUin() + "." + String.format(TeamWorkConstants.G, Integer.valueOf(i2)) + "&group_code=" + str3;
            }
            if (i3 != 1) {
                i4 = 1;
            } else {
                i4 = i3 == 2 ? 2 : 1;
            }
            bundle = new Bundle();
            bundle.putString(l, f);
            bundle.putString("url", str2);
            bundle.putInt(TeamWorkDocEditBrowserActivity.f11369b, i4);
            bundle.putBoolean(SwiftBrowserUIStyleHandler.k, true);
            m4858b = ((TroopManager) qQAppInterface.getManager(51)).m4858b(str3);
            if (m4858b == null && !TextUtils.isEmpty(m4858b.troopname)) {
                bundle.putString("troop_name", m4858b.troopname);
            } else {
                bundle.putString("troop_name", "" + str3);
            }
            TeamWorkDocEditBrowserActivity.a((Context) activity, bundle, true);
        }
        str2 = str;
        if (i3 != 1) {
        }
        bundle = new Bundle();
        bundle.putString(l, f);
        bundle.putString("url", str2);
        bundle.putInt(TeamWorkDocEditBrowserActivity.f11369b, i4);
        bundle.putBoolean(SwiftBrowserUIStyleHandler.k, true);
        m4858b = ((TroopManager) qQAppInterface.getManager(51)).m4858b(str3);
        if (m4858b == null) {
        }
        bundle.putString("troop_name", "" + str3);
        TeamWorkDocEditBrowserActivity.a((Context) activity, bundle, true);
    }

    public static void a(QQAppInterface qQAppInterface, GPadInfo gPadInfo, String str) {
        String str2;
        String str3;
        String m8337a = m8337a(gPadInfo.pad_url);
        String c2 = TeamWorkManager.c();
        if (TextUtils.isEmpty(c2)) {
            c2 = TeamWorkConstants.v;
        }
        String str4 = gPadInfo.title;
        String string = qQAppInterface.getApp().getString(R.string.f66536name_res_0x7f0a1fcc);
        if (gPadInfo.type == 2) {
            str3 = qQAppInterface.getApp().getString(R.string.f66537name_res_0x7f0a1fcd);
            String d2 = TeamWorkManager.d();
            str2 = !TextUtils.isEmpty(d2) ? d2 : TeamWorkConstants.w;
        } else {
            str2 = c2;
            str3 = string;
        }
        if (TextUtils.isEmpty(str2)) {
            str2 = null;
        }
        Intent a2 = a(1001, 95, ForwardConstants.Y_, "", str2, str4, TextUtils.isEmpty(str3) ? m8337a : str3, qQAppInterface.getApp().getString(R.string.f60751name_res_0x7f0a092c, new Object[]{str4}), m8337a, "web", null, null, null, TroopBarUtils.y, null, null, null, null, null, "", null, -1L);
        a2.putExtra("uintype", 1);
        a2.putExtra("uin", str);
        a2.putExtra("troop_uin", "");
        TroopInfo m4858b = ((TroopManager) qQAppInterface.getManager(51)).m4858b(str);
        if (m4858b != null) {
            a2.putExtra(AppConstants.Key.h, m4858b.troopname);
        }
        ForwardUtils.a(qQAppInterface, qQAppInterface.getApp(), ForwardUtils.a(a2), a2);
    }

    public static Intent a(int i2, int i3, String str, String str2, String str3, String str4, String str5, String str6, String str7, String str8, String str9, String str10, String str11, String str12, String str13, String str14, String str15, String str16, String str17, String str18, String str19, long j2) {
        Intent intent = new Intent();
        intent.putExtra(ForwardConstants.p, true);
        intent.putExtra("isFromShare", true);
        intent.putExtra(AppConstants.Key.G, i2);
        intent.putExtra(ForwardConstants.W_, str);
        intent.putExtra("req_type", i3);
        intent.putExtra(AppConstants.Key.bf, str7);
        intent.putExtra(AppConstants.Key.bh, str3);
        intent.putExtra(AppConstants.Key.bK, str19);
        if (j2 != -1) {
            intent.putExtra(AppConstants.Key.aU, j2);
        }
        intent.putExtra(PublicAccountJavascriptInterface.f4018c, str2);
        intent.putExtra(PublicAccountChatPie.av, str2);
        if (i3 == 44 || i3 == 95) {
            intent.putExtra(ForwardConstants.C, true);
        }
        if (str4 != null && str4.length() > 45) {
            str4 = str4.substring(0, 45) + "…";
        }
        intent.putExtra("title", str4);
        if (str5 != null && str5.length() > 60) {
            str5 = str5.substring(0, 60) + "…";
        }
        intent.putExtra("desc", str5);
        intent.putExtra(AppConstants.Key.ac, str18);
        intent.putExtra(AppConstants.Key.bR, str8);
        intent.putExtra(AppConstants.Key.bS, str10);
        intent.putExtra(AppConstants.Key.bT, str11);
        intent.putExtra(AppConstants.Key.bU, str9);
        intent.putExtra(AppConstants.Key.aU, -1L);
        intent.putExtra(AppConstants.Key.bW, str12);
        intent.putExtra(AppConstants.Key.bX, str13);
        intent.putExtra(AppConstants.Key.bY, str14);
        intent.putExtra(AppConstants.Key.bZ, str15);
        intent.putExtra(AppConstants.Key.ca, str16);
        intent.putExtra("app_name", str17);
        intent.putExtra(AppConstants.Key.bJ, str6);
        AbsStructMsg a2 = StructMsgFactory.a(intent.getExtras());
        if (a2 != null) {
            intent.putExtra(AppConstants.Key.ci, a2.getBytes());
        }
        return intent;
    }

    public static boolean a(QQAppInterface qQAppInterface) {
        TeamWorkHandler teamWorkHandler = (TeamWorkHandler) qQAppInterface.getBusinessHandler(100);
        if (teamWorkHandler != null) {
            return teamWorkHandler.f30045a;
        }
        return false;
    }

    public static void a(QQAppInterface qQAppInterface, boolean z) {
        SharedPreUtils.a((Context) qQAppInterface.getApp(), qQAppInterface.m4704d(), AppConstants.Preferences.jm, z);
        TeamWorkHandler teamWorkHandler = (TeamWorkHandler) qQAppInterface.getBusinessHandler(100);
        if (teamWorkHandler != null) {
            teamWorkHandler.f30045a = z;
        }
    }

    public static boolean b(QQAppInterface qQAppInterface) {
        TeamWorkHandler teamWorkHandler = (TeamWorkHandler) qQAppInterface.getBusinessHandler(100);
        if (teamWorkHandler != null) {
            return teamWorkHandler.f30047b;
        }
        return false;
    }

    public static void b(QQAppInterface qQAppInterface, boolean z) {
        SharedPreUtils.a((Context) qQAppInterface.getApp(), qQAppInterface.m4704d(), AppConstants.Preferences.jn, z);
        TeamWorkHandler teamWorkHandler = (TeamWorkHandler) qQAppInterface.getBusinessHandler(100);
        if (teamWorkHandler != null) {
            teamWorkHandler.f30047b = z;
        }
    }

    public static String b(String str, String str2) {
        try {
            if (TextUtils.isEmpty(str)) {
                return "";
            }
            return Uri.parse(str).getQueryParameter(str2);
        } catch (Exception e2) {
            e2.printStackTrace();
            return "";
        }
    }

    public static void a(Context context, QQAppInterface qQAppInterface, String str) {
        Intent intent = new Intent(context, QQBrowserActivity.class);
        intent.putExtra("uin", qQAppInterface.getCurrentAccountUin());
        intent.putExtra("hide_more_button", true);
        intent.putExtra(l, str);
        String str2 = n;
        if (str != null) {
            str2 = c(n, str);
        }
        context.startActivity(intent.putExtra("url", str2));
    }

    public static void a(Share share, BaseActivity baseActivity, AppInterface appInterface, ResultReceiver resultReceiver) {
        if (share != null) {
            int i2 = share.c().equals("sheet") ? 2 : 1;
            String a2 = a(share.m1829a(), i2);
            String m1834b = share.m1834b();
            String e2 = share.e();
            String f2 = share.f();
            String d2 = share.d();
            Intent intent = new Intent(baseActivity, TeamWorkTransparentShareActivity.class);
            int b2 = share.b();
            boolean m1838c = (TextUtils.isEmpty(a2) || !a2.contains(appInterface.getCurrentAccountUin())) ? share.m1838c() : true;
            intent.putExtra(TeamWorkTransparentShareActivity.f93182c, b2);
            if (m1838c) {
                intent.putExtra(TeamWorkTransparentShareActivity.f30127b, true);
            }
            if (!TextUtils.isEmpty(m1834b)) {
                intent.putExtra(TeamWorkConstants.f29944a, m1834b);
            }
            if (!TextUtils.isEmpty(e2)) {
                intent.putExtra(TeamWorkConstants.f29946b, e2);
            }
            if (!TextUtils.isEmpty(f2)) {
                intent.putExtra(TeamWorkConstants.f29948c, f2);
            }
            if (!TextUtils.isEmpty(d2)) {
                intent.putExtra(TeamWorkConstants.f29950d, d2);
            }
            if (!TextUtils.isEmpty(a2)) {
                intent.putExtra(TeamWorkAuthorizeSettingActivity.f29915c, a2);
            }
            intent.putExtra(TeamWorkTransparentShareActivity.f, i2);
            intent.putExtra(TeamWorkTransparentShareActivity.f30128d, TeamWorkDocEditBrowserActivity.f11368a);
            if (share.m1827a() != null) {
                intent.putExtra(TeamWorkTransparentShareActivity.g, share.m1827a());
            }
            intent.putExtra("key_result_receiver", resultReceiver);
            baseActivity.overridePendingTransition(0, 0);
            baseActivity.startActivity(intent);
        }
    }

    public static Bitmap a(String str) {
        try {
            if (!f(str)) {
                return null;
            }
            return b(str);
        } catch (IllegalArgumentException e2) {
            e2.printStackTrace();
            return null;
        } catch (OutOfMemoryError e3) {
            return null;
        }
    }

    public static Bitmap a(int i2) {
        int i3;
        Object obj;
        Bitmap bitmap;
        if (i2 == 1) {
            i3 = R.drawable.f46362name_res_0x7f0214aa;
            obj = CacheKeyHelper.Q;
        } else {
            i3 = R.drawable.f46363name_res_0x7f0214ab;
            obj = CacheKeyHelper.R;
        }
        if (BaseApplicationImpl.f6969a == null) {
            bitmap = null;
        } else {
            bitmap = (Bitmap) BaseApplicationImpl.f6969a.get(obj);
        }
        if (bitmap == null && (bitmap = BitmapManager.b(BaseApplicationImpl.a().getResources(), i3)) != null && BaseApplicationImpl.f6969a != null) {
            BaseApplicationImpl.f6969a.put((MQLruCache) obj, (Object) bitmap);
        }
        return bitmap;
    }

    public static boolean f(String str) {
        return str.startsWith(o) || str.startsWith(p) || str.startsWith(q) || str.startsWith(r);
    }

    public static Bitmap b(String str) {
        Bitmap bitmap = null;
        try {
            BitmapFactory.Options options = new BitmapFactory.Options();
            if (Build.VERSION.SDK_INT > 19) {
                options.inPreferredConfig = Bitmap.Config.ARGB_8888;
            } else {
                options.inPreferredConfig = Bitmap.Config.ARGB_4444;
            }
            byte[] decode = Base64.decode(str.split(",")[1], 0);
            bitmap = BitmapFactory.decodeByteArray(decode, 0, decode.length, options);
            return bitmap;
        } catch (OutOfMemoryError e2) {
            if (QLog.isColorLevel()) {
                QLog.d(f30158a, 2, "Texture: cannot decode base64: " + QLog.getStackTraceString(e2));
                return bitmap;
            }
            return bitmap;
        }
    }

    public static String c(String str, String str2) {
        String str3 = "?tdsourcetag=" + str2;
        if (TextUtils.isEmpty(str)) {
            return "";
        }
        if (str.contains("?")) {
            str3 = "&tdsourcetag=" + str2;
        }
        return str + str3;
    }
}